Delete Single Session Data
Use this API to delete the data of a specific session. Deleting a session will remove all session data, uploaded audio data, and analysis data. Please note that if the requested session data is successfully deleted from the Asleep server, it may be difficult to provide specific evidence regarding the deleted session during future billing usage analysis.
1. Request
1.1 URL
DELETE
https://api.asleep.ai/ai/v1/sessions/{session_id}
1.2 Header
Field | Type | Required | Description |
---|---|---|---|
x-api-key | String | O | API Key |
x-user-id | String | O | Issued user id |
1.3 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>"
2. Response
2.1 204 No Content
- Session deletion successful (No Response Body)
2.2 401 Unauthorized
x-user-id
header value is missing or incorrect format
{
"detail": "invalid user id"
}
2.3 404 Not Found
- User does not exist
{
"detail": "user not exist"
}
- Session does not exist
{
"detail": "session does not exist"
}
Updated about 1 year ago