GET/api/v1/numbers
Fake numbers your app sends from, with their webhooks.
- CLI
sendmock numbers list- MCP tool
sendmock_number_list- In the app
- Numbers
Answer
200 VirtualNumber[]
/api/v1/numbersFake numbers your app sends from, with their webhooks.
sendmock numbers listsendmock_number_list200 VirtualNumber[]
/api/v1/numbersAdd a number.
sendmock numbers addsendmock_number_upsertVirtualNumberInput : Body of POST and PATCH /api/v1/numbers.
| Field | Type | Description |
|---|---|---|
| number | string | E.164, without a channel prefix; channels says whether WhatsApp works.Example: +15550001111 |
| label | string | A name for the number, e.g. the app or feature that uses it.Example: Support line |
| channels | NumberChannel[] | Where the number works: sms, whatsapp or both.One of: sms, whatsapp |
| inbound_url | string | null | Reply webhook (Twilio "A message comes in"); null means rules only.Example: http://localhost:3000/sms/inbound |
| inbound_method | InboundWebhookMethod | The HTTP method of the reply webhook.One of: POST, GETExample: POST |
| inbound_fallback_url | string | null | Called when the reply webhook fails, with ErrorCode and ErrorUrl added, as Twilio does.Example: http://localhost:3000/sms/inbound-fallback |
| inbound_template_id | string | null | Payload template for the inbound webhook, e.g. twilio.inbound_sms.Example: twilio.inbound_sms |
| status_callback_url | string | null | Your app's URL for status changes of messages sent from this number.Example: http://localhost:3000/sms/status |
| messaging_service_sid | string | null | The Messaging Service this number belongs to, MG...; null for none.Example: MG00000000000000000000000000000001 |
201 VirtualNumber
Errors: 400, as { error: { code, message } }
/api/v1/numbers/{numberId}Change a number.
sendmock numbers update <numberId>sendmock_number_upsertVirtualNumberInput : Body of POST and PATCH /api/v1/numbers.
| Field | Type | Description |
|---|---|---|
| number | string | E.164, without a channel prefix; channels says whether WhatsApp works.Example: +15550001111 |
| label | string | A name for the number, e.g. the app or feature that uses it.Example: Support line |
| channels | NumberChannel[] | Where the number works: sms, whatsapp or both.One of: sms, whatsapp |
| inbound_url | string | null | Reply webhook (Twilio "A message comes in"); null means rules only.Example: http://localhost:3000/sms/inbound |
| inbound_method | InboundWebhookMethod | The HTTP method of the reply webhook.One of: POST, GETExample: POST |
| inbound_fallback_url | string | null | Called when the reply webhook fails, with ErrorCode and ErrorUrl added, as Twilio does.Example: http://localhost:3000/sms/inbound-fallback |
| inbound_template_id | string | null | Payload template for the inbound webhook, e.g. twilio.inbound_sms.Example: twilio.inbound_sms |
| status_callback_url | string | null | Your app's URL for status changes of messages sent from this number.Example: http://localhost:3000/sms/status |
| messaging_service_sid | string | null | The Messaging Service this number belongs to, MG...; null for none.Example: MG00000000000000000000000000000001 |
200 VirtualNumber
Errors: 400, 404, as { error: { code, message } }
/api/v1/numbers/{numberId}Delete a number.
sendmock numbers remove <numberId>sendmock_number_delete204 No content
/api/v1/messaging-servicesMessaging Services that pool numbers.
sendmock sms services listsendmock_messaging_service_list200 MessagingService[]
/api/v1/messaging-servicesAdd a Messaging Service.
sendmock sms services createsendmock_messaging_service_createMessagingServiceInput : Body of POST and PATCH /api/v1/messaging-services.
| Field | Type | Description |
|---|---|---|
| friendly_name | string | A name for the service.Example: Notifications |
| number_ids | Ulid[] | The virtual numbers in the sender pool, by ID. |
| inbound_mode | MessagingServiceInboundMode | What happens to inbound messages: webhook (call inbound_url), defer_to_sender (each number's own webhook) or drop.One of: webhook, defer_to_sender, dropExample: webhook |
| inbound_url | string | null | Used when inbound_mode is webhook.Example: http://localhost:3000/sms/inbound |
| inbound_fallback_url | string | null | Called when inbound_url fails.Example: http://localhost:3000/sms/inbound-fallback |
201 MessagingService
Errors: 400, as { error: { code, message } }
/api/v1/messaging-services/{serviceSid}Change a Messaging Service.
sendmock sms services update <serviceSid>sendmock_messaging_service_updateMessagingServiceInput : Body of POST and PATCH /api/v1/messaging-services.
| Field | Type | Description |
|---|---|---|
| friendly_name | string | A name for the service.Example: Notifications |
| number_ids | Ulid[] | The virtual numbers in the sender pool, by ID. |
| inbound_mode | MessagingServiceInboundMode | What happens to inbound messages: webhook (call inbound_url), defer_to_sender (each number's own webhook) or drop.One of: webhook, defer_to_sender, dropExample: webhook |
| inbound_url | string | null | Used when inbound_mode is webhook.Example: http://localhost:3000/sms/inbound |
| inbound_fallback_url | string | null | Called when inbound_url fails.Example: http://localhost:3000/sms/inbound-fallback |
200 MessagingService
Errors: 400, 404, as { error: { code, message } }
/api/v1/messaging-services/{serviceSid}Delete a Messaging Service.
sendmock sms services delete <serviceSid>sendmock_messaging_service_delete204 No content