[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
Field | Type | Required | Description |
---|---|---|---|
x-api-key | String | O | API Key |
x-user-id | String | O | Issued 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"
}
Updated 13 days ago