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
| Name | Type | Description |
|---|---|---|
| id | ULID | Unique identifier for the DID |
| inserted_at | String(format:datetime) | Timestamp when the DID was created |
| mms_enabled | Boolean | Whether or not MMS is enabled on the DID |
| mms_status | Enum:String | The enablement status of the MMS capabilities on the DID |
| number | String(format:e164) | The number or address of the DID (unique) |
| sms_enabled | Boolean | Whether or not SMS is enabled on the DID |
| sms_status | Enum:String | The enablement status of the SMS capabilities on the DID |
| updated_at | String(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.1Accept: application/json, text/plainAuthorization: Bearer apik_ABC123Response:
HTTP/1.1 200Content-Type: application/jsonContent-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.1Accept: application/json, text/plainAuthorization: Bearer apik_ABC123Response:
HTTP/1.1 200Content-Type: application/jsonContent-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"}