{ "openapi": "3.0.0", "info": { "description": "seven.io offers you the possibility to send SMS, RCS, text-to-speech messages, perform home register lookups, mobile number portability status lookups, phone number formats and much more.", "version": "1.0.0", "title": "seven", "termsOfService": "https://www.seven.io/en/company/terms/", "contact": { "email": "support@seven.io", "url": "https://www.seven.io/en/company/contact", "name": "Support" }, "license": { "name": "Licensed by Apache 2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" } }, "x-ms-connector-metadata": [ { "propertyName": "Website", "propertyValue": "https://www.seven.io" }, { "propertyName": "Privacy policy", "propertyValue": "https://www.seven.io/en/company/privacy/" }, { "propertyName": "Categories", "propertyValue": "Communication" } ], "paths": { "/analytics/country": { "get": { "tags": ["Account"], "parameters": [ { "$ref": "#/components/parameters/analyticsEnd" }, { "$ref": "#/components/parameters/analyticsLabel" }, { "$ref": "#/components/parameters/analyticsStart" }, { "$ref": "#/components/parameters/analyticsSubaccounts" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/AnalyticsBase" }, { "type": "object", "properties": { "country": { "type": "string", "description": "The country the entries refer to." } } } ] } } } } } }, "summary": "Get Analytics By Country", "description": "Retrieves analytics grouped by country", "operationId": "AnalyticsByCountry" } }, "/analytics/date": { "get": { "tags": ["Account"], "parameters": [ { "$ref": "#/components/parameters/analyticsEnd" }, { "$ref": "#/components/parameters/analyticsLabel" }, { "$ref": "#/components/parameters/analyticsStart" }, { "$ref": "#/components/parameters/analyticsSubaccounts" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/AnalyticsBase" }, { "type": "object", "properties": { "date": { "type": "string", "description": "The date the entries refer to." } } } ] } } } } } }, "summary": "Get Analytics By Date", "description": "Retrieves analytics grouped by date", "operationId": "AnalyticsByDate" } }, "/analytics/label": { "get": { "tags": ["Account"], "parameters": [ { "$ref": "#/components/parameters/analyticsEnd" }, { "$ref": "#/components/parameters/analyticsLabel" }, { "$ref": "#/components/parameters/analyticsStart" }, { "$ref": "#/components/parameters/analyticsSubaccounts" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/AnalyticsBase" }, { "type": "object", "properties": { "label": { "type": "string", "description": "The label the entries refer to." } } } ] } } } } } }, "summary": "Get Analytics By Label", "description": "Retrieves analytics grouped by label", "operationId": "AnalyticsByLabel" } }, "/analytics/subaccount": { "get": { "tags": ["Account"], "parameters": [ { "$ref": "#/components/parameters/analyticsEnd" }, { "$ref": "#/components/parameters/analyticsLabel" }, { "$ref": "#/components/parameters/analyticsStart" }, { "$ref": "#/components/parameters/analyticsSubaccounts" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "allOf": [ { "$ref": "#/components/schemas/AnalyticsBase" }, { "type": "object", "properties": { "account": { "type": "string", "description": "The AnalyticsByLabel the entries refer to." } } } ] } } } } } }, "summary": "Get Analytics By Label", "description": "Retrieves analytics grouped by AnalyticsByLabel", "operationId": "AnalyticsBySubaccount" } }, "/balance": { "get": { "tags": ["Account"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "amount": { "format": "float", "type": "number" }, "currency": { "type": "string" } } } } } } }, "summary": "Get Balance", "description": "Retrieves the account balance for given API key", "operationId": "Balance" } }, "/contacts": { "get": { "tags": ["Contacts"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Contact" } }, "pagingMetadata": { "$ref": "#/components/schemas/PagingMetadata" } } } } } } }, "summary": "List Contacts", "description": "Retrieves contacts", "operationId": "ContactsList" }, "post": { "tags": ["Contacts"], "requestBody": { "$ref": "#/components/requestBodies/ContactsCreate" }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contact" } } } } }, "summary": "Create Contact", "description": "Creates a contact", "operationId": "ContactsCreate" } }, "/contacts/{id}": { "delete": { "tags": ["Contacts"], "parameters": [ { "in": "path", "name": "id", "description": "The ID of the contact for deletion.", "required": true, "x-ms-summary": "ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } } } } } }, "summary": "Delete Contact", "description": "Delete a contact by its ID", "operationId": "ContactsDelete" }, "get": { "tags": ["Contacts"], "parameters": [ { "in": "path", "name": "id", "description": "The ID of the contact for retrieval.", "required": true, "x-ms-summary": "ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contact" } } } } }, "summary": "Get Contact", "description": "Retrieves a contact by its ID", "operationId": "ContactsGet" }, "patch": { "tags": ["Contacts"], "parameters": [ { "in": "path", "name": "id", "description": "The ID of the contact for deletion.", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } ], "requestBody": { "$ref": "#/components/requestBodies/ContactsCreate" }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Contact" } } } } }, "summary": "Update Contact", "description": "Updates a contact", "operationId": "ContactsUpdate" } }, "/groups": { "get": { "tags": ["Groups"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/Group" } }, "pagingMetadata": { "$ref": "#/components/schemas/PagingMetadata" } } } } } } }, "summary": "List Groups", "description": "Retrieves Groups", "operationId": "GroupsList" }, "post": { "tags": ["Groups"], "requestBody": { "$ref": "#/components/requestBodies/GroupsCreate" }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Group" } } } } }, "summary": "Create Group", "description": "Creates a group", "operationId": "GroupsCreate" } }, "/groups/{id}": { "delete": { "tags": ["Groups"], "parameters": [ { "in": "path", "name": "id", "description": "The ID of the group for deletion.", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "delete_contacts": { "description": "Specifies whether the contacts who are members of this group should also be deleted.", "type": "string", "x-ms-summary": "Delete Contacts" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } }, "summary": "Delete Group", "description": "Delete a group by its ID", "operationId": "GroupsDelete" }, "get": { "tags": ["Groups"], "parameters": [ { "in": "path", "name": "id", "description": "The ID of the group for retrieval.", "required": true, "x-ms-summary": "ID", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Group" } } } } }, "summary": "Get Group", "description": "Retrieves a group by its ID", "operationId": "GroupsGet" }, "patch": { "tags": ["Groups"], "parameters": [ { "in": "path", "name": "id", "description": "The ID of the group for updating.", "required": true, "x-ms-summary": "ID", "schema": { "type": "integer" } } ], "requestBody": { "$ref": "#/components/requestBodies/GroupsCreate" }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Group" } } } } }, "summary": "Update Group", "description": "Updates a group", "operationId": "GroupsUpdate" } }, "/hooks": { "delete": { "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "description": "The ID of the webhook you want to delete.", "type": "integer", "x-ms-summary": "ID" } }, "required": ["id"] } } }, "required": true }, "tags": ["Hooks"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "properties": { "code": { "type": "string" }, "error_message": { "type": "string" }, "id": { "type": "integer" }, "success": { "type": "boolean" } }, "type": "object" } } } } }, "summary": "Delete Hook", "description": "Deletes a hook by its ID.", "operationId": "HooksDelete" }, "get": { "tags": ["Hooks"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "properties": { "hooks": { "properties": { "id": { "type": "string" }, "target_url": { "type": "string" }, "headers": { "type": "string" }, "event_type": { "type": "string", "enum": [ "all", "rcs", "sms_mo", "dlr", "voice_call", "voice_status", "voice_dtmf", "tracking" ] }, "event_filter": { "type": "string" }, "request_method": { "type": "string", "enum": ["GET", "JSON", "POST"] }, "enabled": { "type": "boolean" }, "created": { "type": "string" } }, "type": "object" }, "success": { "type": "boolean" } }, "type": "object" } } } } } } } }, "summary": "List Hooks", "description": "Query the active webhooks of your account.", "operationId": "HooksList" }, "post": { "tags": ["Hooks"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "target_url": { "description": "Destination address of your webhook.", "type": "string", "x-ms-summary": "Target URL" }, "headers": { "description": "Custom headers to be sent to the webhook URL. Could contain multiple headers separated by a line break.", "type": "string", "x-ms-summary": "Headers" }, "event_type": { "description": "Type of event for which you would like to receive a webhook.", "type": "string", "enum": [ "all", "rcs", "sms_mo", "dlr", "voice_call", "voice_status", "voice_dtmf", "tracking" ], "x-ms-summary": "Event Type" }, "event_filter": { "description": "Sends the webhook only if the filter applies. For example, for different webhooks with different inbound numbers.", "type": "string", "x-ms-summary": "Event Filter" }, "request_method": { "description": "Request method in which you would like to receive the webhook.", "type": "string", "enum": ["GET", "JSON", "POST"], "x-ms-summary": "Request Method" } }, "required": ["target_url", "event_type"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "properties": { "code": { "type": "string" }, "error_message": { "type": "string" }, "id": { "type": "integer" }, "success": { "type": "boolean" } }, "type": "object" } } } } }, "summary": "Create Hook", "description": "Creates a hook", "operationId": "HooksCreate" } }, "/journal/outbound": { "get": { "tags": ["Journal"], "parameters": [ { "$ref": "#/components/parameters/journalId" }, { "$ref": "#/components/parameters/journalDateFrom" }, { "$ref": "#/components/parameters/journalDateTo" }, { "$ref": "#/components/parameters/journalTo" }, { "$ref": "#/components/parameters/journalState" }, { "$ref": "#/components/parameters/journalLimit" }, { "$ref": "#/components/parameters/journalOffset" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "allOf": [ { "type": "object", "properties": { "channel": { "type": "string", "description": "The communication channel used." }, "dlr": { "type": "string", "description": "The message delivery report." }, "dlr_timestamp": { "type": "string", "description": "The message delivery report timestamp." }, "mccmnc": { "type": "string", "description": "The mobile country code / mobile network code." }, "latency": { "type": "string", "description": "The message delivery latency." }, "type": { "type": "string", "description": "The SMS type." }, "connection": { "type": "string", "description": "The connection type." }, "label": { "type": "string", "description": "The label used for this message." }, "foreign_id": { "type": "string", "description": "The foreign ID used for this message." } } }, { "$ref": "#/components/schemas/JournalBase" } ] } } } } } }, "summary": "Get outbound messages", "description": "Retrieves outbound journals for the associated API key", "operationId": "JournalOutbound" } }, "/journal/inbound": { "get": { "tags": ["Journal"], "parameters": [ { "$ref": "#/components/parameters/journalId" }, { "$ref": "#/components/parameters/journalDateFrom" }, { "$ref": "#/components/parameters/journalDateTo" }, { "$ref": "#/components/parameters/journalTo" }, { "$ref": "#/components/parameters/journalState" }, { "$ref": "#/components/parameters/journalLimit" }, { "$ref": "#/components/parameters/journalOffset" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JournalBase" } } } } } }, "summary": "Get inbound messages", "description": "Retrieves inbound journals for the associated API key", "operationId": "JournalInbound" } }, "/journal/replies": { "get": { "tags": ["Journal"], "parameters": [ { "$ref": "#/components/parameters/journalId" }, { "$ref": "#/components/parameters/journalDateFrom" }, { "$ref": "#/components/parameters/journalDateTo" }, { "$ref": "#/components/parameters/journalTo" }, { "$ref": "#/components/parameters/journalState" }, { "$ref": "#/components/parameters/journalLimit" }, { "$ref": "#/components/parameters/journalOffset" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/JournalBase" } } } } } }, "summary": "Get message replies", "description": "Retrieves message replies for the associated API key", "operationId": "JournalReplies" } }, "/journal/voice": { "get": { "tags": ["Journal"], "parameters": [ { "$ref": "#/components/parameters/journalId" }, { "$ref": "#/components/parameters/journalDateFrom" }, { "$ref": "#/components/parameters/journalDateTo" }, { "$ref": "#/components/parameters/journalTo" }, { "$ref": "#/components/parameters/journalState" }, { "$ref": "#/components/parameters/journalLimit" }, { "$ref": "#/components/parameters/journalOffset" } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/JournalBase" }, { "type": "object", "properties": { "xml": { "type": "boolean" }, "duration": { "type": "string" }, "status": { "type": "string" }, "error": { "type": "string" } } } ] } } } } } }, "summary": "Get voice journal", "description": "Retrieves voice calls for the associated API key", "operationId": "JournalVoice" } }, "/lookup/cnam": { "get": { "tags": ["Lookup"], "parameters": [{ "$ref": "#/components/parameters/lookupNumber" }], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "description": "The API status code.", "type": "number" }, "success": { "type": "string", "enum": ["true", "false"] }, "name": { "type": "string", "description": "The name of the country" }, "number": { "type": "string", "description": "The number formatted accordingly to the E.164 standard in a human readable format." } } } } } } }, "summary": "Lookup Caller Name", "description": "Retrieves Caller name info", "operationId": "LookupCNAM" } }, "/lookup/format": { "get": { "tags": ["Lookup"], "parameters": [{ "$ref": "#/components/parameters/lookupNumber" }], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/NumberFormat" } } } } }, "summary": "Lookup Format", "description": "Retrieves number format info", "operationId": "LookupFormat" } }, "/lookup/hlr": { "get": { "tags": ["Lookup"], "parameters": [{ "$ref": "#/components/parameters/lookupNumber" }], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "international_formatted": { "type": "string", "description": "The number formatted accordingly to the E.164 standard in a human readable format." }, "country_name": { "type": "string", "description": "The full english name if the number belonging country." }, "country_code": { "type": "string", "description": "The area code of the number belonging country. This value is numeric." }, "international_format_number": { "type": "string" }, "national_format_number": { "type": "string" }, "country_prefix": { "type": "string" }, "current_carrier": { "$ref": "#/components/schemas/Carrier" }, "original_carrier": { "$ref": "#/components/schemas/Carrier" }, "lookup_outcome": { "type": "string" }, "lookup_outcome_message": { "type": "string" }, "valid_number": { "type": "string" }, "reachable": { "type": "string" }, "roaming": { "$ref": "#/components/schemas/Roaming" } } } } } } }, "summary": "Lookup HLR", "description": "Retrieves home location register info", "operationId": "LookupHLR" } }, "/lookup/mnp": { "get": { "tags": ["Lookup"], "parameters": [{ "$ref": "#/components/parameters/lookupNumber" }], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "code": { "type": "number", "enum": [100, 202, 500, 600] }, "success": { "type": "boolean", "description": "Determines if the request was successful.," }, "price": { "format": "float", "type": "number" }, "mnp": { "$ref": "#/components/schemas/MNP" } } } } } } }, "summary": "Lookup MNP", "description": "Retrieves mobile number portability info", "operationId": "LookupMNP" } }, "/lookup/rcs": { "get": { "tags": ["Lookup"], "parameters": [ { "in": "query", "name": "number", "description": "The phone number to look up", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "allOf": [ { "$ref": "#/components/schemas/NumberFormat" }, { "type": "array", "items": { "type": "string" } } ] } } } } }, "summary": "Lookup RCS Capabilities", "description": "Retrieves Rich Content Services capabilities", "operationId": "LookupRCS" } }, "/numbers/active": { "get": { "tags": ["Numbers"], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "activeNumbers": { "type": "array", "items": { "$ref": "#/components/schemas/ActiveNumber" } } } } } } } }, "summary": "List Active Numbers", "description": "Retrieves active phone numbers", "operationId": "NumbersListActive" } }, "/numbers/active/{number}": { "delete": { "tags": ["Numbers"], "parameters": [ { "in": "path", "name": "number", "description": "The phone number to delete.", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "delete_immediately": { "description": "If set to true, the number will be deleted immediately. If set to false, the number will be deleted at the end of the current billing period.", "type": "string", "default": false, "x-ms-summary": "Delete Immediately" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } }, "summary": "Delete Number", "description": "Deletes a phone number", "operationId": "NumbersDelete" }, "get": { "tags": ["Numbers"], "parameters": [ { "in": "path", "name": "number", "description": "The phone number to retrieve.", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveNumber" } } } } }, "summary": "Get Number", "description": "Retrieves a phone number", "operationId": "NumbersGet" }, "patch": { "tags": ["Numbers"], "parameters": [ { "in": "path", "name": "number", "description": "The phone number to update details for.", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } ], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "friendly_name": { "description": "The updated friendly name for the number.", "type": "string", "x-ms-summary": "Friendly Name" }, "sms_forward": { "description": "The phone number to forward incoming SMS to. If empty, incoming SMS won't be forwarded by SMS.", "type": "array", "items": { "type": "string" }, "x-ms-summary": "SMS Forward" }, "email_forward": { "description": "The email address to forward incoming SMS to. If empty, incoming SMS won't be forwarded by email.", "type": "array", "items": { "type": "string" }, "x-ms-summary": "Email Forward" }, "slack_forward": { "description": "The Slack webhook URL to forward incoming SMS to. If empty, incoming SMS won't be forwarded by Slack.", "type": "array", "items": { "type": "string" }, "x-ms-summary": "Slack Forward" } } } } } }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveNumber" } } } } }, "summary": "Update Number", "description": "Updates a phone number", "operationId": "NumbersUpdate" } }, "/numbers/available": { "get": { "tags": ["Numbers"], "parameters": [ { "in": "query", "name": "country", "description": "The ISO 3166-1 alpha-2 country code of the country to search for available numbers in.", "required": false, "x-ms-summary": "Country", "schema": { "type": "string" } }, { "in": "query", "name": "features_sms", "description": "If set to true, only numbers that support SMS will be returned.", "required": false, "x-ms-summary": "Features SMS", "schema": { "type": "boolean" } }, { "in": "query", "name": "features_a2p_sms", "description": "If set to true, only numbers that support A2P SMS will be returned.", "required": false, "x-ms-summary": "Features A2P SMS", "schema": { "type": "boolean" } }, { "in": "query", "name": "features_voice", "description": "If set to true, only numbers that support voice will be returned.", "required": false, "x-ms-summary": "Features Voice", "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "availableNumbers": { "type": "array", "items": { "type": "object", "properties": { "country": { "type": "string" }, "number": { "type": "string" }, "number_parsed": { "type": "string" }, "fees": { "type": "object", "properties": { "monthly": { "type": "object", "properties": { "basic_charge": { "type": "number" }, "setup": { "type": "number" } } }, "annually": { "type": "object", "properties": { "basic_charge": { "type": "number" }, "setup": { "type": "number" } } }, "sms_mo": { "type": "integer", "format": "int32" }, "voice_mo": { "type": "number" } } }, "features": { "type": "object", "properties": { "sms": { "type": "boolean" }, "a2p_sms": { "type": "boolean" }, "voice": { "type": "boolean" } } } } } } } } } } } }, "summary": "Get Available Numbers", "description": "Retrieves available numbers", "operationId": "NumbersListAvailable" } }, "/numbers/order": { "post": { "tags": ["Numbers"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "number": { "description": "The phone number to order.", "type": "string", "x-ms-summary": "Number" }, "payment_interval": { "description": "The payment interval for the number. Possible values are monthly and annually (default).", "type": "string", "enum": ["annually", "monthly"], "default": "annually", "x-ms-summary": "Payment Interval" } }, "required": ["number"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } } } } } }, "summary": "Order Number", "description": "Orders a number", "operationId": "NumbersOrder" } }, "/pricing": { "get": { "tags": ["Account"], "parameters": [ { "in": "query", "name": "country", "description": "The countries ISO code to get pricing for. Example values are \"de\" for Germany or \"fr\" for France. Omit to show pricing for all channels.", "x-ms-summary": "Country Restriction", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "countCountries": { "type": "integer", "description": "The number if countries in total." }, "countNetworks": { "type": "integer", "description": "The number of total networks." }, "countries": { "type": "array", "items": { "type": "object", "properties": { "countryCode": { "type": "string", "description": "The countries ISO code." }, "countryName": { "type": "string", "description": "The countries full name." }, "countryPrefix": { "type": "string", "description": "The countries number prefix." }, "networks": { "type": "array", "items": { "type": "object", "properties": { "comment": { "description": "Any information which might be of interest.", "type": "string" }, "features": { "description": "The features supported by this network.", "type": "array", "items": { "type": "string" } }, "networkName": { "type": "string", "description": "The full name of the carrier." }, "mcc": { "type": "string", "description": "The mobile country code." }, "mncs": { "description": "The mobile network code(s).", "type": "array", "items": { "type": "string" } }, "price": { "type": "number", "format": "float" } } } } } } } } } } } } }, "summary": "Get Pricing", "description": "Retrieves pricing information for a single country or all", "operationId": "Pricing" } }, "/rcs/events": { "post": { "tags": ["RCS"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "event": { "description": "The event to trigger", "type": "string", "enum": ["IS_TYPING", "READ"], "x-ms-summary": "Event" }, "msg_id": { "description": "The ID of the received RCS to which you want to send the event. If not specified, the event is automatically sent to the last RCS message received.", "type": "string", "x-ms-summary": "Message ID" }, "to": { "description": "The phone number to which you want to send the event.", "type": "string", "x-ms-summary": "To" } }, "required": ["event"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } }, "summary": "Trigger RCS Event", "description": "Trigger a Rich Content Message event", "operationId": "RcsEvent" } }, "/rcs/messages": { "post": { "tags": ["RCS"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "text": { "description": "The actual text message to send", "type": "string", "x-ms-summary": "Message Content" }, "to": { "description": "The recipient number", "type": "string", "x-ms-summary": "Recipient" }, "from": { "description": "Optional agent ID", "type": "string", "x-ms-summary": "Agent ID" }, "foreign_id": { "description": "Identifier to return in callbacks for status reports etc.", "type": "string", "pattern": "^[A-Z|a-z|0-9|.|\\-|_|@]+", "x-ms-summary": "Foreign ID" }, "label": { "description": "A custom label for sorting analytics", "type": "string", "pattern": "^[A-Z|a-z|0-9|.|\\-|_|@]+", "x-ms-summary": "Label" }, "delay": { "description": "Date/Time for delayed dispatch - expects a timestamp \"1141511104\" or date time \"2016-03-04 23:25:04\"", "type": "string", "x-ms-summary": "Delay" }, "performance_tracking": { "description": "Enable performance tracking for found URLs", "type": "boolean", "default": false, "x-ms-summary": "Performance Tracking" }, "fallback": { "description": "Message fallback type", "type": "string", "enum": ["sms", "webview"], "x-ms-summary": "Fallback" } }, "required": ["text", "to"] } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsResponse" } } } } }, "summary": "Send RCS", "description": "Sends a Rich Content Message", "operationId": "RcsDispatch" } }, "/rcs/messages/{id}": { "delete": { "tags": ["RCS"], "parameters": [ { "in": "path", "name": "id", "description": "The message ID for deletion", "required": true, "x-ms-summary": "Message ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } } }, "summary": "Delete RCS", "description": "Delete a scheduled Rich Content Message", "operationId": "RcsDelete" } }, "/sms": { "delete": { "tags": ["SMS"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "ids": { "description": "A list of the SMS to be deleted. Enter the respective id's of the SMS to be deleted here.", "type": "array", "items": { "type": "integer" }, "x-ms-summary": "A list of the SMS to be deleted. Enter the respective id's of the SMS to be deleted here." } }, "required": ["ids"] } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "properties": { "deleted": { "items": { "type": "integer" }, "type": "array" }, "success": { "type": "boolean" } }, "type": "object" } } } } }, "summary": "Delete Sms", "description": "Delete one or more SMS messages before they have been sent to prevent them from being sent.", "operationId": "SmsDelete" }, "post": { "tags": ["SMS"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "text": { "description": "The actual text message to send - may not exceed 1520 characters", "type": "string", "x-ms-summary": "Message Content" }, "to": { "description": "The recipient number(s) or contact/group name(s) - separate multiple recipients by comma", "type": "string", "x-ms-summary": "Recipient(s)" }, "from": { "description": "A custom sender name. A maximum of 11 alphanumeric or 16 numeric characters", "type": "string", "x-ms-summary": "Sender Identifier" }, "foreign_id": { "description": "Identifier to return in callbacks for status reports etc.", "type": "string", "pattern": "^[A-Z|a-z|0-9|.|\\-|_|@]+", "x-ms-summary": "Foreign ID" }, "label": { "description": "A custom label for sorting analytics", "type": "string", "pattern": "^[A-Z|a-z|0-9|.|\\-|_|@]+", "x-ms-summary": "Label" }, "udh": { "description": "A custom user data deader - if set and message contains hex code, the message gets sent as 8-bit binary", "type": "string", "x-ms-summary": "User Data Header" }, "delay": { "description": "Date/Time for delayed dispatch - expects a timestamp \"1141511104\" or date time \"2016-03-04 23:25:04\"", "type": "string", "x-ms-summary": "Delay" }, "flash": { "description": "Send as flash SMS which appears directly on the recipients screen", "type": "boolean", "default": false, "x-ms-summary": "Flash" }, "performance_tracking": { "description": "Enable performance tracking for found URLs", "type": "boolean", "default": false, "x-ms-summary": "Performance Tracking" } }, "required": ["text", "to"] } } }, "required": true }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsResponse" } } } } }, "summary": "Send Sms", "description": "Sends one or multiple SMS to one or multiple recipients", "operationId": "SmsDispatch" } }, "/status": { "get": { "tags": ["Status"], "parameters": [ { "in": "query", "name": "msg_id", "description": "A comma separated list of SMS IDs to check", "required": true, "x-ms-summary": "Message ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SmsStatus" } } } } } }, "summary": "Get SMS Status", "description": "Retrieves dispatch status for given SMS IDs", "operationId": "Status" } }, "/subaccounts/list": { "get": { "tags": ["Subaccounts"], "parameters": [ { "in": "query", "name": "id", "description": "The ID of a subaccount. This will give you only the data for a specific subaccount.", "required": false, "x-ms-summary": "ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Subaccount" } } } } } }, "summary": "List Subaccounts", "description": "Request a list of all subaccounts of an account.", "operationId": "SubaccountsList" } }, "/subaccounts/create": { "post": { "tags": ["Subaccounts"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "name": { "description": "Full first and last name of the account owner.", "type": "string", "x-ms-summary": "Name" }, "email": { "description": "Email address of the account.", "type": "string", "x-ms-summary": "Email" } }, "required": ["name", "email"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "subaccount": { "$ref": "#/components/schemas/Subaccount" }, "success": { "type": "boolean" } } } } } } }, "summary": "Create Subaccount", "description": "Creates a subaccount.", "operationId": "SubaccountsCreate" } }, "/subaccounts/update": { "post": { "tags": ["Subaccounts"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "description": "The ID of the subaccount.", "type": "string", "x-ms-summary": "ID" }, "threshold": { "description": "The credit threshold, below which credit should be transferred.", "type": "number", "x-ms-summary": "Threshold" }, "amount": { "description": "The amount of credit that should be sent from the main account to the subaccount when threshold is reached.", "type": "number", "x-ms-summary": "Amount" } }, "required": ["id", "threshold", "amount"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } } } } } }, "summary": "Automatic Balance Transfer", "description": "With this API, you can configure the automatic credit transfer for a subaccount. This can transfer credit from the main account to the subaccount when a set threshold is reached. To deactivate, simply set amount to 0.", "operationId": "SubaccountsAutomaticBalanceTransfer" } }, "/subaccounts/transfer_credits": { "post": { "tags": ["Subaccounts"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "description": "The ID of the subaccount.", "type": "string", "x-ms-summary": "ID" }, "amount": { "description": "Credit to be transferred.", "type": "number", "x-ms-summary": "Amount" } }, "required": ["id", "amount"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } } } } } }, "summary": "Manual Credit Transfer", "description": "With this API, you can transfer credit from the main account to the subaccount once.", "operationId": "SubaccountsManualBalanceTransfer" } }, "/subaccounts/delete": { "post": { "tags": ["Subaccounts"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "id": { "description": "The ID of the subaccount.", "type": "string", "x-ms-summary": "ID" } }, "required": ["id"] } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } } } } } }, "summary": "Delete Subaccount", "description": "With this API, subaccounts can be deleted based on their ID.", "operationId": "SubaccountsDeleteSubaccount" } }, "/validate_for_voice": { "post": { "tags": ["Validate For Voice"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "number": { "description": "The number to validate for usage with the Voice API", "type": "string", "x-ms-summary": "Number" }, "callback": { "description": "The optional callback URL to query right after validation", "type": "string", "format": "uri", "x-ms-summary": "Callback" } }, "required": ["number"] } } }, "required": true }, "responses": { "200": { "description": "Success" } }, "summary": "Validate Caller ID for Voice", "description": "Validates the given phone number for the use of voice API", "operationId": "ValidateForVoice" } }, "/voice": { "post": { "tags": ["Voice"], "requestBody": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "to": { "description": "The message receiver - must be a valid phone number or contact from the address book", "type": "string", "x-ms-summary": "Recipient" }, "text": { "description": "The text to convert to a voice message - accepts valid TwiML too", "type": "string", "maxLength": 10000, "x-ms-summary": "Text" }, "ringtime": { "description": "The duration of the ringing until the phone is hung up.", "type": "number", "minimum": 5, "maximum": 60, "x-ms-summary": "Ringtime" }, "from": { "description": "Sets the sender - must be a verified sender - use an inbound number of yours or one of ours.", "type": "string", "maxLength": 16, "x-ms-summary": "From" }, "foreign_id": { "description": "A unique ID that you can use for later assignment of the call. This ID is passed in the webhook events.", "type": "string", "x-ms-summary": "Foreign ID" } }, "required": ["to", "text"] } } }, "required": true }, "responses": { "200": { "description": "Success" } }, "summary": "Send text-to-speech Voice Call", "description": "Sends a text-to-speech message to a given recipient number", "operationId": "VoiceDispatch" } }, "/voice/{call_id}/hangup": { "post": { "tags": ["Voice"], "parameters": [ { "in": "path", "name": "call_id", "description": "The ID of the call to be ended", "required": true, "x-ms-summary": "Call ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } } } } } } }, "summary": "End Voice Call", "description": "This endpoint ends an active call. Only calls with the status in-progress can be ended.", "operationId": "VoiceCallEnd" } } }, "security": [{ "oauth2_auth": [] }], "tags": [ { "name": "SMS", "externalDocs": { "description": "Send one/multiple SMS", "url": "https://docs.seven.io/en/rest-api/endpoints/sms" } }, { "name": "Status", "externalDocs": { "description": "Retrieve the status for a sent SMS with the given ID", "url": "https://docs.seven.io/en/rest-api/endpoints/status-reports" } }, { "name": "Validate For Voice", "externalDocs": { "description": "Validate caller ID for voice Voice API", "url": "https://docs.seven.io/en/rest-api/endpoints/sender-identifiers" } }, { "name": "Voice", "externalDocs": { "description": "Issue voice call to phone number", "url": "https://docs.seven.io/en/rest-api/endpoints/voice" } }, { "name": "Lookup", "externalDocs": { "description": "Get number format, CNAM,- HLR- or MNP information for given phone number", "url": "https://docs.seven.io/en/rest-api/endpoints/lookup" } }, { "name": "Numbers", "externalDocs": { "description": "Explore detailed documentation on utilizing our Phone Number Management API for comprehensive control over searching, booking, and managing your communication channels' phone numbers.", "url": "https://docs.seven.io/en/rest-api/endpoints/numbers" } }, { "name": "Contacts", "externalDocs": { "description": "Contacts are a central part of seven. You can use to manage contacts programmatically. We'll look at how you can query, create, update and delete contacts.", "url": "https://docs.seven.io/en/rest-api/endpoints/contacts" } }, { "name": "Groups", "externalDocs": { "description": "You can query, create, update and delete groups.", "url": "https://docs.seven.io/en/rest-api/endpoints/groups" } }, { "name": "Subaccounts", "externalDocs": { "description": "Create, delete, retrieve information, and transfer balance. Ideal for those who want to manage their account structure clearly and efficiently.", "url": "https://docs.seven.io/en/rest-api/endpoints/subaccounts" } }, { "name": "Hooks", "externalDocs": { "description": "You can create, view and delete webhooks via this endpoint.", "url": "https://docs.seven.io/en/rest-api/endpoints/webhooks" } }, { "name": "Account", "externalDocs": { "description": "Account-specific endpoints.", "url": "https://docs.seven.io/en/rest-api/endpoints/account" } }, { "name": "RCS", "externalDocs": { "description": "Endpoints regarding Rich Content Services.", "url": "https://docs.seven.io/en/rest-api/endpoints/rcs" } }, { "name": "Journal", "externalDocs": { "description": "Endpoints regarding insights for sent/received messages.", "url": "https://docs.seven.io/en/rest-api/endpoints/logbook" } } ], "externalDocs": { "description": "Find out more about the seven.io SMS gateway.", "url": "https://docs.seven.io/en/rest-api/first-steps" }, "servers": [{ "url": "https://gateway.seven.io/api" }], "components": { "parameters": { "analyticsEnd": { "in": "query", "name": "end", "description": "End date of the statistics. Defaults to the current day.", "x-ms-summary": "End Date", "schema": { "type": "string" } }, "analyticsStart": { "in": "query", "name": "start", "description": "Start date of the statistics in the format YYYY-MM-DD. By default, the date of 30 days ago is set.", "x-ms-summary": "Start Date", "schema": { "type": "string" } }, "analyticsLabel": { "in": "query", "name": "label", "description": "Shows only data of a specific label.", "x-ms-summary": "Label", "schema": { "type": "string" } }, "analyticsSubaccounts": { "in": "query", "name": "subaccounts", "description": "Receive the data only for the main account, all your (sub-)accounts or only for specific subaccounts.", "x-ms-summary": "Subaccounts", "schema": { "type": "string" } }, "journalId": { "in": "query", "name": "id", "description": "The ID of a message", "x-ms-summary": "ID", "schema": { "type": "integer" } }, "journalDateFrom": { "in": "query", "name": "date_from", "description": "A start date from which the search should start", "x-ms-summary": "Date From", "schema": { "type": "string" } }, "journalDateTo": { "in": "query", "name": "date_to", "description": "An end date up to which the search is to be performed", "x-ms-summary": "Date To", "schema": { "type": "string" } }, "journalTo": { "in": "query", "name": "to", "description": "The receivers phone number in any format.", "x-ms-summary": "To", "schema": { "type": "string" } }, "journalState": { "in": "query", "name": "state", "description": "The status of the message. - could be e.g. completed / failed for Voice or DELIVERED / NOTDELIVERED etc. for SMS", "x-ms-summary": "State", "schema": { "type": "string" } }, "journalLimit": { "in": "query", "name": "limit", "description": "Limits the number of entries to be returned.", "x-ms-summary": "Limit", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } }, "journalOffset": { "in": "query", "name": "offset", "description": "Starting point from which entries are to be queried.", "x-ms-summary": "State", "schema": { "type": "integer" } }, "lookupNumber": { "in": "query", "name": "number", "description": "The phone number to look up", "required": true, "x-ms-summary": "Number", "schema": { "type": "string" } } }, "requestBodies": { "ContactsCreate": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "address": { "description": "The address of a contact", "type": "string", "x-ms-summary": "Address" }, "avatar": { "description": "The avatar of a contact", "type": "string", "x-ms-summary": "Avatar" }, "birthday": { "description": "The birthday of a contact", "type": "string", "x-ms-summary": "Birthday" }, "city": { "description": "The city of a contact", "type": "string", "x-ms-summary": "City" }, "email": { "description": "The email of a contact", "type": "string", "x-ms-summary": "Email" }, "firstname": { "description": "The first name of a contact", "type": "string", "x-ms-summary": "First Name" }, "home_number": { "description": "The home number of a contact", "type": "string", "x-ms-summary": "Home Number" }, "lastname": { "description": "The last name of a contact", "type": "string", "x-ms-summary": "Last Name" }, "mobile_number": { "description": "The mobile number of a contact", "type": "string", "x-ms-summary": "Mobile Number" }, "notes": { "description": "The notes of a contact", "type": "string", "x-ms-summary": "Notes" }, "postal_code": { "description": "The postal code of a contact", "type": "string", "x-ms-summary": "Postal Code" } } } } } }, "GroupsCreate": { "content": { "application/x-www-form-urlencoded": { "schema": { "type": "object", "properties": { "name": { "description": "The name of a group", "type": "string", "x-ms-summary": "Name" } } } } } } }, "securitySchemes": { "oauth2_auth": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://oauth.seven.io/authorize", "tokenUrl": "https://oauth.seven.io/token", "scopes": { "analytics": "analytics", "balance": "balance", "contacts": "contacts", "hooks": "hooks", "journal": "journal", "lookup": "lookup", "pricing": "pricing", "rcs": "rcs", "sms": "sms", "status": "status", "subaccounts": "subaccounts", "validate_for_voice": "validate_for_voice", "voice": "voice" } } } } }, "schemas": { "ActiveNumber": { "properties": { "country": { "type": "string" }, "number": { "type": "string" }, "friendly_name": { "type": "string" }, "billing": { "type": "object", "properties": { "fees": { "type": "object", "properties": { "setup": { "type": "number" }, "basic_charge": { "type": "number" }, "sms_mo": { "type": "integer", "format": "int32" }, "voice_mo": { "type": "integer", "format": "int32" } } }, "payment_interval": { "type": "string" } } }, "features": { "type": "object", "properties": { "sms": { "type": "boolean" }, "a2p_sms": { "type": "boolean" }, "voice": { "type": "boolean" } } }, "forward_sms_mo": { "type": "object", "properties": { "sms": { "type": "object", "properties": { "number": { "type": "string" }, "enabled": { "type": "boolean" } } }, "email": { "type": "object", "properties": { "address": { "type": "array", "items": { "type": "string" } }, "enabled": { "type": "boolean" } } }, "slack": { "type": "object", "properties": { "uri": { "type": "string" }, "enabled": { "type": "boolean" } } } } }, "expires": { "type": "string" }, "created": { "type": "string" } }, "type": "object" }, "AnalyticsBase": { "properties": { "sms": { "type": "integer", "description": "The amount of outgoing SMS for this day." }, "rcs": { "type": "integer", "description": "The amount of RCS messages for this day." }, "voice": { "type": "integer", "description": "The amount of voice calls for this day." }, "hlr": { "type": "integer", "description": "The amount of HLR lookups for this day." }, "mnp": { "type": "integer", "description": "The amount of MNP lookups for this day." }, "inbound": { "type": "integer", "description": "The amount of inbound messages for this day." }, "usage_eur": { "type": "number", "description": "The total costs for this day." } }, "type": "object" }, "Carrier": { "type": "object", "properties": { "network_code": { "type": "string" }, "name": { "type": "string" }, "country": { "type": "string" }, "network_type": { "type": "string", "enum": [ "fixed_line", "fixed_line_or_mobile", "mobile", "pager", "personal_number", "premium_rate", "shared_cost", "toll_free", "uan", "unknown", "voicemail", "voip" ] } } }, "Contact": { "type": "object", "properties": { "id": { "type": "integer", "format": "int32" }, "avatar": { "type": "string" }, "validation": { "type": "object", "properties": { "state": { "type": "string" }, "timestamp": { "type": "string" } } }, "initials": { "type": "object", "properties": { "initials": { "type": "string" }, "color": { "type": "string" } } }, "properties": { "type": "object", "properties": { "firstname": { "type": "string" }, "lastname": { "type": "string" }, "mobile_number": { "type": "integer", "format": "int64" }, "home_number": { "type": "string" }, "email": { "type": "string" }, "address": { "type": "string" }, "postal_code": { "type": "string" }, "city": { "type": "string" }, "birthday": { "type": "string", "format": "date" }, "notes": { "type": "string" } } }, "groups": { "type": "array", "items": { "type": "integer" } }, "created": { "type": "string" } } }, "Group": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "members_count": { "type": "integer" }, "has_more": { "type": "boolean" } } }, "JournalBase": { "type": "object", "properties": { "to": { "type": "string", "description": "The message recipient." }, "from": { "type": "string", "description": "The message sender." }, "text": { "type": "string", "description": "The message text." }, "timestamp": { "type": "string", "description": "The message timestamp." }, "price": { "type": "string", "description": "The message price." }, "id": { "type": "string", "description": "The message price." } } }, "MNP": { "type": "object", "properties": { "country": { "type": "string" }, "number": { "type": "string" }, "national_format": { "type": "string" }, "international_formatted": { "type": "string" }, "network": { "type": "string" }, "mccmnc": { "type": "string" }, "isPorted": { "type": "boolean" }, "network_type": { "type": "string" } } }, "NumberFormat": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Determines if the request was successful.," }, "international": { "type": "string", "description": "The number formatted accordingly to the E.164 standard." }, "international_formatted": { "type": "string", "description": "The number formatted accordingly to the E.164 standard in a human readable format." }, "national": { "type": "string", "description": "The number in a domestic number format." }, "country_iso": { "type": "string", "description": "The two digit ISO 3166-1 alpha-2 country code." }, "country_name": { "type": "string", "description": "The full english name if the number belonging country." }, "country_code": { "type": "string", "description": "The area code of the number belonging country. This value is numeric." } } }, "PagingMetadata": { "type": "object", "properties": { "offset": { "type": "integer" }, "count": { "type": "integer" }, "total": { "type": "integer" }, "limit": { "type": "integer" }, "has_more": { "type": "boolean" } } }, "Roaming": { "type": "object", "properties": { "status": { "type": "string", "enum": ["unknown", "roaming", "not_roaming"] }, "roaming_country_code": { "type": "string" }, "roaming_network_code": { "type": "string" }, "roaming_network_name": { "type": "string" } } }, "SmsResponse": { "properties": { "balance": { "type": "number" }, "debug": { "pattern": "\\b(false|true)", "type": "string" }, "messages": { "items": { "properties": { "encoding": { "pattern": "\\b(gsm|ucs2)", "type": "string" }, "error": { "type": "string" }, "error_text": { "type": "string" }, "id": { "type": "string", "minLength": 1 }, "parts": { "minimum": 1, "type": "integer" }, "price": { "minimum": 0, "type": "number" }, "recipient": { "type": "string" }, "sender": { "type": "string" }, "success": { "type": "boolean" }, "text": { "type": "string" } }, "type": "object" }, "type": "array" }, "sms_type": { "enum": ["direct"], "type": "string" }, "success": { "type": "string" }, "total_price": { "minimum": 0, "type": "number" } }, "type": "object" }, "SmsStatus": { "items": { "properties": { "id": { "type": "string" }, "status": { "enum": [ "DELIVERED", "NOTDELIVERED", "BUFFERED", "TRANSMITTED", "ACCEPTED", "EXPIRED", "REJECTED", "FAILED", "UNKNOWN" ], "type": "string" }, "status_time": { "type": "string" } }, "type": "object" }, "type": "array" }, "Subaccount": { "properties": { "id": { "type": "string" }, "username": { "type": "string" }, "company": { "type": "string" }, "balance": { "type": "string" }, "total_usage": { "type": "string" }, "auto_topup": { "properties": { "amount": { "type": "string" }, "threshold": { "type": "string" } }, "type": "object" }, "contact": { "properties": { "email": { "type": "string" }, "name": { "type": "string" } }, "type": "object" } }, "type": "object" } } } }