openapi: 3.0.3 info: title: 'MobSMS Gateway API' description: 'Send and track SMS through your own Android gateway devices over a simple REST API.' version: 1.0.0 servers: - url: 'https://api.mobsms.cloud' tags: - name: 'API Keys' description: "\nCreate and revoke the API keys used to authenticate API requests." - name: Account description: "\nAccount overview: balance, usage and spend." - name: App description: "\nSelf-update feed for the Android gateway app. The app polls `latest` on\nlaunch (and periodically) and installs the APK when the server build is\nnewer than its own version code." - name: Authentication description: "\nObtain a token for the dashboard/app. For server-to-server API access, create\na long-lived API key under \"API Keys\" instead." - name: Contacts description: "\nManage your address book. Contacts can belong to one or more groups and are\nused as bulk-SMS recipients." - name: Devices description: "\nList your gateway devices. Sending does not require a device id — it's used\nonly if you want to target a specific device." - name: SMS description: "\nSend SMS and read message history & delivery status." - name: Settings description: "\nAccount-level preferences." - name: Subscription description: "\nPremium plan status, pricing, crypto-payment details, and promo-code redemption." - name: Webhooks description: "\nRegister callback URLs to receive incoming-SMS and delivery-status events." components: securitySchemes: default: type: http scheme: bearer description: 'Create an API key in your dashboard under Developers → API keys, then send it as Authorization: Bearer YOUR_API_KEY.' security: - default: [] paths: /api/tokens: get: summary: "List the user's API keys (never returns the plaintext token)." operationId: listTheUsersAPIKeysneverReturnsThePlaintextToken description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - id: 5 name: 'Production server' abilities: - '*' last_used_at: '2026-06-08T10:00:00.000000Z' created_at: '2026-06-01T09:00:00.000000Z' properties: success: type: boolean example: true data: type: array example: - id: 5 name: 'Production server' abilities: - '*' last_used_at: '2026-06-08T10:00:00.000000Z' created_at: '2026-06-01T09:00:00.000000Z' items: type: object properties: id: type: integer example: 5 name: type: string example: 'Production server' abilities: type: array example: - '*' items: type: string last_used_at: type: string example: '2026-06-08T10:00:00.000000Z' created_at: type: string example: '2026-06-01T09:00:00.000000Z' tags: - 'API Keys' post: summary: 'Create a new API key. The plaintext token is returned ONCE.' operationId: createANewAPIKeyThePlaintextTokenIsReturnedONCE description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: success: true message: 'API key created. Copy it now — it will not be shown again.' data: id: 6 name: 'Production server' token: 6|aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789 created_at: '2026-06-08T10:00:00.000000Z' properties: success: type: boolean example: true message: type: string example: 'API key created. Copy it now — it will not be shown again.' data: type: object properties: id: type: integer example: 6 name: type: string example: 'Production server' token: type: string example: 6|aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789 created_at: type: string example: '2026-06-08T10:00:00.000000Z' tags: - 'API Keys' requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Must not be greater than 255 characters.' example: b abilities: type: array description: '' example: - architecto items: type: string required: - name '/api/tokens/{id}': delete: summary: 'Revoke (delete) an API key the user owns.' operationId: revokedeleteAnAPIKeyTheUserOwns description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'API key revoked' properties: success: type: boolean example: true message: type: string example: 'API key revoked' tags: - 'API Keys' parameters: - in: path name: id description: 'The ID of the token.' example: architecto required: true schema: type: string /api/account: get: summary: "Display the authenticated user's account overview." operationId: displayTheAuthenticatedUsersAccountOverview description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: user: id: 1 name: Ali email: ali@example.com balance: 0 sms_rate: 100 usage: total_sms: 1200 total_spent: 120000 today_sms: 8 today_spent: 800 month_sms: 240 month_spent: 24000 stats: total_sent: 1100 total_delivered: 1050 total_failed: 50 total_pending: 0 total_received: 30 devices: 2 active_devices: 1 subscription: plan: premium is_premium: true premium_expires_at: '2027-06-08T00:00:00.000000Z' prices: monthly: 5 yearly: 50 currency: USD features: - api - webhooks - bulk properties: success: type: boolean example: true data: type: object properties: user: type: object properties: id: type: integer example: 1 name: type: string example: Ali email: type: string example: ali@example.com balance: type: integer example: 0 sms_rate: type: integer example: 100 usage: type: object properties: total_sms: type: integer example: 1200 total_spent: type: integer example: 120000 today_sms: type: integer example: 8 today_spent: type: integer example: 800 month_sms: type: integer example: 240 month_spent: type: integer example: 24000 stats: type: object properties: total_sent: type: integer example: 1100 total_delivered: type: integer example: 1050 total_failed: type: integer example: 50 total_pending: type: integer example: 0 total_received: type: integer example: 30 devices: type: integer example: 2 active_devices: type: integer example: 1 subscription: type: object properties: plan: type: string example: premium is_premium: type: boolean example: true premium_expires_at: type: string example: '2027-06-08T00:00:00.000000Z' prices: type: object properties: monthly: type: integer example: 5 yearly: type: integer example: 50 currency: type: string example: USD features: type: array example: - api - webhooks - bulk items: type: string tags: - Account /api/balance: get: summary: "Display the authenticated user's account overview." operationId: displayTheAuthenticatedUsersAccountOverview description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: user: id: 1 name: Ali email: ali@example.com balance: 0 sms_rate: 100 usage: total_sms: 1200 total_spent: 120000 today_sms: 8 today_spent: 800 month_sms: 240 month_spent: 24000 stats: total_sent: 1100 total_delivered: 1050 total_failed: 50 total_pending: 0 total_received: 30 devices: 2 active_devices: 1 subscription: plan: premium is_premium: true premium_expires_at: '2027-06-08T00:00:00.000000Z' prices: monthly: 5 yearly: 50 currency: USD features: - api - webhooks - bulk properties: success: type: boolean example: true data: type: object properties: user: type: object properties: id: type: integer example: 1 name: type: string example: Ali email: type: string example: ali@example.com balance: type: integer example: 0 sms_rate: type: integer example: 100 usage: type: object properties: total_sms: type: integer example: 1200 total_spent: type: integer example: 120000 today_sms: type: integer example: 8 today_spent: type: integer example: 800 month_sms: type: integer example: 240 month_spent: type: integer example: 24000 stats: type: object properties: total_sent: type: integer example: 1100 total_delivered: type: integer example: 1050 total_failed: type: integer example: 50 total_pending: type: integer example: 0 total_received: type: integer example: 30 devices: type: integer example: 2 active_devices: type: integer example: 1 subscription: type: object properties: plan: type: string example: premium is_premium: type: boolean example: true premium_expires_at: type: string example: '2027-06-08T00:00:00.000000Z' prices: type: object properties: monthly: type: integer example: 5 yearly: type: integer example: 50 currency: type: string example: USD features: type: array example: - api - webhooks - bulk items: type: string tags: - Account /api/app/latest: get: summary: 'Latest gateway-app release.' operationId: latestGatewayAppRelease description: "Returns the newest active release. The app compares `version_code`\nagainst its own build number and prompts an update when this is higher.\n`data` is null when no release is published." parameters: [] responses: 200: description: '' content: application/json: schema: oneOf: - description: '' type: object example: success: true data: version_name: 1.0.1 version_code: 2 release_notes: 'Bug fixes and a faster send queue.' mandatory: false apk_url: 'https://api.mobsms.cloud/api/app/download/3' apk_size: 27418624 properties: success: type: boolean example: true data: type: object properties: version_name: type: string example: 1.0.1 version_code: type: integer example: 2 release_notes: type: string example: 'Bug fixes and a faster send queue.' mandatory: type: boolean example: false apk_url: type: string example: 'https://api.mobsms.cloud/api/app/download/3' apk_size: type: integer example: 27418624 - description: 'no release published' type: object example: success: true data: null properties: success: type: boolean example: true data: type: string example: null nullable: true tags: - App security: [] /api/login: post: summary: Login operationId: login description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: token: 9|aBcDeF...plaintext user: id: 1 name: Ali email: you@example.com token_type: Bearer message: 'Login successful' properties: success: type: boolean example: true data: type: object properties: token: type: string example: 9|aBcDeF...plaintext user: type: object properties: id: type: integer example: 1 name: type: string example: Ali email: type: string example: you@example.com token_type: type: string example: Bearer message: type: string example: 'Login successful' 401: description: '' content: application/json: schema: type: object example: success: false message: 'Invalid credentials' properties: success: type: boolean example: false message: type: string example: 'Invalid credentials' tags: - Authentication requestBody: required: true content: application/json: schema: type: object properties: email: type: string description: 'The account email.' example: you@example.com password: type: string description: 'The account password.' example: secret123 required: - email - password security: [] /api/register: post: summary: '' operationId: postApiRegister description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: success: true data: token: 10|aBcDeF...plaintext user: id: 2 name: 'Ali Valiyev' email: ali@example.com token_type: Bearer message: 'Registration successful' properties: success: type: boolean example: true data: type: object properties: token: type: string example: 10|aBcDeF...plaintext user: type: object properties: id: type: integer example: 2 name: type: string example: 'Ali Valiyev' email: type: string example: ali@example.com token_type: type: string example: Bearer message: type: string example: 'Registration successful' tags: - Authentication requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'Your name.' example: 'Ali Valiyev' email: type: string description: 'A unique email.' example: ali@example.com password: type: string description: 'At least 6 chars; must match password_confirmation.' example: secret123 password_confirmation: type: string description: 'Repeat of password.' example: secret123 required: - name - email - password - password_confirmation security: [] /api/auth/google: post: summary: 'Sign in with Google (GIS / ID-token flow).' operationId: signInWithGoogleGISIDTokenFlow description: "The frontend obtains an ID token from Google Identity Services and posts\nit here. We verify it against Google's tokeninfo endpoint (validates the\nsignature + expiry), check the audience/issuer, then link-by-email or\ncreate the user and issue a Sanctum token." parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: token: 11|aBcDeF...plaintext user: id: 3 name: Ali email: ali@gmail.com token_type: Bearer message: 'Login successful' properties: success: type: boolean example: true data: type: object properties: token: type: string example: 11|aBcDeF...plaintext user: type: object properties: id: type: integer example: 3 name: type: string example: Ali email: type: string example: ali@gmail.com token_type: type: string example: Bearer message: type: string example: 'Login successful' 401: description: '' content: application/json: schema: type: object example: success: false message: 'Invalid Google token' properties: success: type: boolean example: false message: type: string example: 'Invalid Google token' tags: - Authentication requestBody: required: true content: application/json: schema: type: object properties: id_token: type: string description: '' example: architecto required: - id_token security: [] /api/logout: post: summary: 'Logout user' operationId: logoutUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Logout successful' properties: success: type: boolean example: true message: type: string example: 'Logout successful' tags: - Authentication /api/user: get: summary: 'Get authenticated user' operationId: getAuthenticatedUser description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: id: 1 name: Ali email: ali@example.com plan: premium premium_expires_at: '2027-06-08T00:00:00.000000Z' properties: success: type: boolean example: true data: type: object properties: id: type: integer example: 1 name: type: string example: Ali email: type: string example: ali@example.com plan: type: string example: premium premium_expires_at: type: string example: '2027-06-08T00:00:00.000000Z' tags: - Authentication /api/contacts/import: post: summary: 'Bulk-import contacts (e.g. from a parsed CSV).' operationId: bulkImportContactsegFromAParsedCSV description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: success: true data: imported: 42 skipped: 3 message: 'Imported 42 contacts' properties: success: type: boolean example: true data: type: object properties: imported: type: integer example: 42 skipped: type: integer example: 3 message: type: string example: 'Imported 42 contacts' tags: - Contacts requestBody: required: true content: application/json: schema: type: object properties: contacts: type: array description: 'The rows to import. Each needs at least `phone_number`.' example: - name: Ali phone_number: '+998901112233' items: type: object properties: name: type: string description: 'Must not be greater than 255 characters.' example: 'n' nullable: true phone_number: type: string description: 'Must not be greater than 32 characters.' example: g nullable: true email: type: string description: 'Must not be greater than 255 characters.' example: rowan.gulgowski@example.com nullable: true notes: type: string description: 'Must not be greater than 1000 characters.' example: d nullable: true group_id: type: integer description: 'Optional group to add every imported contact to.' example: 10 nullable: true required: - contacts /api/devices: get: summary: 'Display a listing of the resource.' operationId: displayAListingOfTheResource description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: - id: 5 device_id: abc123 device_name: 'Pixel 7' phone_number: '+998901234567' is_active: true is_default: true sms_rate: 100 send_delay_seconds: 0 default_sim_slot: 0 properties: success: type: boolean example: true data: type: array example: - id: 5 device_id: abc123 device_name: 'Pixel 7' phone_number: '+998901234567' is_active: true is_default: true sms_rate: 100 send_delay_seconds: 0 default_sim_slot: 0 items: type: object properties: id: type: integer example: 5 device_id: type: string example: abc123 device_name: type: string example: 'Pixel 7' phone_number: type: string example: '+998901234567' is_active: type: boolean example: true is_default: type: boolean example: true sms_rate: type: integer example: 100 send_delay_seconds: type: integer example: 0 default_sim_slot: type: integer example: 0 tags: - Devices /api/devices/default-device: post: summary: "Set the user's default device (used when an API send omits device_id)." operationId: setTheUsersDefaultDeviceusedWhenAnAPISendOmitsDeviceId description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: id: 5 device_name: 'Pixel 7' is_default: true message: 'Default device updated successfully' properties: success: type: boolean example: true data: type: object properties: id: type: integer example: 5 device_name: type: string example: 'Pixel 7' is_default: type: boolean example: true message: type: string example: 'Default device updated successfully' tags: - Devices requestBody: required: true content: application/json: schema: type: object properties: device_id: type: string description: '' example: architecto required: - device_id /api/sms/bulk: post: summary: 'Send bulk SMS' operationId: sendBulkSMS description: '' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: success: true data: - id: 201 message_id: uuid-1 recipient_number: '+998901112233' status: pending price: 100 is_charged: false direction: outbound message: 'Bulk SMS queued for sending' properties: success: type: boolean example: true data: type: array example: - id: 201 message_id: uuid-1 recipient_number: '+998901112233' status: pending price: 100 is_charged: false direction: outbound items: type: object properties: id: type: integer example: 201 message_id: type: string example: uuid-1 recipient_number: type: string example: '+998901112233' status: type: string example: pending price: type: integer example: 100 is_charged: type: boolean example: false direction: type: string example: outbound message: type: string example: 'Bulk SMS queued for sending' 422: description: '' content: application/json: schema: type: object example: success: false message: 'No active device available' properties: success: type: boolean example: false message: type: string example: 'No active device available' tags: - SMS requestBody: required: true content: application/json: schema: type: object properties: message: type: string description: "The message text (max 1600). Use `{name}` to insert each recipient's name." example: 'Hi {name}, your code is 1234' recipients: type: array description: 'Recipients. Each item is a phone number string, or an object `{ "number": "+998...", "name": "Ali" }` for personalisation.' example: - '+998901234567' items: type: string device_id: type: string description: 'Optional. "active" broadcasts across all active devices (round-robin); omit to use your default device; or a specific device id.' example: active nullable: true price: type: number description: 'Must be at least 0.' example: 27 nullable: true my_id: type: string description: 'Optional client reference id.' example: campaign-7 nullable: true required: - message - recipients /api/sms/delivery-stats: get: summary: 'Delivery statistics' operationId: deliveryStatistics description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: today: sent: 8 delivered: 7 failed: 1 delivery_rate: 87.5 this_week: sent: 40 delivered: 38 delivery_rate: 95 this_month: sent: 240 delivered: 230 delivery_rate: 95.8 message: 'Delivery statistics retrieved successfully' properties: success: type: boolean example: true data: type: object properties: today: type: object properties: sent: type: integer example: 8 delivered: type: integer example: 7 failed: type: integer example: 1 delivery_rate: type: number example: 87.5 this_week: type: object properties: sent: type: integer example: 40 delivered: type: integer example: 38 delivery_rate: type: integer example: 95 this_month: type: object properties: sent: type: integer example: 240 delivered: type: integer example: 230 delivery_rate: type: number example: 95.8 message: type: string example: 'Delivery statistics retrieved successfully' tags: - SMS /api/sms/outbox: get: summary: 'List outbound (sent) messages.' operationId: listOutboundsentMessages description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - id: 101 recipient_number: '+998901234567' message: Hello status: delivered price: 100 is_charged: false created_at: '2026-06-08T10:00:00.000000Z' per_page: 50 total: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - id: 101 recipient_number: '+998901234567' message: Hello status: delivered price: 100 is_charged: false created_at: '2026-06-08T10:00:00.000000Z' items: type: object properties: id: type: integer example: 101 recipient_number: type: string example: '+998901234567' message: type: string example: Hello status: type: string example: delivered price: type: integer example: 100 is_charged: type: boolean example: false created_at: type: string example: '2026-06-08T10:00:00.000000Z' per_page: type: integer example: 50 total: type: integer example: 1 tags: - SMS /api/sms/inbox: get: summary: 'List inbound (received) messages.' operationId: listInboundreceivedMessages description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - id: 55 sender_number: '+998907778899' message: 'Reply text' status: received direction: inbound created_at: '2026-06-08T09:00:00.000000Z' per_page: 50 total: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - id: 55 sender_number: '+998907778899' message: 'Reply text' status: received direction: inbound created_at: '2026-06-08T09:00:00.000000Z' items: type: object properties: id: type: integer example: 55 sender_number: type: string example: '+998907778899' message: type: string example: 'Reply text' status: type: string example: received direction: type: string example: inbound created_at: type: string example: '2026-06-08T09:00:00.000000Z' per_page: type: integer example: 50 total: type: integer example: 1 tags: - SMS '/api/sms/{id}/cancel': post: summary: 'Cancel a pending outbound message.' operationId: cancelAPendingOutboundMessage description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: id: 101 status: cancelled message: 'SMS cancelled successfully' properties: success: type: boolean example: true data: type: object properties: id: type: integer example: 101 status: type: string example: cancelled message: type: string example: 'SMS cancelled successfully' 422: description: '' content: application/json: schema: type: object example: success: false message: 'Only pending messages can be cancelled' properties: success: type: boolean example: false message: type: string example: 'Only pending messages can be cancelled' tags: - SMS parameters: - in: path name: id description: 'The ID of the sms.' example: architecto required: true schema: type: string /api/sms: get: summary: 'List messages' operationId: listMessages description: 'Paginated message history (newest first), filterable.' parameters: - in: query name: direction description: 'Filter by `inbound` or `outbound`.' example: outbound required: false schema: type: string description: 'Filter by `inbound` or `outbound`.' example: outbound - in: query name: status description: 'Filter by status (pending, sent, delivered, failed).' example: delivered required: false schema: type: string description: 'Filter by status (pending, sent, delivered, failed).' example: delivered - in: query name: device_id description: 'Filter by device id.' example: 5 required: false schema: type: integer description: 'Filter by device id.' example: 5 - in: query name: page description: 'Page number.' example: 1 required: false schema: type: integer description: 'Page number.' example: 1 responses: 200: description: '' content: application/json: schema: type: object example: success: true data: current_page: 1 data: - id: 101 message_id: 9f1c-uuid recipient_number: '+998901234567' sender_number: '+998901112233' message: Hello direction: outbound status: delivered price: 100 is_charged: false sent_at: '2026-06-08T10:00:01.000000Z' delivered_at: '2026-06-08T10:00:05.000000Z' created_at: '2026-06-08T10:00:00.000000Z' per_page: 50 total: 1 properties: success: type: boolean example: true data: type: object properties: current_page: type: integer example: 1 data: type: array example: - id: 101 message_id: 9f1c-uuid recipient_number: '+998901234567' sender_number: '+998901112233' message: Hello direction: outbound status: delivered price: 100 is_charged: false sent_at: '2026-06-08T10:00:01.000000Z' delivered_at: '2026-06-08T10:00:05.000000Z' created_at: '2026-06-08T10:00:00.000000Z' items: type: object properties: id: type: integer example: 101 message_id: type: string example: 9f1c-uuid recipient_number: type: string example: '+998901234567' sender_number: type: string example: '+998901112233' message: type: string example: Hello direction: type: string example: outbound status: type: string example: delivered price: type: integer example: 100 is_charged: type: boolean example: false sent_at: type: string example: '2026-06-08T10:00:01.000000Z' delivered_at: type: string example: '2026-06-08T10:00:05.000000Z' created_at: type: string example: '2026-06-08T10:00:00.000000Z' per_page: type: integer example: 50 total: type: integer example: 1 tags: - SMS post: summary: 'Send an SMS' operationId: sendAnSMS description: 'Queues a single SMS to be sent from your active gateway device.' parameters: [] responses: 201: description: '' content: application/json: schema: type: object example: success: true message: 'SMS queued for sending' data: id: 101 message_id: 9f1c...uuid recipient_number: '+998901234567' status: pending price: 100 is_charged: false direction: outbound callback_url: 'https://example.com/sms/callback' properties: success: type: boolean example: true message: type: string example: 'SMS queued for sending' data: type: object properties: id: type: integer example: 101 message_id: type: string example: 9f1c...uuid recipient_number: type: string example: '+998901234567' status: type: string example: pending price: type: integer example: 100 is_charged: type: boolean example: false direction: type: string example: outbound callback_url: type: string example: 'https://example.com/sms/callback' 422: description: '' content: application/json: schema: type: object example: success: false message: 'No active device available' properties: success: type: boolean example: false message: type: string example: 'No active device available' tags: - SMS requestBody: required: true content: application/json: schema: type: object properties: message: type: string description: 'The message text (max 1600 chars).' example: 'Your code is 1234' recipient_number: type: string description: 'Destination number (E.164). Alias: `phone`.' example: '+998901234567' device_id: type: string description: 'Optional device id to target; omit to use your active device.' example: active nullable: true price: type: number description: 'Must be at least 0.' example: 39 nullable: true my_id: type: string description: 'Optional client reference id echoed back.' example: order-42 nullable: true callback_url: type: string description: 'Optional. A URL we POST the delivery result to once this message is delivered or fails. The body is `{"event":"status","data":{...message...},"timestamp":"..."}`.' example: 'https://example.com/sms/callback' nullable: true required: - message - recipient_number '/api/sms/{id}': get: summary: 'Get a message' operationId: getAMessage description: 'Fetch one message by numeric id or by its `message_id` UUID (poll delivery status).' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: id: 101 message_id: 9f1c-uuid recipient_number: '+998901234567' status: delivered price: 100 is_charged: false sent_at: '2026-06-08T10:00:01.000000Z' delivered_at: '2026-06-08T10:00:05.000000Z' error_message: null callback_url: null properties: success: type: boolean example: true data: type: object properties: id: type: integer example: 101 message_id: type: string example: 9f1c-uuid recipient_number: type: string example: '+998901234567' status: type: string example: delivered price: type: integer example: 100 is_charged: type: boolean example: false sent_at: type: string example: '2026-06-08T10:00:01.000000Z' delivered_at: type: string example: '2026-06-08T10:00:05.000000Z' error_message: type: string example: null nullable: true callback_url: type: string example: null nullable: true 404: description: '' content: application/json: schema: type: object example: message: 'No query results for model [SmsMessage].' properties: message: type: string example: 'No query results for model [SmsMessage].' tags: - SMS put: summary: 'Update a message' operationId: updateAMessage description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: id: 101 status: delivered message: 'SMS updated successfully' properties: success: type: boolean example: true data: type: object properties: id: type: integer example: 101 status: type: string example: delivered message: type: string example: 'SMS updated successfully' tags: - SMS requestBody: required: false content: application/json: schema: type: object properties: status: type: string description: '' example: received enum: - pending - sent - delivered - failed - received error_message: type: string description: '' example: architecto delete: summary: 'Delete a message' operationId: deleteAMessage description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'SMS deleted successfully' properties: success: type: boolean example: true message: type: string example: 'SMS deleted successfully' tags: - SMS parameters: - in: path name: id description: 'The ID of the sms.' example: architecto required: true schema: type: string /api/settings: get: summary: "Show the authenticated user's settings." operationId: showTheAuthenticatedUsersSettings description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: keep_inbound: true properties: success: type: boolean example: true data: type: object properties: keep_inbound: type: boolean example: true tags: - Settings put: summary: "Update the authenticated user's settings." operationId: updateTheAuthenticatedUsersSettings description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: keep_inbound: false message: 'Settings updated successfully' properties: success: type: boolean example: true data: type: object properties: keep_inbound: type: boolean example: false message: type: string example: 'Settings updated successfully' tags: - Settings requestBody: required: false content: application/json: schema: type: object properties: keep_inbound: type: boolean description: "Store incoming SMS in your history. When false, inbound messages aren't saved (the incoming webhook still fires)." example: false /api/subscription: get: summary: "Get the authenticated user's subscription status, pricing and payment info." operationId: getTheAuthenticatedUsersSubscriptionStatusPricingAndPaymentInfo description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: plan: premium is_premium: true premium_expires_at: '2027-06-08T00:00:00.000000Z' prices: monthly: 5 yearly: 50 currency: USD features: - api - webhooks - bulk payment: wallet_address: UQCGj7fXHlxD5H_uwbrJSE9N6NPMQ62pz_eoxViCdNYCF5Gh asset: 'USDT (TON)' network: TON admin_telegram: '@dev_murod' properties: success: type: boolean example: true data: type: object properties: plan: type: string example: premium is_premium: type: boolean example: true premium_expires_at: type: string example: '2027-06-08T00:00:00.000000Z' prices: type: object properties: monthly: type: integer example: 5 yearly: type: integer example: 50 currency: type: string example: USD features: type: array example: - api - webhooks - bulk items: type: string payment: type: object properties: wallet_address: type: string example: UQCGj7fXHlxD5H_uwbrJSE9N6NPMQ62pz_eoxViCdNYCF5Gh asset: type: string example: 'USDT (TON)' network: type: string example: TON admin_telegram: type: string example: '@dev_murod' tags: - Subscription /api/subscriptions/redeem-promo: post: summary: 'Redeem a promo code to unlock Premium for free.' operationId: redeemAPromoCodeToUnlockPremiumForFree description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true message: 'Promo code redeemed — Premium activated.' data: plan: premium is_premium: true premium_expires_at: '2027-06-08T00:00:00.000000Z' prices: monthly: 5 yearly: 50 currency: USD features: - api - webhooks - bulk properties: success: type: boolean example: true message: type: string example: 'Promo code redeemed — Premium activated.' data: type: object properties: plan: type: string example: premium is_premium: type: boolean example: true premium_expires_at: type: string example: '2027-06-08T00:00:00.000000Z' prices: type: object properties: monthly: type: integer example: 5 yearly: type: integer example: 50 currency: type: string example: USD features: type: array example: - api - webhooks - bulk items: type: string 422: description: '' content: application/json: schema: type: object example: success: false message: 'This promo code is invalid or no longer available.' properties: success: type: boolean example: false message: type: string example: 'This promo code is invalid or no longer available.' tags: - Subscription requestBody: required: true content: application/json: schema: type: object properties: code: type: string description: 'The promo code (case-insensitive).' example: PDAFTAR required: - code /api/webhooks: get: summary: "Display the authenticated user's webhook URLs." operationId: displayTheAuthenticatedUsersWebhookURLs description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: webhook_url_incoming: 'https://example.com/incoming' webhook_url_status: 'https://example.com/status' properties: success: type: boolean example: true data: type: object properties: webhook_url_incoming: type: string example: 'https://example.com/incoming' webhook_url_status: type: string example: 'https://example.com/status' tags: - Webhooks put: summary: "Update the authenticated user's webhook URLs." operationId: updateTheAuthenticatedUsersWebhookURLs description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: success: true data: webhook_url_incoming: 'https://example.com/incoming' webhook_url_status: 'https://example.com/status' message: 'Webhooks updated successfully' properties: success: type: boolean example: true data: type: object properties: webhook_url_incoming: type: string example: 'https://example.com/incoming' webhook_url_status: type: string example: 'https://example.com/status' message: type: string example: 'Webhooks updated successfully' tags: - Webhooks requestBody: required: false content: application/json: schema: type: object properties: webhook_url_incoming: type: string description: 'Optional URL to receive inbound-SMS events.' example: 'https://example.com/incoming' nullable: true webhook_url_status: type: string description: 'Optional URL to receive delivery-status events.' example: 'https://example.com/status' nullable: true