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

AttributeTypeDescription
idsarrayList 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

AttributeTypeDescription
idsarrayList 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

AttributeTypeDescription
phoneNumberstringCustomer'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"
        }
    ]
}


Responses

AttributeTypeDescription
callIdstringCall ID
sessionIdstringSession ID
statusstringStatus of purge request
  
  • Purging: the call is in the process of being purged.
  • NotFound: the call may have already been purged or an invalid ID was supplied.
  • Error: an error occurred (see supplied error message).
errorMsgstringAny applicable error message

Articles in this section


Was this article helpful?