Favicon

You are here: Home > API Reference > Platform > Otpusers > Create one or more OTP users

Create one or more OTP users

Required Permission: mad.store.otpUsers.create

Provisions OTP user accounts and associates them with a published application.

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

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

response = requests.post(
    "https://api.applivery.io/v1/organizations/{organizationSlug}/stores/{storeId}/otp-users",
    headers={"Authorization": "Bearer <YOUR_API_KEY>"},
    json={
      "email": "[email protected]",
      "allowedDownloadsNum": 0,
      "publishedApplicationId": "string"
    },
)

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}$

Body Params application/json
email any required
Email address of the OTP user serving as the primary identity for authentication and one-time password delivery.
allowedDownloadsNum integer required
Maximum number of downloads permitted for this OTP user where minus one indicates unlimited access.
≥ -9007199254740991 · ≤ 9007199254740991
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": "[email protected]",
    "allowedDownloadsNum": 0,
    "publishedApplicationId": "string"
}

Responses

200 Response application/json
status boolean required
data array [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
5017
message string optional
Limit Exceeded
{
    "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"
    }
}