[POST] Create User
Generates an identifier (user id) for the user to record sleep, and one can use this identifier to continuously manage the user's sleep.
The identifier of the generated user can be stored and managed in the appropriate storage of the customer for continuous use.
Request
URL
POST
https://api.asleep.ai/ai/v1/users
Header
Parameter | Type | Required | Description |
---|---|---|---|
x-api-key | String | O | API Key |
Example
curl "https://api.asleep.ai/ai/v1/users" -XPOST \
-H "x-api-key: <YOUR_API_KEY>"
Response
201 Created
- User Identifier Creation Successful
Body (result field)
Field | Type | Description |
---|---|---|
user_id | String | user id |
{
"detail": "success",
"result": {
"user_id": "<USER_ID>"
}
}
Updated 11 days ago