Favicon

You are here: Home > API Reference > Otpusers > Create OTP user

POST /organizations/:organizationSlug/stores/:storeId/otp-users/

Required Permission: mad.store.otpUsers.create

Create a new OTP user for the PubApp

POST
/v1/organizations/:organizationSlug/stores/:storeId/otp-users/
Copy to clipboard

Create OTP user

Required Permission: mad.store.otpUsers.create

Create a new OTP user for the PubApp

Request

Add parameter in header authorization
Example: Authorization: Bearer <token>
storeId string
required
Match pattern: ^[a-fA-F0-9]{24}$
Body Params application/json
email any required
allowedDownloadsNum integer required
≥ -9007199254740991 · ≤ 9007199254740991
publishedApplicationId string required
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
Match pattern: ^[a-fA-F0-9]{24}$
organizationId string required
Match pattern: ^[a-fA-F0-9]{24}$
storeId string required
Match pattern: ^[a-fA-F0-9]{24}$
publishedApplicationId string required
Match pattern: ^[a-fA-F0-9]{24}$
email string required
≤ 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
≥ -9007199254740991 · ≤ 9007199254740991
lastLoginDate string required
lastDownloadDate string required
createdAt string required
updatedAt string required
{
    "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"
    }
}