OverviewPlatformsAPI ReferenceResources

Enable SMS on a number

POSThttps://zernio.com/api/v1/phone-numbers/{id}/sms

Turns on SMS for one of your numbers. Idempotent: re-running re-attempts any carrier-side setup that failed.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

idstringRequired

Phone number record ID (from GET /v1/phone-numbers).

Responses

Success· the request worked

Errors· the request failed

How it behaves

Carrier capability check

The number's real carrier capability is checked first:

  • smsCapable: false: the number type can't do SMS at all.
  • notReady: true: the number is still provisioning at the carrier; try again once provisioning finishes.

US registration

US numbers additionally need a carrier registration before messages deliver. The response tells you which path applies:

  • alreadyRegistered: true: a prior registration still covers this number; SMS was reactivated.
  • reusable set: you have an approved registration this number can join in one click via POST /v1/phone-numbers/{id}/sms/reuse-registration (no new brand/campaign, no extra carrier fee).
  • needsRegistration: true and no reusable: start one via POST /v1/sms/registrations.
POST/v1/phone-numbers/{id}/sms
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.sms.enableSmsOnNumber({  path: {    id: 'abc123',  },});console.log(data);
{  "enabled": true,  "id": "string",  "phoneNumber": "string",  "isActive": true,  "country": "string",  "smsCapable": true,  "mmsCapable": true,  "domesticOnly": true,  "notReady": true,  "needsRegistration": true,  "alreadyRegistered": true,  "registrationStatus": "pending",  "reusable": {    "registrationId": "string",    "status": "string"  },  "message": "string"}
OpenAPI specification
Was this page helpful?