{"openapi":"3.1.0","info":{"title":"Account Management API","description":"Public API for GatewayAPI account management.","version":"2026.11.12-1698"},"paths":{"/account":{"get":{"summary":"Get Account Info","description":"Return the name of the account authenticated by Pipeline.","operationId":"get_account_info_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountResponse"}}}}}}},"/credit":{"get":{"summary":"Get Credits","description":"Return the authenticated account's current credit and currency.","operationId":"get_credits_credit_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditResponse"}}}}}}},"/pricing":{"get":{"summary":"Get Pricing","description":"Return active SMS prices for every available destination country.","operationId":"get_pricing_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PricingResponse"}}}}}}},"/webhooks":{"get":{"summary":"Get Webhooks","description":"Return all webhooks configured for the account.","operationId":"get_webhooks_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhooksResponse"}}}}}},"post":{"summary":"Create Webhook","description":"Create a webhook with a generated HMAC signing secret.","operationId":"create_webhook_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{webhook_id}/url":{"patch":{"summary":"Update Webhook Url","description":"Change a webhook's destination URL.","operationId":"update_webhook_url_webhooks__webhook_id__url_patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookURLRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{webhook_id}/label":{"patch":{"summary":"Update Webhook Label","description":"Change a webhook's label.","operationId":"update_webhook_label_webhooks__webhook_id__label_patch","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWebhookLabelRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{webhook_id}":{"delete":{"summary":"Delete Webhook","description":"Delete a webhook belonging to the account.","operationId":"delete_webhook_webhooks__webhook_id__delete","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/webhooks/{webhook_id}/status":{"post":{"summary":"Set Webhook Status","description":"Set a webhook as the account's delivery-status callback.\n\nIf the account already has a status webhook, it is deselected and will no\nlonger receive delivery-status callbacks.","operationId":"set_webhook_status_webhooks__webhook_id__status_post","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"AccountResponse","description":"Return the account's name and id."},"CountryPrice":{"properties":{"country_code":{"type":"string","title":"Country Code","description":"Two-letter destination country code.","examples":["DK"]},"standard_price":{"type":"string","title":"Standard Price","description":"Active standard-message price in the account currency.","examples":["0.11000"]},"plus_price":{"type":"string","title":"Plus Price","description":"Active Plus-message price in the account currency.","examples":["0.16000"]},"operator_prices":{"items":{"$ref":"#/components/schemas/OperatorPrice"},"type":"array","title":"Operator Prices","description":"Account-specific prices for operators in this country."}},"type":"object","required":["country_code","standard_price","plus_price","operator_prices"],"title":"CountryPrice","description":"The active account prices for one destination country."},"CreateWebhookRequest":{"properties":{"label":{"type":"string","maxLength":255,"minLength":3,"title":"Label"},"url":{"type":"string","minLength":1,"title":"Url"},"active":{"type":"boolean","title":"Active","default":true}},"type":"object","required":["label","url"],"title":"CreateWebhookRequest","description":"The destination and label for a webhook."},"CreateWebhookResponse":{"properties":{"id":{"type":"integer","title":"Id"},"label":{"type":"string","title":"Label"},"url":{"type":"string","title":"Url"},"active":{"type":"boolean","title":"Active"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","label","url","active","secret"],"title":"CreateWebhookResponse","description":"A newly created webhook and its signing secret."},"CreditResponse":{"properties":{"credit":{"type":"string","title":"Credit"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["credit","currency"],"title":"CreditResponse","description":"The authenticated account's current credit information."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"OperatorPrice":{"properties":{"operator_name":{"type":"string","title":"Operator Name","description":"Name of the mobile operator.","examples":["TDC NET"]},"mcc":{"type":"integer","title":"Mcc","description":"Mobile country code.","examples":[238]},"mnc":{"type":"integer","title":"Mnc","description":"Mobile network code.","examples":[1]},"price":{"type":"string","title":"Price","description":"Active account price in the account currency.","examples":["0.09500"]}},"type":"object","required":["operator_name","mcc","mnc","price"],"title":"OperatorPrice","description":"The active account price for a mobile operator."},"PricingResponse":{"properties":{"currency":{"type":"string","title":"Currency","description":"ISO 4217 currency used by every returned price.","examples":["EUR"]},"rates":{"items":{"$ref":"#/components/schemas/CountryPrice"},"type":"array","title":"Rates","description":"Active prices for every country with complete base pricing."}},"type":"object","required":["currency","rates"],"title":"PricingResponse","description":"Active SMS prices for the authenticated account."},"UpdateWebhookLabelRequest":{"properties":{"label":{"type":"string","maxLength":255,"minLength":3,"title":"Label"}},"type":"object","required":["label"],"title":"UpdateWebhookLabelRequest","description":"New account-scoped name for a webhook."},"UpdateWebhookURLRequest":{"properties":{"url":{"type":"string","minLength":1,"title":"Url"}},"type":"object","required":["url"],"title":"UpdateWebhookURLRequest","description":"New destination URL for a webhook."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"Webhook":{"properties":{"id":{"type":"integer","title":"Id","description":"Stable ID of the webhook configuration."},"label":{"type":"string","title":"Label","description":"Account-scoped name for the webhook.","examples":["delivery-callback"]},"url":{"type":"string","title":"Url","description":"Webhook destination URL. ","examples":["https://example.com/webhooks/delivery"]},"status":{"type":"boolean","title":"Status","description":"Whether the webhook is selected for delivery-status callbacks."},"keywords":{"items":{"$ref":"#/components/schemas/WebhookKeyword"},"type":"array","title":"Keywords","description":"Keyword resources assigned to this webhook."},"virtual_numbers":{"items":{"$ref":"#/components/schemas/WebhookVirtualNumber"},"type":"array","title":"Virtual Numbers","description":"Virtual-number resources assigned to this webhook."},"active":{"type":"boolean","title":"Active","description":"Whether the webhook configuration is currently active."}},"type":"object","required":["id","label","url","status","keywords","virtual_numbers","active"],"title":"Webhook","description":"Webhook configured for the authenticated account."},"WebhookKeyword":{"properties":{"id":{"type":"integer","title":"Id","description":"Stable ID of the keyword resource."},"keyword":{"type":"string","title":"Keyword","description":"The keyword text.","examples":["ORDER"]},"active":{"type":"boolean","title":"Active","description":"Whether the keyword resource is currently active."}},"type":"object","required":["id","keyword","active"],"title":"WebhookKeyword","description":"Keyword assigned to a webhook."},"WebhookVirtualNumber":{"properties":{"id":{"type":"integer","title":"Id","description":"Stable ID of the virtual-number resource."},"number":{"type":"integer","title":"Number","description":"First number in the virtual-number range.","examples":[45123456]},"range_end":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Range End","description":"Last number in the range. Null when this assignment is a single number.","examples":[45123499,null]},"active":{"type":"boolean","title":"Active","description":"Whether the virtual-number resource is currently active."}},"type":"object","required":["id","number","range_end","active"],"title":"WebhookVirtualNumber","description":"Virtual number assigned to a webhook."},"WebhooksResponse":{"properties":{"webhooks":{"items":{"$ref":"#/components/schemas/Webhook"},"type":"array","title":"Webhooks","description":"All webhook configurations for the authenticated account."}},"type":"object","required":["webhooks"],"title":"WebhooksResponse","description":"Webhooks configured for the authenticated account."}}}}