Dashboard Sign InKR

[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

ParameterTypeRequiredDescription
x-api-keyStringOAPI 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)

FieldTypeDescription
user_idStringuser id
{
  "detail": "success",
  "result": {
    "user_id": "<USER_ID>"
  }
}