These docs are for v1.0. Click to read the latest docs for v2.0.

Delete User

You can use the user identifier to delete the user. All of the user's data will be deleted.

1. Request

1.1 URL

DELETE https://api.asleep.ai/ai/v1/users/{user_id}

1.2 Header

FieldTypeRequiredDescription
x-api-keyStringOAPI Key

1.3 Path Parameter

FieldTypeRequiredDescription
user_idStringOuser id

Example

curl "https://api.asleep.ai/ai/v1/users/{user_id}" -XDELETE \
  -H "x-api-key: <YOUR_API_KEY>"

2. Response

2.1 204 No Content

  • User deletion successful

2.2 401 Unauthorized

  • x-user-id header value is missing or in an incorrect format
{
  "detail": "invalid user id"
}

2.3 404 Not Found

  • User not found
{
  "detail": "user requested was not found"
}