Skip to content

DID

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

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

See Ordering to add new numbers to your account.

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. Possible values are UNAVAILABLE, PENDING, and AVAILABLE.
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. Possible values are UNAVAILABLE, PENDING, and AVAILABLE.
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": "AVAILABLE",
"number": "17055551234",
"sms_enabled": true,
"sms_status": "AVAILABLE",
"updated_at": "2024-06-14T00:00:00.000000Z"
},
"type": "did"
}
],
"page_info": {
"after": "string",
"before": "string",
"limit": 0.0,
"total": 0.0
}
},
"type": "list"
}

List DIDs for account

Lists all the DIDs under the specified account.

Request:

GET https://api.swift-api.com/api/v1/accounts/{account_id}/dids 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": {
"items": [
{
"associations": {
"account": {
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT"
},
"type": "account"
},
"auto_response": {
"data": {
"id": null
},
"type": "messaging_auto_response"
},
"csp_campaign": {
"data": {
"id": null
},
"type": "csp_campaign"
},
"group": {
"data": {
"id": null
},
"type": "did_group"
},
"switch": {
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT"
},
"type": "switch"
}
},
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT",
"inserted_at": "2026-01-13T14:31:21.273062Z",
"mms_enabled": true,
"mms_rate_ms": null,
"mms_status": "AVAILABLE",
"number": "17055551234",
"sms_enabled": true,
"sms_rate_ms": null,
"sms_status": "AVAILABLE",
"updated_at": "2026-02-16T18:05:16.017701Z"
},
"type": "did"
},
{
"associations": {
"account": {
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT"
},
"type": "account"
},
"auto_response": {
"data": {
"id": null
},
"type": "messaging_auto_response"
},
"csp_campaign": {
"data": {
"id": null
},
"type": "csp_campaign"
},
"group": {
"data": {
"id": null
},
"type": "did_group"
},
"switch": {
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT"
},
"type": "switch"
}
},
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT",
"inserted_at": "2026-01-13T14:31:21.273062Z",
"mms_enabled": true,
"mms_rate_ms": null,
"mms_status": "AVAILABLE",
"number": "17055551235",
"sms_enabled": true,
"sms_rate_ms": null,
"sms_status": "AVAILABLE",
"updated_at": "2026-02-16T18:05:16.017701Z"
},
"type": "did"
}
],
"page_info": {
"after": "string",
"before": "string",
"limit": 0.0,
"total": 0.0
}
},
"type": "list"
}

Get DID

Retrieve a DID by its 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
{
"associations": {
"account": {
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT"
},
"type": "account"
},
"auto_response": {
"data": {
"id": null
},
"type": "messaging_auto_response"
},
"csp_campaign": {
"data": {
"id": null
},
"type": "csp_campaign"
},
"group": {
"data": {
"id": null
},
"type": "did_group"
},
"switch": {
"data": {
"id": null
},
"type": "switch"
}
},
"data": {
"id": "01J0CRVTXX9KBD9NWS02R5R8RT",
"inserted_at": "2026-01-13T14:31:21.273062Z",
"mms_enabled": true,
"mms_rate_ms": null,
"mms_status": "AVAILABLE",
"number": "17055551235",
"sms_enabled": true,
"sms_rate_ms": null,
"sms_status": "AVAILABLE",
"updated_at": "2026-02-16T18:05:16.017701Z"
},
"type": "did"
}