Favicon

You are here: Home > API Reference > Platform > Otpusers > Update an existing OTP user configuration

Update an existing OTP user configuration

Required Permission: mad.store.otpUsers.update

Modifies the download allowance settings for a specific OTP user.

PUT
https://api.applivery.io/v1/organizations/{organizationSlug}/stores/{storeId}/otp-users/{otpUserId}
curl -X PUT "https://api.applivery.io/v1/organizations/{organizationSlug}/stores/{storeId}/otp-users/{otpUserId}" \
  -H "Authorization: Bearer <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "allowedDownloadsNum": 0
}'
const response = await fetch("https://api.applivery.io/v1/organizations/{organizationSlug}/stores/{storeId}/otp-users/{otpUserId}", {
  method: "PUT",
  headers: {
    Authorization: "Bearer <YOUR_API_KEY>",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "allowedDownloadsNum": 0
  }),
});

const data = await response.json();
import requests

response = requests.put(
    "https://api.applivery.io/v1/organizations/{organizationSlug}/stores/{storeId}/otp-users/{otpUserId}",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json={
      "allowedDownloadsNum": 0
    },
)

data = response.json()

Request

Send your API key in the request header authorization
Example: Authorization: Bearer <token>

storeId string
required
Match pattern: ^[a-fA-F0-9]{24}$
otpUserId string
required
Match pattern: ^[a-fA-F0-9]{24}$

Body Params application/json
allowedDownloadsNum integer optional
Maximum number of downloads permitted for this OTP user where minus one indicates unlimited access.
≥ -9007199254740991 · ≤ 9007199254740991
{
    "allowedDownloadsNum": 0
}

Responses

200 Response application/json
status boolean required
data object required
id string required
Unique identifier for the OTP user record used to reference and manage the user across all store operations.
Match pattern: ^[a-fA-F0-9]{24}$
organizationId string required
Identifier of the organization that owns this OTP user, establishing the top-level resource isolation boundary.
Match pattern: ^[a-fA-F0-9]{24}$
storeId string required
Identifier of the store to which this OTP user belongs, scoping download access to a specific distribution channel.
Match pattern: ^[a-fA-F0-9]{24}$
publishedApplicationId string required
Identifier of the published application associated with this OTP user, restricting download permissions to a single app.
Match pattern: ^[a-fA-F0-9]{24}$
email string required
Email address of the OTP user serving as the primary identity for authentication and one-time password delivery.
≤ 256 characters · Match pattern: ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$ · Format: email
allowedDownloadsNum integer required
Maximum number of downloads permitted for this OTP user where minus one indicates unlimited access.
≥ -9007199254740991 · ≤ 9007199254740991
lastLoginDate string required
Timestamp of the most recent OTP authentication event recorded for this user, nullable when no login has occurred.
lastDownloadDate string required
Timestamp of the most recent application download performed by this user, nullable when no download has occurred.
createdAt string required
Timestamp indicating when the OTP user record was initially created in the system for audit and tracking purposes.
updatedAt string required
Timestamp indicating when the OTP user record was last modified, reflecting the most recent configuration change.
{
    "status": true,
    "data": {
        "id": "string",
        "organizationId": "string",
        "storeId": "string",
        "publishedApplicationId": "string",
        "email": "[email protected]",
        "allowedDownloadsNum": 0,
        "lastLoginDate": "string",
        "lastDownloadDate": "string",
        "createdAt": "string",
        "updatedAt": "string"
    }
}
400 Response application/json
status boolean optional
false
error object optional
code number optional
6001
message string optional
Database Validation Error
{
    "status": false,
    "error": {
        "code": 6001,
        "message": "Database Validation Error"
    }
}
404 Response application/json
status boolean optional
false
error object optional
code number optional
3001
message string optional
Entity not found
{
    "status": false,
    "error": {
        "code": 3001,
        "message": "Entity not found"
    }
}