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.
1. Request
2.1 URL
POST
https://api.asleep.ai/ai/v1/users
2.2 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>"
2. Response
2.1 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 over 1 year ago