Dashboard Sign InKR

[DELETE] Delete All Sessions

Use this method when you want to delete all data of a specific user. This includes all sessions, uploaded audio data, and analysis data. Please note that if the requested session data is successfully deleted from the Asleep server, providing detailed evidence of the deleted sessions for future billing analysis may be difficult.

Request

URL

DELETE https://api.asleep.ai/ai/v1/sessions

Header

FieldTypeRequiredDescription
x-api-keyStringOAPI Key
x-user-idStringOIssued user id

Example

curl "https://api.asleep.ai/ai/v1/sessions" -XDELETE \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "x-user-id: <USER_ID>"

Response

204 No Content

  • all sessions of the user have been successfully deleted

401 Unauthorized

  • x-user-id is empty or in an invalid format
{
  "detail": "x-user-id is invalid"
}

404 Not Found

  • user corresponding to x-user-id does not exist
{
  "detail": "user does not exist"
}