8x8

SMS API

8x8 Connect SMS API for single and batch A2P SMS delivery worldwide, with sender ID handling, encoding control, delivery receipts and message status lookup.

OpenAPI Specification

8x8-connect-sms-api.json Raw ↑
{
  "openapi": "3.0.1",
  "info": {
    "title": "SMS API",
    "description": "API to send SMS messages",
    "contact": {
      "name": "8x8 Inc",
      "url": "https://cpaas.8x8.com",
      "email": "cpaas-support@8x8.com"
    },
    "termsOfService": "https://cpaas.8x8.com/sg/terms-and-conditions/",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://sms.8x8.com",
      "description": "Asia-Pacific region"
    },
    {
      "url": "https://sms.us.8x8.com",
      "description": "North America region"
    },
    {
      "url": "https://sms.8x8.uk",
      "description": "Europe region"
    },
    {
      "url": "https://sms.8x8.id",
      "description": "Indonesia region"
    }
  ],
  "tags": [
    {
      "name": "Send SMS API"
    },
    {
      "name": "Reporting API"
    },
    {
      "name": "Engage API"
    },
    {
      "name": "Webhook Configuration API"
    }
  ],
  "paths": {
    "/api/v1/subaccounts/{subAccountId}/messages": {
      "post": {
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsResponse"
                },
                "examples": {
                  "response": {
                    "value": {
                      "umid": "bda3d56d-1424-e711-813c-06ed3428fe67",
                      "clientMessageId": "client-message-id",
                      "destination": "12025550275",
                      "encoding": "GSM7",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/500"
          },
          "426": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/426"
          }
        },
        "tags": ["Send SMS API"],
        "summary": "Send SMS",
        "description": "* Sending a POST request on this endpoint allows to **send SMS individually (1 request per SMS)**.\n* It is ideal to send single personalized messages for use-cases like notifications or alerts.\n\n### URL\nThe 8x8 SMS subaccountid to use is defined in the URL where you send your POST request as shown below:\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/messages`\n\n> You must replace `{subAccountId}` in the URL above with the subaccountid that you want to use.",
        "operationId": "Send-Sms-Single",
        "parameters": [
          {
            "name": "subAccountId",
            "in": "path",
            "description": "You must replace *{subAccountId}* with the subaccountid that you want to use. By default this is generated once you signed up with a new account at [https://connect.8x8.com](https://connect.8x8.com).",
            "required": true,
            "schema": {
              "maxLength": 50,
              "minLength": 3,
              "pattern": "^[A-Za-z0-9\\-._&]{3,50}$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Send SMS operation body",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SmsRequest"
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/messages/batch": {
      "post": {
        "tags": ["Send SMS API"],
        "summary": "Send SMS batch",
        "description": "* Sending a POST request to this endpoint allows you to **send SMS by batches (1 request for multiple SMS) with shared or personalized contents/properties**.        \n* Personalized content is ideal for sending marketing campaigns or any mass personalized announcement.\n* Shared content is easier to use for such cases as an announcement, message broadcasting, etc.\n* It only accepts messages with the same properties (source, text, encoding, scheduling time, and expiry time). \n* Using this endpoint, it is possible to send up to 10,000 SMS per request.\n\n### URL\nThe 8x8 SMS subaccountid to use is defined in the URL where you send your POST request as shown below:\n\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/messages/batch`\n\n\n> You must replace `{subAccountId}` in the URL above with the subaccountid that you want to use.",
        "operationId": "Send-Many-Sms",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          }
        ],
        "requestBody": {
          "description": "## Request structure\n\nTo send many SMS using the 8x8 SMS API you need to submit a JSON-formatted request with the following elements:\n\n| Name | Type | Description | Required |\n|:-------------------------:|:-------:|-------------------------------------------------------------------------|:--------:|\n| **messages** | array | Array containing multiple SmsRequest objects (see Single doc) | Required, Exclusive |\n| **destinations** | array | Array containing the list of destinations phone numbers to send an SMS to | Required, Exclusive |\n| **clientBatchId** | string | Unique ID that you want to associate with the batch of SMS | Optional |\n| **template** | object | Object applying common properties to the SmsRequest objects in messages | Optional |\n| **includeMessagesInResponse** | boolean | Boolean defining if the API response should contain the SMS details | Optional |\n\n* Use `messages` property to create a batch with personalized content or `destinations` field to send the same shared content to multiple phones.\n* Either `messages` or `destinations` should be provided in the request. If both properties are provided, the `messages` property takes precedence, and the `destinations` property is **discarded**.\n\n\n## About the template object\n\n- The **many** endpoint incorporates a new logic with the template object. \n- The purpose of this object is to let you specify the common properties of the SMS contained in the messages into a single object. \n- The best practice is **to only incorporate the unique properties of each SMS in the SmsRequest objects** contained in the messages array **while specifying the common properties in the template object.**\n- The **template object is optional in the request.**\n\nThe template object can take the following parameters:\n\n| Name | Type | Description | Required |\n|:---------:|:---------:|:---------------------------------------------------------------:|:--------:|\n| **text** | string | SMS body (ie: text of the message) | Required |\n| **source** | string | Alphanumeric or numeric string used as Sender ID for the SMS | Optional |\n| **encoding** | string | Character set to use for this SMS - The possible values are `AUTO` - `GSM7` - `UCS2` | Optional |\n| **scheduled** | timestamp | Pre-defined date and time for this SMS to be sent in the future | Optional |\n| **expiry** | timestamp | Maximum date and time for this SMS to be sent at | Optional |\n| **dlrCallbackUrl** | uri | Webhook URL where delivery status for the SMS will be posted (_Overwrites your default account callback URL_). | Optional |",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchSmsRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "- The response returns **two different IDs for the batch**:\n  + **batchId**: the unique batch ID generated automatically by 8x8\n  + **clientBatchId**: the batch ID that you submitted in the request (if any)\n- It also returns a **summary of the batch submission**:\n  + **acceptedCount**: number of SMS accepted by the API\n  + **rejectedCount**: number of SMS rejected by the API\n- If the **includeMessagesInResponse** boolean has been set to True during the request, it also **returns an array containing individual information for each SMS submitted** to the API in the many request: \n  + **umid**: unique message ID automatically generated by 8x8\n  + **clientMessageId**: message ID that you submitted (if any)\n  + **destination**: destination phone number to which the SMS was sent to\n  + **encoding**: SMS encoding - `GSM7` or `UCS2`\n- And then it returns a **status object** containing the following:\n\n  - **status code**: the status code can be either:\n    + **QUEUED**: the SMS has been accepted by 8x8 SMS API and is queued for processing.\n    + **REJECTED**: the SMS has been rejected by 8x8 SMS API and the reason is stated in the description field. It will not be processed. \n  - **description**: this field describes the status code and provides additional information explaining the status. It can take the following values: \n    + *SMS is accepted and queued for processing (QUEUED Status)*\n    + *Text value is missing (REJECTED Status)*\n    + *Invalid Text value. Reached max allowed limit (REJECTED Status)*\n    + *Invalid Source value. Reached max allowed limit (REJECTED Status)*\n    + *Expiry time already reached (REJECTED Status)*\n    + *Invalid MSISDN format (not E.164 international number) (REJECTED Status)*\n    + *Internal server error (REJECTED Status)*",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchSmsResponse"
                },
                "example": {
                  "batchId": "f1ea5276-a824-e711-8146-022a22cc1c71",
                  "clientBatchId": "Demo#1001",
                  "acceptedCount": 3,
                  "rejectedCount": 1,
                  "messages": [
                    {
                      "umid": "f2ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "Demo#1001/6598760001",
                      "destination": "6598760001",
                      "encoding": "GSM7",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    },
                    {
                      "umid": "f3ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "id_100001",
                      "destination": "659876002",
                      "encoding": "GSM7",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    },
                    {
                      "umid": "f3ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "id_100002",
                      "destination": "33509750003",
                      "encoding": "UCS2",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    },
                    {
                      "umid": "f3ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "id_100003",
                      "destination": "+1123456789",
                      "encoding": "GSM7",
                      "status": {
                        "code": "REJECTED",
                        "description": "Invalid MSISDN format (not E.164 international number)"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/500"
          },
          "426": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/426"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/messages/batch/{batchId}": {
      "delete": {
        "tags": ["Send SMS API"],
        "summary": "Cancel batch of scheduled SMS",
        "description": "- Sending a DELETE request on this this endpoint allows to **cancel a batch of scheduled messages** that has not been sent yet.\n- This method should be used to cancel a batch of scheduled messages sent by  previously submitting a POST request to either the \"many\" or \"many compact\" endpoint.\n- To cancel a batch of scheduled messages, use its *batchId* to target it.\n\n### URL\n* In the original POST request used to schedule the batch of messages, you used a specific subaccountid and the API responded with a batchID.\n* You need to use both as path parameters in order to send your DELETE request successfully as shown below:\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/messages/batch/{batchId}`\n\n> You must replace `{subAccountId}` and `{batchId}` in the URL above with the subaccountid you used to schedule the messages in the first place and the batchId you got in response.",
        "operationId": "cancel-many-sms-messages",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          },
          {
            "name": "batchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "cancelledCount": {
                      "type": "integer",
                      "description": "Number of cancelled messages"
                    }
                  }
                },
                "example": {
                  "cancelledCount": 10
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/500"
          },
          "426": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/426"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/messages/{umid}/feedback": {
      "post": {
        "tags": ["Send SMS API"],
        "summary": "SMS Success Feedback",
        "description": "### About SMS Feedback\n\nMost of the time, programmatic SMS are meant to trigger a specific outcome (_ex: authenticate a user via OTP_).\nWhen the outcome does not happen it can have any number of user-related cause but what we seek to avoid is for SMS deliverability or latency to be the reason for failure.\nTo avoid this, use this endpoint to transmit the outcome to 8x8 and let 8x8 monitor your SMS performance for you.\nIt benefits you by allowing 8x8 to: \n\n- **Monitor your application QoS for any SMS-related failure** happening in your workflows \n- **Act faster to restore the quality** of service you experiment\n- **Prevent any further issue**\n- Provide more advanced analytics by displaying **SMS outcome performance and latency metrics**\n\n### About the API endpoint / method\n* Sending a POST request on this endpoint allows to **convey the outcome of an SMS to 8x8**.\n* Sharing that feedback with 8x8 is straightforward, your  POST request only has to contain:\n\t1. The 8x8 **UMID - Unique Message ID** (included in the API response when sending the SMS)\n\t2. A status for **the outcome** \n\t3. For more accuracy and to get latency information: the **timestamp of the event triggered by the SMS**\n\n### URL \nComplete endpoint URL:`https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/messages/{umid}/feedback`\n\n> You must replace `{subAccountId}` in the URL above with the subaccountid that you used originally to send the SMS.",
        "operationId": "api-Sms-Feedback",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          },
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages~1%7Bumid%7D/get/parameters/1"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/feedback"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "",
            "content": {}
          },
          "400": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/500"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/surveys/{surveyId}/messages": {
      "post": {
        "tags": ["Engage API"],
        "summary": "Send SMS Engage survey",
        "description": "### About SMS Engage\n* **SMS Engage** combines the reach of SMS and the power of interactive web surveys\n* Using the API endpoint lets you send SMS containing special links to surveys for any use case: \n\t* Satisfaction feedback (NPS, CSAT, CES..)\n\t* Interactive marketing landing page\n\t* E-commerce confirmations (Order, Delivery, Payment)\n\t* and much more: reach out to learn more! \n* SMS Engage surveys are linked to your 8x8 account: each individual survey response can be tracked back to the original SMS or SMS campaigns: get individual response logs and aggregated analytics in your 8x8 Customer Portal\n* You can also retrieve the SMS Engage response programmatically using the dedicated webhook\n\n### About the API endpoint / method\n* Sending a POST request on this endpoint allows to **send SMS Engage individually (1 message per request)**.\n* It is ideal when you want to integrate surveys as part of your customer experience and trigger an SMS Engage following an event occurring in your application (_eg: NPS survey sent after customer support interaction_)\n\n### URL\nThe 8x8 SMS subaccountid to use is defined in the URL where you send your POST request as shown below:\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/surveys/{surveyId}/messages`\n\n> You must replace `{subAccountId}` in the URL above with the subaccountid that you want to use.\n\n### Before you start\n\n* You must have your account activated to use SMS Engage and at least one SMS Engage form created for you by 8x8. SMS Engage forms are created based on your use-cases. Once they are created, 8x8 will provide you a **surveyid** and **url**.\n* Please note that the variable **url** is your default SMS Engage link which 8x8 has set up for you (e.g. http://smstoweb.net?sid=1234). The url is shortened once the message has been sent.\n* The shortened url is always 21 characters in length.\n* If you want to get the data via Webhooks, simply provide us a specific url where we will post the data. \n* For more information please contact <a href='mailto:sales-cpaas@8x8.com'>your account manager</a> or <a href='mailto:cpaas-support@8x8.com'>customer support team</a>.",
        "operationId": "Survey-Send",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          },
          {
            "name": "surveyId",
            "in": "path",
            "description": "The surveyId will be provided to you by 8x8. This Id is a unique name of your SMS-to-Form which 8x8 creates based on the use-cases you defined.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SurveyRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmsResponse"
                },
                "example": {
                  "umid": "bda3d56d-1424-e711-813c-06ed3428fe67",
                  "clientMessageId": "1234",
                  "destination": "6500000000",
                  "encoding": "GSM7",
                  "status": {
                    "code": "QUEUED",
                    "description": "SMS is accepted and queued for processing"
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/500"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/surveys/{surveyId}/messages/batch": {
      "post": {
        "tags": ["Engage API"],
        "summary": "Send SMS Engage surveys as batch",
        "description": "* Sending a POST request on this endpoint allows to **send SMS Engage surveys by batch (multiple messages per request)**.\n* It is ideal when you want to send a batch of surveys on a recurring manner or based on time parameters (_eg: Order collection at the end of the month_)\n\n### URL\n* The 8x8 subaccountid to use is defined in the URL where you send your POST request as shown below:\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountId}/surveys/{surveyId}/messages/batch`\n",
        "operationId": "Survey-Send-Many",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          },
          {
            "name": "surveyId",
            "in": "path",
            "description": "The surveyId will be provided to you by 8x8. This Id is a unique name of your SMS-to-Form which 8x8 creates based on the use-cases you defined.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "* 8x8 SMS API accepts an **ApiKey Bearer Token**  authentication method.\n  * You can generate  apiKey tokens from your customer portal  [https://connect.8x8.com/](https://connect.8x8.com/)\n  * You need to include the following header in your requests: `Authorization: Bearer {apiKey}`\n\t* _NB: (replace the `{api=key}` placeholder with the key generated from the customer portal)_\n\nIf you haven't created your account yet, please go to 8x8 website [https://connect.8x8.com](https://connect.8x8.com) to sign up.",
            "schema": {
              "type": "string",
              "format": "password",
              "default": "{$$.env.Authorization}"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchSurveyRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchSmsResponse"
                },
                "example": {
                  "batchId": "f1ea5276-a824-e711-8146-022a22cc1c71",
                  "clientBatchId": "Demo#1001",
                  "acceptedCount": 3,
                  "rejectedCount": 1,
                  "messages": [
                    {
                      "umid": "f2ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "Demo#1001/6598760001",
                      "destination": "6598760001",
                      "encoding": "GSM7",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    },
                    {
                      "umid": "f3ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "id_100001",
                      "destination": "659876002",
                      "encoding": "GSM7",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    },
                    {
                      "umid": "f3ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "id_100002",
                      "destination": "33509750003",
                      "encoding": "UCS2",
                      "status": {
                        "code": "QUEUED",
                        "description": "SMS is accepted and queued for processing"
                      }
                    },
                    {
                      "umid": "f3ea5276-a824-e711-8146-022a22cc1c71",
                      "clientMessageId": "id_100003",
                      "destination": "+12025550127",
                      "encoding": "GSM7",
                      "status": {
                        "code": "REJECTED",
                        "description": "Invalid MSISDN format (not E.164 international number)"
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/400"
          },
          "401": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/401"
          },
          "500": {
            "$ref": "#/paths/~1api~1v1~1accounts~1%7BaccountId%7D~1prices/get/responses/500"
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/messages/exports": {
      "post": {
        "tags": ["Reporting API"],
        "summary": "Start SMS log export job",
        "description": "* Sending a **POST** request on this endpoint allows to **request an SMS logs file**.\n\n### URL\n\nThe 8x8 SMS `subAccountId` needs to be provided in the URL as shown below:\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountID}/messages/exports`\n\n> You must replace `{subAccountId}` in the URL above with the subaccountid that you want to use.",
        "operationId": "start-log-export-job",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogExportRequest"
              }
            }
          },
          "required": false
        },
        "responses": {
          "202": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "required": ["jobId"],
                  "type": "object",
                  "properties": {
                    "jobId": {
                      "type": "string",
                      "description": "Identifier of the job started. Use this value to query job result."
                    }
                  }
                },
                "example": {
                  "jobId": "F1T6z9C5tW2QV1pdMzO9xpMXrYEmfnvqORGqpePJGpgzjTJ80TSaZEE7aX2wrgix"
                }
              }
            }
          }
        },
        "security": [
          {
            "apiKey": []
          }
        ]
      }
    },
    "/api/v1/subaccounts/{subAccountId}/messages/exports/{jobId}": {
      "get": {
        "tags": ["Reporting API"],
        "summary": "Get log export job result",
        "description": "* Sending a **GET** request on this endpoint allows to **check the status of an SMS Logs export job** and to **get a download link** if its generation has succeeded.\n\n  \n\n### URL\n\nTo define which SMS logs export you want to retrieve, you need to enter the Job ID generated by XXXXX in the path as well as the 8x8 SMS subaccountid you used in the previous request.\n`https://sms.8x8.com/api/v1/subaccounts/{subAccountID}/messages/exports/{jobId}`\n\n> To safeguard your privacy, sensitive data such as message content and phone numbers are masked by default. Access to this information can be requested by contacting our support team.\n\n> You must replace `{jobID}`  and `{subAccountId}` in the URL above with the jobID and subaccountid from the start SMS logs export job request",
        "operationId": "get-log-export-job-result",
        "parameters": [
          {
            "$ref": "#/paths/~1api~1v1~1subaccounts~1%7BsubAccountId%7D~1messages/post/parameters/0"
          },
          {
            "name": "jobId",
            "in": "path",
            "description": "Export job identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "In case of successful request which comes with a 200 code, you will be presented with a **status** parameter value (string). Here are the possible cases and their meaning:\n\n- **queued** - request for report creation is waiting in the queue\n\n- **running** - report creation has started, but not finished yet\n- **succeeded** - report created and CSV file can be downloaded using the link in the data property\n- **failed** - the report creation failed\n- **cancelled** - the report job has been cancelled \n- **empty** - the report is empty\n- **error** - an internal server error occurred\n\nOnce the platform will have successfully generated an SMS logs export (`\"status\":\"succeeded\"`), the links to the files will be contained in an array value of the parameter called **data**. \n\nThe files to the links have a default expiry date of 1 month from the moment the jobs succeeds and the files are made available for download. This expiration datetime is included in the response along with the data, as the value of a parameter called **expires**\n\n\n\n### SMS Logs files format\n\nThe SMS logs files generated are **CSV files**. The files contains the following columns of data about individual messages:\n\n- **umid**: *Unique Message ID (automatically generated by the platform)*\n- **subaccountid**: *Subaccount used to send/receive the message*\n- **direction**: *Indicates the direction of the message (1 = Outbound, 0= Inbound)*\n- **country**: *Country of destination of the message*\n- **operator**: * Operator of destination of the message*\n- **mcc**: * Mobile Country Code of the recipient number of the message*\n- **mnc**: *Mobile 

# --- truncated at 32 KB (125 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/8x8/refs/heads/main/openapi/8x8-connect-sms-api.json