Skip to content

List SMS Numbers

GET /api/sms/numbers

This endpoint returns all SMS numbers available to the current user. This includes requested, active and disabled numbers.

Example

sh
curl --request GET \
     --url https://api.mailisk.com/api/sms/numbers \
     --header 'Accept: application/json' \
     --header 'X-Api-Key: {Api Key}'
js
const { data: numbers } = await mailisk.listSmsNumbers();

Response

json
{
  "total_count": 2,
  "data": [
    {
      "id": "13c4551e-a5be-4959-9ea5-82931dcfc74d",
      "organisation_id": "c02bdb84-22df-4c18-85ba-2defdd04eccb",
      "status": "requested",
      "country": "US",
      "created_at": "2020-11-22T16:59:25.462Z",
      "updated_at": "2020-11-22T16:59:25.462Z"
    },
    {
      "id": "6bf073d6-d333-45c9-b009-c77f0cac7657",
      "organisation_id": "ddec2c7b-b087-45b6-a81d-b195f25d457f",
      "status": "active",
      "country": "US",
      "phone_number": "+19285639871",
      "created_at": "2020-11-22T16:41:40.329Z",
      "updated_at": "2020-11-22T16:41:40.329Z"
    }
  ]
}

Request

None.

Response

Typescript type

typescript
interface SmsNumber {
  /** Unique identifier for the SMS number */
  id: string;
  /** Unique identifier for the organisation */
  organisation_id: string;
  /** Status of the SMS number */
  status: "requested" | "active" | "disabled";
  /** Country of the SMS number */
  country: string;
  /** SMS Phone number */
  phone_number?: string;
  /** Date and time the SMS number was created */
  created_at: string;
  /** Date and time the SMS number was updated */
  updated_at: string;
}