Purge Interactions
Authorization
You must be authorized to purge calls to use these APIs. If you need this permission, submit a request.
To request a bearer token, reference the Authorization Token article.
Purge Interactions
There are three APIs available to purge calls.
The Call ID and Session ID APIs use the same request. Both of these APIs can handle up to 100 IDs per request.
The Customer API uses the customer phone's number and/or email instead of a call or session ID.
Call ID
URL: https://[INSTANCE NAME].audio.tethr.com/interactions/v2/purge
| Attribute | Type | Description |
|---|---|---|
| ids | array | List of Call IDs to purge |
Single call purge example
POST https://<<INSTANCE NAME>>.audio.tethr.com/interactions/v2/purge HTTP/1.1
Authorization: Bearer <<YOUR_TOKEN>>
Content-Type: application/json; charset=utf-8
{
"ids": [
"callId"
]
}Response
{
"items": [
{
"id": "callId",
"sessionId": "sessionId",
"status": "Purging"
}
]
}
Multiple call purge example
POST https://<<INSTANCE NAME>>.audio.tethr.com/interactions/v2/purge HTTP/1.1
Authorization: Bearer <<YOUR_TOKEN>>
Content-Type: application/json; charset=utf-8
{
"ids": [
"callId1",
"callId2",
"badCallId"
]
}
Response
{
"items": [
{
"id": "callId1",
"sessionId": "sessionId1",
"status": "Purging"
},
{
"id": "callId2",
"sessionId": "sessionId2",
"status": "Purging"
},
{
"id": "callId3",
"status": "NotFound"
}
]
}Session ID
URL: https://[INSTANCE NAME].audio.tethr.com/interactions/v2/purge/sessions
| Attribute | Type | Description |
|---|---|---|
| ids | array | List of Session IDs to purge |
Single call purge example
POST https://<<INSTANCE NAME>>.audio.tethr.com/interactions/v2/purge/sessions HTTP/1.1
Authorization: Bearer <<YOUR_TOKEN>>
Content-Type: application/json; charset=utf-8
{
"ids": [
"sessionId"
]
}
Response
{
"items": [
{
"id": "callId",
"sessionId": "sessionId",
"status": "Purging"
}
]
}
Multiple call purge example
POST https://<<INSTANCE NAME>>.audio.tethr.com/interactions/v2/purge/sessions HTTP/1.1
Authorization: Bearer <<YOUR_TOKEN>>
Content-Type: application/json; charset=utf-8
{
"ids": [
"sessionId1",
"sessionId2",
"badSessionId"
]
}
Response
{
"items": [
{
"id": "callId1",
"sessionId": "sessionId1",
"status": "Purging"
},
{
"id": "callId1",
"sessionId": "sessionId2",
"status": "Purging"
},
{
"id": "callId1",
"status": "NotFound"
}
]
}Customer
URL: https://[INSTANCE NAME].audio.tethr.com/interactions/v2/purge/customer
| Attribute | Type | Description |
|---|---|---|
| phoneNumber | string | Customer's phone number |
Single phone number purge example
POST https://<<INSTANCE NAME>>.audio.tethr.com/interactions/v2/purge/customer HTTP/1.1
Authorization: Bearer <<YOUR_TOKEN>>
Content-Type: application/json; charset=utf-8
{
"phoneNumber": "+123456789"
}
Response
{
"items": [
{
"id": "callId",
"sessionId": "sessionId",
"status": "Purging"
}
]
}Use the whatIf=true URL query parameter to return a list of interactions that would be purged. Only valid for the customer endpoint
Responses
| Attribute | Type | Description |
|---|---|---|
| callId | string | Call ID |
| sessionId | string | Session ID |
| status | string | Status of purge request |
| ||
| errorMsg | string | Any applicable error message |
Use the call status API to see if the purging was complete.
Articles in this section
