{
    "variable": [
        {
            "id": "baseUrl",
            "key": "baseUrl",
            "type": "string",
            "name": "string",
            "value": "https:\/\/app.gotsms.com"
        }
    ],
    "info": {
        "name": "GotSMS API Documentation",
        "_postman_id": "f02b8e43-2684-4735-a5a4-aa9568ca0716",
        "description": "REST API documentation.",
        "schema": "https:\/\/schema.getpostman.com\/json\/collection\/v2.1.0\/collection.json"
    },
    "item": [
        {
            "name": "API",
            "description": "GotSMS API methods.",
            "item": [
                {
                    "name": "Pricelist",
                    "description": "",
                    "item": [
                        {
                            "name": "Get public pricelist",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/pricelist",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/pricelist"
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "The icon field is returned only when the request is sent without a token.",
                                "auth": {
                                    "type": "noauth"
                                }
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"9b1f8c3e-1c2a-4f5b-8d7e-0a1b2c3d4e5f\",\"name\":\"Telegram\",\"slug\":\"telegram\",\"icon\":\"https:\\\/\\\/example.com\\\/icons\\\/telegram.png\",\"plans\":[{\"service_name\":\"Telegram\",\"period\":1,\"period_type\":\"day\",\"period_type_label\":\"day\",\"duration_translation\":\"1 day\",\"price\":1,\"renew_price\":1,\"country\":\"USA\",\"billing_type\":\"duration\"}]},{\"id\":\"2c7d9a41-5e6f-4a8b-9c0d-1e2f3a4b5c6d\",\"name\":\"WhatsApp\",\"slug\":\"whatsapp\",\"icon\":null,\"plans\":[{\"service_name\":\"WhatsApp\",\"period\":1,\"period_type\":\"month\",\"period_type_label\":\"month\",\"duration_translation\":\"1 month\",\"price\":4.99,\"renew_price\":4.99,\"country\":\"USA\",\"billing_type\":\"duration\"}]}]}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "Rents",
                    "description": "",
                    "item": [
                        {
                            "name": "List cellular carriers",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/carriers",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/carriers"
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "",
                                "auth": {
                                    "type": "noauth"
                                }
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"name\":\"T-Mobile\"}]}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Get rent plans",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/plans",
                                    "query": [
                                        {
                                            "key": "service_id",
                                            "value": "",
                                            "description": "Filter by service UUID.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "country_id",
                                            "value": "",
                                            "description": "Filter by country UUID.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "duration_type",
                                            "value": "",
                                            "description": "Filter by duration type.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "billing_type",
                                            "value": "",
                                            "description": "Filter by billing type.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Search in service name.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Pagination size (max 100).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "include_unavailable",
                                            "value": "",
                                            "description": "Also return plans that are currently sold out.",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/rents\/plans?service_id=&country_id=&duration_type=&billing_type=&search=&per_page=&include_unavailable="
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "By default only plans with numbers in stock are returned. Pass include_unavailable=1 to also get sold-out plans: they are marked is_available = false and listed after the available ones."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"service\":{\"id\":\"uuid\",\"name\":\"Telegram\"},\"country\":{\"id\":\"uuid\",\"name\":\"USA\"},\"billing_type\":\"duration\",\"duration_type\":\"day\",\"duration_in_type\":1,\"duration_in_minutes\":1440,\"duration_translation\":\"1 day\",\"price\":1,\"renew_price\":1,\"is_available\":true}],\"meta\":{\"current_page\":1,\"last_page\":1,\"per_page\":25,\"total\":1}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Get area codes on sale",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/area-codes",
                                    "query": [
                                        {
                                            "key": "plan_id",
                                            "value": "4b1e7c2a-8f3d-4a6b-9c0e-5d2f1a7b3c8e",
                                            "description": "Plan UUID from GET \/api\/rents\/plans. Must be a valid UUID.",
                                            "disabled": false
                                        },
                                        {
                                            "key": "cellular_carrier_id",
                                            "value": "",
                                            "description": "Only area codes with numbers of this cellular carrier (see GET \/api\/carriers). Must be a valid UUID.",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/rents\/area-codes?plan_id=4b1e7c2a-8f3d-4a6b-9c0e-5d2f1a7b3c8e&cellular_carrier_id="
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Area codes a number of the plan can be rented with right now, grouped by US state, the same list the area code picker shows in the cabinet. Pass one area_code, or a state for any of its area codes, to POST \/api\/rents or POST \/api\/rents\/bulk."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"state\":\"California\",\"area_codes\":[{\"area_code\":\"213\",\"city\":\"Los Angeles\",\"carriers\":[\"AT&T\",\"T-Mobile\"]},{\"area_code\":\"415\",\"city\":null,\"carriers\":[\"Verizon\"]}]}]}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"This tariff is not available for rent.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "List user rents",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents",
                                    "query": [
                                        {
                                            "key": "status",
                                            "value": "",
                                            "description": "Filter by status.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "service",
                                            "value": "",
                                            "description": "Service name search.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "phone",
                                            "value": "",
                                            "description": "Phone search.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "notes",
                                            "value": "",
                                            "description": "Search in rent notes.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Pagination size (max 100).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, starting from 1.",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/rents?status=&service=&phone=&notes=&per_page=&page="
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"service\":{\"id\":\"uuid\",\"name\":\"Telegram\"},\"plan\":{\"id\":\"uuid\",\"billing_type\":\"duration\",\"duration_type\":\"day\",\"duration_in_type\":1,\"duration_translation\":\"1 day\",\"price\":1,\"renew_price\":1},\"phone\":\"+1 202-555-0123\",\"price\":1,\"status\":\"active\",\"is_included_for_next_renewal\":false,\"is_archived\":false,\"active_from\":\"2026-03-11T12:00:00+00:00\",\"active_till\":\"2026-03-12T12:00:00+00:00\",\"wake_from\":null,\"wake_till\":null,\"can_wake_up\":true,\"notes\":\"Call customer after activation\",\"transition_options\":[{\"plan_id\":\"uuid\",\"duration_type\":\"day\",\"duration_in_type\":7,\"duration_translation\":\"7 days\",\"price\":5}]}],\"meta\":{\"current_page\":1,\"last_page\":1,\"per_page\":20,\"total\":1}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "List services that can be added to a rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/services",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/services",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Services the same number can additionally receive SMS for. Only active rents support it; unavailable services are listed with is_available = false."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"service_id\":\"uuid\",\"name\":\"WhatsApp\",\"price\":2,\"base_price\":1,\"add_service_markup\":1,\"is_available\":true}]}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Create new rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents"
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"plan_id\":\"4b1e7c2a-8f3d-4a6b-9c0e-5d2f1a7b3c8e\"}"
                                },
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 201,
                                    "body": "{\"success\":true,\"message\":\"Rent created successfully.\",\"data\":{\"id\":\"uuid\",\"service\":{\"id\":\"uuid\",\"name\":\"Telegram\"},\"plan\":{\"id\":\"uuid\",\"billing_type\":\"duration\",\"duration_type\":\"day\",\"duration_in_type\":1,\"duration_translation\":\"1 day\",\"price\":1,\"renew_price\":1},\"phone\":\"+1 202-555-0123\",\"price\":1,\"status\":\"active\",\"is_included_for_next_renewal\":false,\"is_archived\":false,\"active_from\":\"2026-03-11T12:00:00+00:00\",\"active_till\":\"2026-03-12T12:00:00+00:00\",\"wake_from\":null,\"wake_till\":null,\"can_wake_up\":true,\"notes\":null,\"transition_options\":[]}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Create several rents at once",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/bulk",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/bulk"
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"plan_id\":\"4b1e7c2a-8f3d-4a6b-9c0e-5d2f1a7b3c8e\",\"quantity\":5}"
                                },
                                "description": "Rents up to 25 numbers of one plan in a single request. When fewer numbers are available, the ones that could be rented are returned."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 201,
                                    "body": "{\"success\":true,\"message\":\"Rented 2 of 3 numbers.\",\"data\":[{\"id\":\"uuid\",\"service\":{\"id\":\"uuid\",\"name\":\"Telegram\"},\"plan\":{\"id\":\"uuid\",\"billing_type\":\"duration\",\"duration_type\":\"day\",\"duration_in_type\":1,\"duration_translation\":\"1 day\",\"price\":1,\"renew_price\":1},\"phone\":\"+1 202-555-0123\",\"price\":1,\"status\":\"active\",\"is_included_for_next_renewal\":false,\"is_archived\":false,\"active_from\":\"2026-03-11T12:00:00+00:00\",\"active_till\":\"2026-03-12T12:00:00+00:00\",\"wake_from\":null,\"wake_till\":null,\"can_wake_up\":true,\"notes\":null,\"transition_options\":[]}],\"meta\":{\"requested\":3,\"rented\":2,\"failed\":0}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"No number available for this service.\",\"meta\":{\"requested\":3,\"rented\":0,\"failed\":0}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Transition rent to another plan",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/transition",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/transition",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"plan_id\":\"4b1e7c2a-8f3d-4a6b-9c0e-5d2f1a7b3c8e\"}"
                                },
                                "description": "Moves the rent to another plan. The plans a rent can move to are returned for it in transition_options by GET \/api\/rents. The new period is charged at the plan price and starts when the period already paid for ends."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Plan transitioned successfully.\",\"data\":{\"id\":\"uuid\",\"status\":\"active\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"Transition to selected plan is unavailable.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Toggle auto renewal",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/renewal\/toggle",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/renewal\/toggle",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "With auto-renewal on, the renew price is charged at the moment the paid period ends and the next period starts right away, without a gap. If the balance does not cover it, the rent ends. A rent that has already ended cannot be switched back on."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Auto renewal enabled.\",\"data\":{\"id\":\"uuid\",\"is_included_for_next_renewal\":true}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"Failed to toggle auto renewal.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Pay ahead for a rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/prepay",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/prepay",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"periods\":3}"
                                },
                                "description": "Pays for several periods of the rent's current plan at once, at its renew price per period. The new time starts when the time already paid for ends, so active_till moves forward by all the periods together. Auto-renewal is not changed."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"The number is paid ahead.\",\"data\":{\"id\":\"uuid\",\"status\":\"active\",\"active_till\":\"2026-12-23T12:00:00+00:00\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"Not enough balance to pay ahead.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Refund rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/refund",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/refund",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Rent has been refunded successfully.\",\"data\":{\"id\":\"uuid\",\"status\":\"finished\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"Refund not available for this rent.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Archive rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/archive",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/archive",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Moves an active number to the archive and turns its auto-renewal off. The rental keeps running until active_till and SMS keep arriving; the rent is returned with is_archived = true."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"The number has been moved to the archive.\",\"data\":{\"id\":\"uuid\",\"status\":\"active\",\"is_included_for_next_renewal\":false,\"is_archived\":true}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"This number cannot be moved to the archive.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Unarchive rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/unarchive",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/unarchive",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Takes an archived number that is still running back out of the archive. Auto-renewal stays off until you turn it on with POST \/api\/rents\/{rent_id}\/renewal\/toggle."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"The number is back among the active ones.\",\"data\":{\"id\":\"uuid\",\"status\":\"active\",\"is_included_for_next_renewal\":false,\"is_archived\":false}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"This number is not in the archive.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Add a service to a rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/services",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/services",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"service_id\":\"7c2d9e4f-3a1b-4c5d-8e6f-0a9b8c7d6e5f\"}"
                                },
                                "description": "Adds one more service to the same number as a separate rent with the same duration, charged at the price from GET \/api\/rents\/{rent_id}\/services."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 201,
                                    "body": "{\"success\":true,\"message\":\"Service added to the number.\",\"data\":{\"id\":\"uuid\",\"status\":\"active\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"Adding a service is not available for this number.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Transfer a rent to another account",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/rents\/:rent_id\/transfer",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/rents\/:rent_id\/transfer",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"email\":\"recipient@example.com\",\"secret\":\"q7Vd2LxN9pRt4KwZ8mHc3JsB6fYa1UeG5nTb0XiQ2oLv7DkE\"}"
                                },
                                "description": "Hands the number over to another GotSMS account, the same as Transfer in the cabinet: the recipient becomes the owner and receives its SMS. Only a rent that has not ended can be transferred. A transfer cannot be undone. Turn on number transfer through the API in the API settings of your account first: it gives you the secret phrase this request needs."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Rent transferred successfully.\"}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 403,
                                    "body": "{\"success\":false,\"message\":\"Number transfer through the API is turned off. Turn it on in the API settings of your account.\"}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"The secret phrase is incorrect.\"}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "Account",
                    "description": "",
                    "item": [
                        {
                            "name": "Get account balance",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/account",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/account"
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":{\"balance\":125.5}}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "Services",
                    "description": "",
                    "item": [
                        {
                            "name": "Get services",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/services",
                                    "query": [
                                        {
                                            "key": "search",
                                            "value": "",
                                            "description": "Search in service name.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Pagination size (max 100).",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/services?search=&per_page="
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Includes services whose numbers are sold out right now, marked is_available = false."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"name\":\"Telegram\",\"is_available\":true}],\"meta\":{\"current_page\":1,\"last_page\":1,\"per_page\":25,\"total\":1}}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "Messages",
                    "description": "",
                    "item": [
                        {
                            "name": "List all SMS messages across all rents",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/messages",
                                    "query": [
                                        {
                                            "key": "service_id",
                                            "value": "",
                                            "description": "Filter by service UUID. Must be a valid UUID.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "phone",
                                            "value": "",
                                            "description": "Phone search. Must not be greater than 32 characters.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Pagination size (max 100). Must be at least 1. Must not be greater than 100.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, starting from 1.",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/messages?service_id=&phone=&per_page=&page="
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"rent_id\":\"uuid\",\"service\":{\"id\":\"uuid\",\"name\":\"Telegram\"},\"phone\":\"+1 202-555-0123\",\"from\":\"+18001234567\",\"to\":\"+1 202-555-0123\",\"body\":\"Your verification code is 123456\",\"code\":\"123456\",\"received_at\":\"2026-03-11T12:00:00+00:00\"}],\"meta\":{\"current_page\":1,\"last_page\":1,\"per_page\":20,\"total\":1}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "List unread SMS messages",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/messages\/unread",
                                    "query": [
                                        {
                                            "key": "service_id",
                                            "value": "",
                                            "description": "Filter by service UUID.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "rent_id",
                                            "value": "",
                                            "description": "Filter by rent UUID.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "phone",
                                            "value": "",
                                            "description": "Phone search.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "per_page",
                                            "value": "",
                                            "description": "Pagination size (max 100).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "mark_as_read",
                                            "value": "",
                                            "description": "Mark returned messages as read.",
                                            "disabled": true
                                        },
                                        {
                                            "key": "page",
                                            "value": "",
                                            "description": "Page number, starting from 1.",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/messages\/unread?service_id=&rent_id=&phone=&per_page=&mark_as_read=&page="
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Unread SMS received in the last 30 days, newest first."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"rent_id\":\"uuid\",\"service\":{\"id\":\"uuid\",\"name\":\"Telegram\"},\"phone\":\"+1 202-555-0123\",\"from\":\"+18001234567\",\"to\":\"+1 202-555-0123\",\"body\":\"Your verification code is 123456\",\"code\":\"123456\",\"received_at\":\"2026-03-11T12:00:00+00:00\"}],\"meta\":{\"current_page\":1,\"last_page\":1,\"per_page\":20,\"total\":1}}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "Numbers",
                    "description": "",
                    "item": [
                        {
                            "name": "List all active numbers",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/numbers",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/numbers"
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Every number currently rented by the account, without pagination."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"phone\":\"+1 202-555-0123\",\"service\":\"Telegram\",\"active_till\":\"2026-03-12T12:00:00+00:00\",\"is_included_for_next_renewal\":true,\"is_archived\":false,\"notes\":\"Farm A\"}],\"meta\":{\"total\":1}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Wake up a rented number",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/numbers\/:rent_id\/wake-up",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/numbers\/:rent_id\/wake-up",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Wake up request sent.\",\"data\":{\"rent_id\":\"uuid\",\"status\":\"in_queue\",\"active_from\":\"2026-03-11T12:00:00+00:00\",\"active_till\":\"2026-03-12T12:00:00+00:00\",\"wake_from\":\"2026-03-11T12:03:00+00:00\",\"wake_till\":\"2026-03-11T12:08:00+00:00\",\"online_till\":\"2026-03-12T12:00:00+00:00\",\"wakeup_time_left_seconds\":480,\"online_time_left_seconds\":86400,\"can_wake_up\":false}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"success\":false,\"message\":\"The rental has already ended.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Get SMS messages for a rent",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/numbers\/:rent_id\/messages",
                                    "query": [
                                        {
                                            "key": "limit",
                                            "value": "",
                                            "description": "Number of records (max 100).",
                                            "disabled": true
                                        },
                                        {
                                            "key": "before_id",
                                            "value": "",
                                            "description": "Return messages older than the message with this id. Pass meta.next_before_id from the previous response to get the next page.",
                                            "disabled": true
                                        }
                                    ],
                                    "raw": "{{baseUrl}}\/api\/numbers\/:rent_id\/messages?limit=&before_id=",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"from\":\"+18001234567\",\"to\":\"+1 202-555-0123\",\"body\":\"Your verification code is 123456\",\"code\":\"123456\",\"received_at\":\"2026-03-11T12:00:00+00:00\"}],\"meta\":{\"next_before_id\":\"uuid\",\"count\":1}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Get notes for a rented number",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/numbers\/:rent_id\/notes",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/numbers\/:rent_id\/notes",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":{\"rent_id\":\"uuid\",\"notes\":\"Call customer after activation\"}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Update notes for a rented number",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/numbers\/:rent_id\/notes",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/numbers\/:rent_id\/notes",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "PUT",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"notes\":\"Call customer after activation\"}"
                                },
                                "description": "Replaces the current note."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Notes updated successfully.\",\"data\":{\"rent_id\":\"uuid\",\"notes\":\"Call customer after activation\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"message\":\"The notes field must contain plain text only. HTML is not allowed.\",\"errors\":{\"notes\":[\"The notes field must contain plain text only. HTML is not allowed.\"]}}",
                                    "name": "Validation failed"
                                }
                            ]
                        },
                        {
                            "name": "Get number queue\/wakeup\/online status",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/numbers\/:rent_id\/status",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/numbers\/:rent_id\/status",
                                    "variable": [
                                        {
                                            "id": "rent_id",
                                            "key": "rent_id",
                                            "value": "9d3f8f6a-1b2c-4d5e-8f90-1a2b3c4d5e6f",
                                            "description": "Rent UUID."
                                        }
                                    ]
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": ""
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":{\"rent_id\":\"uuid\",\"status\":\"active\",\"active_from\":\"2026-03-11T12:00:00+00:00\",\"active_till\":\"2026-03-12T12:00:00+00:00\",\"wake_from\":\"2026-03-11T12:00:00+00:00\",\"wake_till\":\"2026-03-11T12:05:00+00:00\",\"online_till\":\"2026-03-12T12:00:00+00:00\",\"wakeup_time_left_seconds\":120,\"online_time_left_seconds\":86220,\"can_wake_up\":false}}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                },
                {
                    "name": "Webhooks",
                    "description": "A webhook sends events from your account to an address on your server as soon as they happen, so you do not have to poll `GET \/api\/messages\/unread` or `GET \/api\/numbers\/{rent_id}\/status`.\n\n**Events**\n\n- `message.received`: a new SMS arrived on one of your numbers. `data` has the same fields as a message in `GET \/api\/messages\/unread`.\n- `rent.online`: a number you woke up with `POST \/api\/numbers\/{rent_id}\/wake-up` is ready to receive SMS, and `GET \/api\/numbers\/{rent_id}\/status` now returns `ready`. `data`: `rent_id`, `service`, `phone`, `status`, `wake_from`, `wake_till`.\n- `rent.renewed`: a rent got a new paid period, either renewed automatically when its period ran out or paid ahead with `POST \/api\/rents\/{rent_id}\/prepay`. `price` is what was charged, `active_from` and `active_till` are the bounds of the new period; a period paid ahead starts when the time already paid for ends. `data`: `rent_id`, `service`, `phone`, `price`, `active_from`, `active_till`.\n- `rent.renewal_failed`: automatic renewal did not happen because the balance did not cover the renewal price. `data`: `rent_id`, `service`, `phone`, `renew_price`, `balance`.\n- `rent.ended`: a rent period ran out and the rent was not renewed. `data`: `rent_id`, `service`, `phone`, `ended_at`.\n- `webhook.test`: sent only when you call `POST \/api\/webhook\/test`. `data`: `message`.\n\n**Request**\n\nEvery event is a `POST` with a JSON body:\n\n```json\n{\n    \"id\": \"0199f1d2-7c1e-7a3b-9c4d-5e6f7a8b9c0d\",\n    \"event\": \"message.received\",\n    \"created_at\": \"2026-03-11T12:00:00+00:00\",\n    \"data\": {\n        \"id\": \"uuid\",\n        \"rent_id\": \"uuid\",\n        \"service\": {\"id\": \"uuid\", \"name\": \"Telegram\"},\n        \"phone\": \"+1 202-555-0123\",\n        \"from\": \"+18001234567\",\n        \"to\": \"+1 202-555-0123\",\n        \"body\": \"Your verification code is 123456\",\n        \"code\": \"123456\",\n        \"received_at\": \"2026-03-11T12:00:00+00:00\"\n    }\n}\n```\n\nHeaders:\n\n- `X-GotSMS-Event`: the event name;\n- `X-GotSMS-Delivery`: the same value as `id` in the body;\n- `X-GotSMS-Timestamp`: when the request was signed, Unix time in seconds;\n- `X-GotSMS-Signature`: `sha256=` followed by the hex HMAC-SHA256 of `{timestamp}.{raw request body}`, keyed with your webhook secret.\n\n**Checking the signature**\n\nCompute the signature over the raw body exactly as received, compare it in constant time, and reject requests whose timestamp is more than 5 minutes old:\n\n```php\n$body = file_get_contents('php:\/\/input');\n$timestamp = $_SERVER['HTTP_X_GOTSMS_TIMESTAMP'];\n$expected = 'sha256='.hash_hmac('sha256', $timestamp.'.'.$body, $secret);\n\n$valid = hash_equals($expected, $_SERVER['HTTP_X_GOTSMS_SIGNATURE'])\n    && abs(time() - (int) $timestamp) <= 300;\n```\n\n**Responding and retries**\n\nReply with any `2xx` status within 10 seconds. Redirects are not followed. Any other outcome is a failed attempt, and the event is sent again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours: up to 6 attempts in total. Every attempt carries the same `id`, so use it to skip events you have already processed. Events may arrive out of order.\n\nIf every attempt fails for 12 hours in a row, the webhook is switched off: `disabled_at` in `GET \/api\/webhook` is set and you get a notification in your account. Fix your endpoint and send `PUT \/api\/webhook` with `is_enabled: true` to switch it back on.\n\nThe webhook address must point to a public address and use port 80, 443 or a port from 1025 to 65535. Both `https:\/\/` and `http:\/\/` are accepted; prefer `https:\/\/`, because over `http:\/\/` the SMS text and codes travel unencrypted. The delivery history of the last 7 days is available in `GET \/api\/webhook\/deliveries`.",
                    "item": [
                        {
                            "name": "Get webhook settings",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/webhook",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/webhook"
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Returns `data: null` while no webhook is set up."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":{\"url\":\"https:\\\/\\\/example.com\\\/gotsms\\\/webhook\",\"events\":[\"message.received\",\"rent.online\"],\"is_enabled\":true,\"disabled_at\":null,\"secret\":\"whsec_...\",\"created_at\":\"2026-03-11T12:00:00+00:00\",\"updated_at\":\"2026-03-11T12:00:00+00:00\"}}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Set up or update the webhook",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/webhook",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/webhook"
                                },
                                "method": "PUT",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": {
                                    "mode": "raw",
                                    "raw": "{\"url\":\"https:\\\/\\\/example.com\\\/gotsms\\\/webhook\",\"events\":[\"message.received\"],\"is_enabled\":true}"
                                },
                                "description": "Creates the webhook on the first call, with a new secret, and updates it afterwards. Sending `is_enabled: true` also switches back on a webhook that was switched off after failed deliveries."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Webhook saved.\",\"data\":{\"url\":\"https:\\\/\\\/example.com\\\/gotsms\\\/webhook\",\"events\":[\"message.received\",\"rent.online\"],\"is_enabled\":true,\"disabled_at\":null,\"secret\":\"whsec_...\",\"created_at\":\"2026-03-11T12:00:00+00:00\",\"updated_at\":\"2026-03-11T12:00:00+00:00\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 422,
                                    "body": "{\"message\":\"The URL must start with http:\\\/\\\/ or https:\\\/\\\/.\",\"errors\":{\"url\":[\"The URL must start with http:\\\/\\\/ or https:\\\/\\\/.\"]}}",
                                    "name": "Validation failed"
                                }
                            ]
                        },
                        {
                            "name": "Delete the webhook",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/webhook",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/webhook"
                                },
                                "method": "DELETE",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Stops all deliveries, including retries that are still scheduled."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Webhook deleted.\"}",
                                    "name": ""
                                }
                            ]
                        },
                        {
                            "name": "Generate a new webhook secret",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/webhook\/secret",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/webhook\/secret"
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "The previous secret stops working at once: requests are signed with the new one from now on, retries included."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"message\":\"Webhook secret regenerated.\",\"data\":{\"url\":\"https:\\\/\\\/example.com\\\/gotsms\\\/webhook\",\"events\":[\"message.received\",\"rent.online\"],\"is_enabled\":true,\"disabled_at\":null,\"secret\":\"whsec_...\",\"created_at\":\"2026-03-11T12:00:00+00:00\",\"updated_at\":\"2026-03-11T12:00:00+00:00\"}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 404,
                                    "body": "{\"success\":false,\"message\":\"No webhook is set up for this account.\"}",
                                    "name": "No webhook is set up"
                                }
                            ]
                        },
                        {
                            "name": "Send a test event",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/webhook\/test",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/webhook\/test"
                                },
                                "method": "POST",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "Sends one `webhook.test` event right away, without retries, and returns how your server answered. Works while the webhook is paused too."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":{\"id\":\"uuid\",\"event\":\"webhook.test\",\"status\":\"delivered\",\"attempts\":1,\"response_status\":200,\"error\":null,\"duration_ms\":184,\"created_at\":\"2026-03-11T12:00:00+00:00\",\"delivered_at\":\"2026-03-11T12:00:00+00:00\",\"next_attempt_at\":null}}",
                                    "name": ""
                                },
                                {
                                    "header": [],
                                    "code": 404,
                                    "body": "{\"success\":false,\"message\":\"No webhook is set up for this account.\"}",
                                    "name": "No webhook is set up"
                                }
                            ]
                        },
                        {
                            "name": "List webhook deliveries",
                            "request": {
                                "url": {
                                    "host": "{{baseUrl}}",
                                    "path": "api\/webhook\/deliveries",
                                    "query": [],
                                    "raw": "{{baseUrl}}\/api\/webhook\/deliveries"
                                },
                                "method": "GET",
                                "header": [
                                    {
                                        "key": "Content-Type",
                                        "value": "application\/json"
                                    },
                                    {
                                        "key": "Accept",
                                        "value": "application\/json"
                                    }
                                ],
                                "body": null,
                                "description": "The latest 50 deliveries of the last 7 days, newest first. `status` is `pending` while retries are still scheduled, then `delivered` or `failed`. `error` is one of `timeout`, `connection_failed`, `address_not_allowed`, `http_error`, `webhook_disabled`, or null."
                            },
                            "response": [
                                {
                                    "header": [],
                                    "code": 200,
                                    "body": "{\"success\":true,\"data\":[{\"id\":\"uuid\",\"event\":\"message.received\",\"status\":\"pending\",\"attempts\":2,\"response_status\":503,\"error\":\"http_error\",\"duration_ms\":87,\"created_at\":\"2026-03-11T12:00:00+00:00\",\"delivered_at\":null,\"next_attempt_at\":\"2026-03-11T12:06:00+00:00\"}]}",
                                    "name": ""
                                }
                            ]
                        }
                    ]
                }
            ]
        }
    ],
    "auth": {
        "type": "bearer",
        "bearer": [
            {
                "key": "Authorization",
                "type": "string"
            }
        ]
    }
}