[DELETE] Delete Session
You can refer this document when you want to delete data from a specific session. Session data, uploaded audio data, and analysis data will all be deleted. If the requested session data is deleted from the Asleep server, it will be difficult to provide specific evidence for the deleted session during future billing analysis.
Request
URL
DELETE https://api.asleep.ai/ai/v1/sessions/{session_id}
Header
| Field | Type | Required | Description |
|---|---|---|---|
| x-api-key | String | O | API Key |
| x-user-id | String | O | Issued user id |
Path parameter
| Field | Type | Required | Description |
|---|---|---|---|
| session_id | String | O | Created session id |
Example
curl "https://api.asleep.ai/ai/v1/sessions/{session_id}" -XDELETE \
-H "x-api-key: <YOUR_API_KEY>" \
-H "x-user-id: <USER_ID>"Response
204 No Content
- session corresponding to
session_idhas been successfully deleted
401 Unauthorized
x-user-idis empty or in an invalid format
{
"detail": "x-user-id is invalid"
}404 Not Found
- user corresponding to
x-user-iddoes not exist
{
"detail": "user does not exist"
}- session corresponding to
session_iddoes not exist
{
"detail": "session does not exist"
}Updated 5 months ago
