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

Delete All Session Data

This endpoint is used to delete all data of a specific user. This includes all sessions, uploaded audio data, and analysis data. Please note that once the data is deleted from the Asleep server upon the request to delete all session data, providing specific evidence for the deleted sessions during billing analysis becomes difficult.

1. Request

1.1 URL

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

1.2 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>"

2. Response

2.1 204 No Content

  • Deletion successful (No Response Body)

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 does not exist
{
  "detail": "user not exist"
}