Skip to content

DID

DIDs represent any E164 number or address associated with the account.

Note: The API key provided in the Authorization header must have the apik_ prefix.

Schema

NameTypeDescription
idULIDUnique identifier for the DID
inserted_atString(format:datetime)Timestamp when the DID was created
mms_enabledBooleanWhether or not MMS is enabled on the DID
mms_statusEnum:StringThe enablement status of the MMS capabilities on the DID
numberString(format:e164)The number or address of the DID (unique)
sms_enabledBooleanWhether or not SMS is enabled on the DID
sms_statusEnum:StringThe enablement status of the SMS capabilities on the DID
updated_atString(format:datetime)Timestamp when the DID was last updated

Examples

List DIDs

Lists DIDs for immediate and all sub accounts.

Request:

GET https://api.swift-api.com/api/v1/dids HTTP/1.1
Accept: application/json, text/plain
Authorization: Bearer apik_ABC123

Response:

HTTP/1.1 200
Content-Type: application/json
Content-Length: 567
{
"data": {
"items": [
{
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT",
"inserted_at": "2024-06-14T00:00:00.000000Z",
"mms_enabled": true,
"mms_status": "UNAVAILABLE",
"number": "string",
"sms_enabled": true,
"sms_status": "UNAVAILABLE",
"updated_at": "2024-06-14T00:00:00.000000Z"
},
"type": "did"
}
],
"page_info": {
"after": "string",
"before": "string",
"limit": 0.0,
"total": 0.0
}
},
"type": "list"
}

Get DID

Retrieve a DID by ID.

Request:

GET https://api.swift-api.com/api/v1/dids/{id} HTTP/1.1
Accept: application/json, text/plain
Authorization: Bearer apik_ABC123

Response:

HTTP/1.1 200
Content-Type: application/json
Content-Length: 314
{
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT",
"inserted_at": "2024-06-14T00:00:00.000000Z",
"mms_enabled": true,
"mms_status": "UNAVAILABLE",
"number": "string",
"sms_enabled": true,
"sms_status": "UNAVAILABLE",
"updated_at": "2024-06-14T00:00:00.000000Z"
},
"type": "did"
}