Twilio
Request Body
application/x-www-form-urlencoded
TypeScript Definitions
Use the request body type in TypeScript.
URL-encoded form data from Twilio
Response Body
application/json
curl -X POST "https://example.com/api/twilio" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'string'{ "success": true, "message": "string"}Sends an SMS message from a restaurant phone number. Restricted to Super Admin/Agent. Automatically resolves and uses the restaurant's custom credentials or falls back to platform credentials with error 21606 handling.
Header Parameters
Super Admin/Agent secret key
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/twilio/send-message" \ -H "x-agent-secret: string" \ -H "Content-Type: application/json" \ -d '{ "from": "string", "to": "string", "message": "string" }'{ "success": true, "messageSid": "string", "fallbackUsed": true}Authorization
bearerAuth In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/api/twilio/my-available-numbers"{ "success": true, "numbers": [ { "phone_number": "string", "friendly_name": "string", "region": "string", "locality": "string", "iso_country": "string", "capabilities": { "voice": true, "sms": true, "mms": true } } ], "mock": true}Provisions a phone number on the restaurant's own Twilio account and saves it to their profile.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/twilio/my-purchase-number" \ -H "Content-Type: application/json" \ -d '{ "phoneNumber": "string" }'{ "success": true, "phone_number": "string", "friendly_name": "string", "sid": "string"}Authorization
bearerAuth In: header
Response Body
application/json
application/json
curl -X GET "https://example.com/api/twilio/my-incoming-numbers"{ "success": true, "numbers": [ { "phone_number": "string", "friendly_name": "string", "sid": "string" } ]}Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/twilio/available-numbers"{ "success": true, "numbers": [ { "phone_number": "string", "friendly_name": "string", "region": "string", "locality": "string", "iso_country": "string", "capabilities": { "voice": true, "sms": true, "mms": true } } ], "mock": true}Provisions a phone number on Twilio and configures VoiceUrl/SmsUrl from server environment variables.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/api/twilio/purchase-number" \ -H "Content-Type: application/json" \ -d '{ "phoneNumber": "string" }'{ "success": true, "phone_number": "string", "friendly_name": "string", "sid": "string", "voice_url": "string", "sms_url": "string", "mock": true}