# Developer Center Introduction

Learn how to get started with the Mobile Text Alerts API.

## Welcome to the Mobile Text Alerts Developer Center

With the Mobile Text Alerts API you can take full control over your account with message sending, phone number segmentation and more. The API allows you to perform CRUD (create, read, update, delete) operations without incurring any additional costs, as API access comes bundled with every subscription.&#x20;

## First Steps

{% stepper %}
{% step %}

### Sign Up for your Free SMS Trial Account

<a href="https://mobile-text-alerts.com/signup-smsapi" class="button primary">Create your free account</a>
{% endstep %}

{% step %}

### Get an API Key

Mobile Text Alerts API endpoints use bearer token authentication. Requests must include an `Authorization` header with a value of `Bearer {myAPIKey}` . API Keys are unique access tokens assigned to a Mobile Text Alerts account, learn more at [Get an API Key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key).
{% endstep %}

{% step %}

### Explore actions

Once authenticated, you can use the Mobile Text Alerts API to send messages, retrieve subscriber information, advanced features like configuring smart responses and more. All endpoints in the API adhere to REST conventions and utilize standard HTTP methods.&#x20;
{% endstep %}
{% endstepper %}

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>New to using a REST API or just getting started with the MTA API? Start here: </td><td><a href="getting-started/send-a-message">send-a-message</a></td><td><a href="getting-started/add-a-subscriber">add-a-subscriber</a></td><td><a href="getting-started/setting-up-webhooks">setting-up-webhooks</a></td><td><a href="api-basics">api-basics</a></td><td><a href="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FY6nDZfOEVoYDKC4zjIYb%2Fgraphic_getting-started.svg?alt=media&#x26;token=89f132a6-da2e-4603-b552-6b80bfbf3ffb">graphic_getting-started.svg</a></td></tr><tr><td>Step through Tutorials to learn more about common actions with the API</td><td><a href="tutorials/message-sending/send-an-sms-message">send-an-sms-message</a></td><td><a href="tutorials/message-sending/send-an-mms-message">send-an-mms-message</a></td><td><a href="tutorials/message-sending/message-templates">message-templates</a></td><td><a href="tutorials/manage-subscribers">manage-subscribers</a></td><td><a href="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2F2bqDIdSkmYdMC8dbQeKn%2Fgraphic_api-basics.svg?alt=media&#x26;token=92b3b2b7-a3e9-477d-8180-175f5362e2f6">graphic_api-basics.svg</a></td></tr><tr><td>Have a question about how to use Mobile Text Alerts API?</td><td><a href="faq">faq</a></td><td></td><td></td><td></td><td><a href="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FAMoHzhJaBLzobGIP9M94%2Fgraphic_faq.svg?alt=media&#x26;token=49e019fc-2971-4f39-be0f-b6ede609f991">graphic_faq.svg</a></td></tr></tbody></table>


# Latest Updates

See the latest revisions, new content and updated references for all developer resources in Developer Center.

{% hint style="info" %}
The <i class="fa-sparkles">:sparkles:</i> icon indicates an AI-first feature.
{% endhint %}

## 2026

### April 2026

* New Tutorial added: [phone-number-format-guide](https://developers.mobile-text-alerts.com/tutorials/phone-number-format-guide "mention")

### March 2026

* New [smpp-server](https://developers.mobile-text-alerts.com/smpp-server "mention") page has been added.

### February 2026

* New [Webhooks API Reference](https://developers.mobile-text-alerts.com/api-reference/webhooks) page has been added.
* All webhooks-related pages have been updated.&#x20;

### January 2026

* Added getting started steps to [#using-the-mobile-text-alerts-sdks](https://developers.mobile-text-alerts.com/sdks#using-the-mobile-text-alerts-sdks "mention")&#x20;
* Node.js and Python code samples added to:
  * [get-an-api-key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key "mention")
  * [send-a-message](https://developers.mobile-text-alerts.com/getting-started/send-a-message "mention")
  * [add-a-subscriber](https://developers.mobile-text-alerts.com/getting-started/add-a-subscriber "mention")
  * [check-delivery-status](https://developers.mobile-text-alerts.com/check-delivery-status "mention")

## 2025

### December 2025&#x20;

* <i class="fa-sparkles">:sparkles:</i> New page for [knowledge-base-mcp-server](https://developers.mobile-text-alerts.com/mcp-servers/knowledge-base-mcp-server "mention") under [mcp-servers](https://developers.mobile-text-alerts.com/mcp-servers "mention") to give your AI tools access to all the available developer and help content.
* Launched new [sdks](https://developers.mobile-text-alerts.com/sdks "mention") page to help you learn how to integrate with MTA’s API across different platforms and languages. First SDK subpage added:
  * [typescript-sdk](https://developers.mobile-text-alerts.com/sdks/typescript-sdk "mention")

### November 2025

* <i class="fa-sparkles">:sparkles:</i> Launched new AI section, here you can learn how to utilize all of Mobile Text Alerts AI-first features.  New pages:
  * [how-to-use-ai-with-mobile-text-alerts](https://developers.mobile-text-alerts.com/ai/how-to-use-ai-with-mobile-text-alerts "mention")
  * [mcp-servers](https://developers.mobile-text-alerts.com/mcp-servers "mention")
  * [actions-mcp-server](https://developers.mobile-text-alerts.com/mcp-servers/actions-mcp-server "mention")
    * [connect-with-claude](https://developers.mobile-text-alerts.com/mcp-servers/actions-mcp-server/connect-with-claude "mention")

### October 2025

* Expanded [API Reference](https://developers.mobile-text-alerts.com/api-reference) with newly released API endpoints and refreshed documentation content on over 50 endpoints.

### September 2025

* Launched our new [API Reference](https://developers.mobile-text-alerts.com/api-reference) -  Complete, detailed documentation for every publicly available endpoint provided by the Mobile Text Alerts API. Developers using Mobile Text Alerts now have an even easier way of referencing any endpoint in our API with full interactivity and the ability to create requests directly within the documentation.
* <i class="fa-sparkles">:sparkles:</i> Introduced new Open in ChatGPT / Claude options for every page on the Developer Center. Simply click on the **Copy** menu on the top right, and you can send any Developer Center page to your preferred AI assistant and it will analyze and summarize the page for you.

  <img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FMaKm75moNsrw5JBfnlCE%2FCopyMenuAI.png?alt=media&#x26;token=bb5f9e3b-e202-40d6-938e-7b0e155807f4" alt="Screenshot of Copy Menu" data-size="original">

### August 2025

* Expanded [FAQ](https://developers.mobile-text-alerts.com/faq) page with more commonly questions, sourced directly from conversations with our users!
* Improvements to the following pages:
  * [get-an-api-key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key "mention")
  * [setting-up-webhooks](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks "mention")
  * Messaging Routes - [10dlc](https://developers.mobile-text-alerts.com/messaging-routes/10dlc "mention"), [toll-free](https://developers.mobile-text-alerts.com/messaging-routes/toll-free "mention"), [short-code](https://developers.mobile-text-alerts.com/messaging-routes/short-code "mention")
  * [message-templates](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates "mention")
* Added a new Messaging Route Guide - [send-an-imessage](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-imessage "mention")

### July 2025

* <i class="fa-sparkles">:sparkles:</i> Introduced support for `llms.txt` and `llms-full.txt` for robust LLM crawling and access.
* <i class="fa-sparkles">:sparkles:</i> Added Markdown support for all documentation pages. Just append `.md` to a Developer Center URL to get a Markdown version, perfect for LLMs.
* New detailed [adaptive-groups](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/adaptive-groups "mention") tutorial
* New Messaging Routes Guide - [rcs-rbm](https://developers.mobile-text-alerts.com/messaging-routes/rcs-rbm "mention")
* Revamped [custom-subscriber-attributes](https://developers.mobile-text-alerts.com/tutorials/custom-subscriber-attributes "mention") tutorials, adding distinct tutorials for [assigning](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/assign-custom-subscriber-attributes) and managing custom attributes

### June 2025

* New [groups-bulk-add-delete-subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/groups-bulk-add-delete-subscribers "mention") tutorial&#x20;
* Expanded and clarified our [Rate Limits](https://developers.mobile-text-alerts.com/api-basics/rate-limits) page, added sections for endpoint-specific rate limits
* Launched an improved [Developer Center Introduction page](https://developers.mobile-text-alerts.com/developer-center-introduction) with a handy registry of links using new visual card elements.

### May 2025

* Added a new dedicated Getting Started guide: [check-delivery-status](https://developers.mobile-text-alerts.com/check-delivery-status "mention")
* New Tutorials:
  * [custom-subscriber-attributes](https://developers.mobile-text-alerts.com/tutorials/custom-subscriber-attributes "mention")
  * [group-subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers "mention")
* Launched a new [Use Cases](https://developers.mobile-text-alerts.com/use-cases) section with our first use case study: [generate-and-validate-2fa-mfa-codes-via-sms](https://developers.mobile-text-alerts.com/use-cases/generate-and-validate-2fa-mfa-codes-via-sms "mention")&#x20;

### April 2025

* Developer Center launches! A new, comprehensive space for new guides, tutorials and API reference material for Mobile Text Alerts.
* Launched with a full suite of [Message Sending Tutorials](https://developers.mobile-text-alerts.com/tutorials/message-sending), [Messaging Route Guides](https://developers.mobile-text-alerts.com/messaging-routes) and a step-by-step [Getting Started](https://developers.mobile-text-alerts.com/getting-started) flow.


# Get an API Key

Learn how to generate API keys to create authenticated requests to the Mobile Text Alerts API.

{% hint style="info" %}
In order to receive an API Key, you must have a Mobile Text Alerts account. [Click here](https://mobile-text-alerts.com/signup-smsapi) to sign up for one!
{% endhint %}

### Generate an API Key

API Keys can be generated in the Mobile Text Alerts platform dashboard.

1. Visit [Settings](https://platform.mobile-text-alerts.com/settings) for your account. This is under the three-dot menu in the top right of the platform dashboard.
2. Select the [Developer](https://platform.mobile-text-alerts.com/#settings_developer) tab or scroll down to **Developer Resources**.
3. Click the <mark style="color:green;background-color:green;">GENERATE A NEW KEY</mark> button. Enter a name for the new **API Key**.

{% hint style="warning" %}
Once generated, store this key in a safe place. The key will no longer be available to view after clicking **“Accept”**.
{% endhint %}

This **API Key** is used to make authenticated calls to the Mobile Text Alerts API.

### Bearer Token Authentication

This **API Key** is used as a bearer token when making requests to the API. A bearer token is included in the request header to grant a user or application access to a protected endpoint.

**Header structure:** `"Authorization: Bearer {myAPIKey}"`

#### Example request to verify the API Key

The examples below send a request with a bearer token to the [<mark style="color:blue;">`/verify-api-key`</mark>](#get-auth-verify-api-key) endpoint. This verifies the **API Key** is valid:

{% tabs %}
{% tab title="cURL" %}

```bash
curl -L \
  -H 'Authorization: Bearer <APIKey>' \
  'https://api.mobile-text-alerts.com/v3/auth/verify-api-key'
```

{% endtab %}

{% tab title="Node.js" %}

```js
// Run with: node --env-file=.env verify.js
async function main() {
  const apiKey = process.env.MTA_API_KEY;

  const response = await fetch(
    "https://api.mobile-text-alerts.com/v3/auth/verify-api-key",
    {
      method: "GET",
      headers: {
        "Authorization": `Bearer ${apiKey}`,
        "Accept": "*/*",
      },
    }
  );

  console.log("STATUS:", response.status);
  console.log("CONTENT-TYPE:", response.headers.get("Content-Type"));

  const contentType = response.headers.get("Content-Type");
  if (contentType && contentType.includes("application/json")) {
    const data = await response.json();
    console.log(data);
  } else {
    const text = await response.text();
    console.log(text);
  }
}

main().catch((err) => {
  console.error("Request failed:", err);
  process.exitCode = 1;
});
```

{% endtab %}

{% tab title="Python" %}
Example `verify.py` file (requires `pip install requests python-dotenv`):

<pre class="language-python"><code class="lang-python"><strong>import os
</strong>import requests
from dotenv import load_dotenv

load_dotenv()

api_key = os.getenv("MTA_API_KEY")

response = requests.get(
   "https://api.mobile-text-alerts.com/v3/auth/verify-api-key",
   headers={
       "Authorization": f"Bearer {api_key}",
       "Accept": "*/*",
   },
)

print("STATUS:", response.status_code)
print("CONTENT-TYPE:", response.headers.get("Content-Type"))

if response.headers.get("Content-Type", "").startswith("application/json"):
   print(response.json())
else:
   print(response.text)

</code></pre>

{% endtab %}
{% endtabs %}

If the key is valid, the API returns the message: `"API Key verified"`

```json
//Example successful response
{"message":"API Key verified",
"data":{"name":"Account111111111","email":"example@mobile-text-alerts.com"}}          
```

A <mark style="color:$success;">`200`</mark> indicates success. See [error-response-codes](https://developers.mobile-text-alerts.com/api-basics/error-response-codes "mention") for possible error codes.

## GET /auth/verify-api-key

> Verify API Key

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"VerifyApiKey.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"name":{"type":"string"},"email":{"type":"string"}},"required":["name","email"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/auth/verify-api-key":{"get":{"tags":["Auth"],"summary":"Verify API Key","operationId":"auth_verify_api_key","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyApiKey.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

With a verified API key, you’re ready to send real messages. See [send-a-message](https://developers.mobile-text-alerts.com/getting-started/send-a-message "mention") to learn more.


# Send a Message

Learn how create a request to the Mobile Text Alerts API that will send a message.

Messages are sent from your account’s default number. You can add dedicated numbers ([10DLC](https://developers.mobile-text-alerts.com/messaging-routes/10dlc), [toll-free](https://developers.mobile-text-alerts.com/messaging-routes/toll-free), or [short code](https://developers.mobile-text-alerts.com/messaging-routes/short-code)) if you need higher throughput or two-way messaging.

{% hint style="info" %}

#### Ready to send your own content?

You may be restricted to sending templated message content if you’re still on a trial account and/or have an unverified phone number. [Click here](https://mobile-text-alerts.deskpro.com/kb/articles/phone-number-verification) to learn how to get a verified number and start sending your own content.
{% endhint %}

## Send a message with the Mobile Text Alerts API

Messages are sent via the API with `POST` requests to the [<mark style="color:blue;">`/send`</mark>](https://developers.mobile-text-alerts.com/api-reference/send#post-send) endpoint. The request data must contain both **recipient** and **content** information.

**Required Fields:** (Must be one of the following from each)

* **Recipient(s):**
  * `subscriberIds: number[]` - List of subscriber IDs of recipients. Messages can be sent to specific subscribers, with each subscriber assigned a unique `subscriberId`.
  * `subscribers: (number | string)[]` - List of recipient phone numbers or email addresses. A new subscriber will be created for new recipients that are not already subscribers on your account.&#x20;
    * To ensure your messages are sent to the intended recipients this field must be formatted correctly based on how your subscribers are stored. E.164 formatted strings are recommended. See [phone-number-format-guide](https://developers.mobile-text-alerts.com/tutorials/phone-number-format-guide "mention") to learn more.
  * `allSubscribers: boolean` - Flag to indicate send message to all subscribers if `true`. When `allSubscribers` is set to `true`, no other recipient fields should be specified. Default value is `false`.
  * `groups: number[]` - List of group IDs of recipients. Messages can be sent to specific groups, with each group assigned a unique `groupId`.
  * `threadId: number` - Messages can be sent in reply to a thread, with each thread assigned a unique `threadId`.
* **Content:**
  * `message: string` - The content of the message being sent.
  * `image: string` - The URL of an attachment for a message. By default, messages with attachments (`image`) will be sent as an MMS. This URL needs to be publicly accessible; this ensures Mobile Text Alerts can access it when sending.
  * `templateId: number` - Messages can be saved as pre-set [message templates](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) for reuse with saved controlled templates on your account assigned a `templateId`. To retrieve the templates configured on your account, use the [List Templates endpoint](https://developers.mobile-text-alerts.com/api-reference/templates#get-templates).

{% hint style="warning" %}
If using a `templateId` of a [template](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) that requires a link, then a `linkId` is also required.
{% endhint %}

### How to build a sample request to the API

Let's create a simple request to the [<mark style="color:blue;">`/send`</mark>](https://developers.mobile-text-alerts.com/api-reference/send) endpoint.

{% stepper %}
{% step %}

### Indicate the recipient(s)

You can send a message to a phone number as a test. Set the `subscribers` field to the recipient phone number.

<pre><code>"subscribers": [<a data-footnote-ref href="#user-content-fn-1">1112223333</a>]
</code></pre>

{% endstep %}

{% step %}

### Create message content

Write the content of the `message` to be sent.

{% code overflow="wrap" %}

```
"message": "Use promo code TESTMESSAGE for 5% off when you sign up. STOP to end"
```

{% endcode %}

{% hint style="warning" %}
Trial accounts and unverified phone numbers are restricted to only sending [templated message](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) content. [Click here](https://mobile-text-alerts.deskpro.com/kb/articles/phone-number-verification) to learn how to get a verified number and start sending your own content.
{% endhint %}
{% endstep %}

{% step %}

### Form API request

Create the API request to the <mark style="color:blue;">`/send`</mark> endpoint. Remember to include [Authorization](https://developers.mobile-text-alerts.com/developer-center-introduction#authentication) header.

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--header 'Authorization: Bearer <APIKey>' \
--data '{"subscribers": [1112223333],"message": "Use promo code TESTMESSAGE for 5% off when you sign up. STOP to end"}'
```

{% endtab %}

{% tab title="Node.js" %}
In a `test_send.js` file :

Requirements: Node.js `18+` (native `fetch`) and an `MTA_API_KEY` environment variable.

```js
async function sendSMS() {
  const response = await fetch('https://api.mobile-text-alerts.com/v3/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      // --- RECIPIENTS ---
      subscribers: ['+12345678900'], // Array of E.164 phone numbers
      // --- CONTENT (Stackable) ---
      message: 'Use promo code TESTMESSAGE for 5% off when you sign up. STOP to end', // Plain text body
      // image: 'https://example.com/photo.jpg', // Optional: Triggers MMS
      // templateId: 123, // Optional: Uses a pre-saved template
      // --- PRODUCTION CONTROLS ---
      // externalId: 'otp_user_42', // Optional: For tracking in webhooks
    })
  });
  
  const data = await response.json();
  console.log("MTA Response:", data);
}
sendSMS();
```

{% endtab %}

{% tab title="Python" %}
Use this as a standalone script to send a test, in a `test_send.py` file:

Requirements: `pip install requests python-dotenv` and an `MTA_API_KEY` environment variable.

```python
import os
import requests
from dotenv import load_dotenv

load_dotenv()

def send_sms():
    url = "https://api.mobile-text-alerts.com/v3/send"
    
    payload = {
        # --- RECIPIENTS ---
        "subscribers": ["+12345678900"],
        
        # --- CONTENT (Stackable) ---
        "message": "Use promo code TESTMESSAGE for 5% off when you sign up. STOP to end",
        # "image": "https://example.com/photo.jpg",
        # "templateId": 123,
        
        # --- PRODUCTION CONTROLS ---
        # "externalId": "otp_user_42",
    }

    response = requests.post(
        url, 
        headers={"Authorization": f"Bearer {os.getenv('MTA_API_KEY')}"}, 
        json=payload
    )
    
    print("MTA Response:", response.json())

if __name__ == "__main__":
    send_sms()
```

{% endtab %}
{% endtabs %}
{% endstep %}

{% step %}

### Receive Response

The API will return a message about the status of your request.

```json
{
  "data": {
    "messageId": "uuid",
    "totalSent": 1,
    "totalFailedInternationalRecipients": 0
  },
  "message": "Message Sent to 1 Recipient."
}
```

See [error-response-codes](https://developers.mobile-text-alerts.com/api-basics/error-response-codes "mention") to learn about possible reasons your request may fail.
{% endstep %}
{% endstepper %}

## Learn more

[Send a Message API Reference](https://developers.mobile-text-alerts.com/api-reference/send)

Learn how you can [customize your message sends](https://developers.mobile-text-alerts.com/tutorials/message-sending).

[^1]: Recipient's phone number


# Add a Subscriber

Learn how to use the Mobile Text Alerts API to add a subscriber to your account

The Mobile Text Alerts API allows you to view, add, edit, and remove subscribers from your account just like you can from the [platform dashboard page](https://platform.mobile-text-alerts.com/subscribers/manage). This page will guide you through adding a subscriber with the API.

{% hint style="info" %}
Already have a contact list? You can [import contacts in bulk](https://mobile-text-alerts.com/articles/importing-contacts#import-phone-numbers-android-iphone-google) via a spreadsheet or integration instead of adding them individually through the API.
{% endhint %}

## Add a Subscriber with the Mobile Text Alerts API

Subscribers can be added via the API with a `POST` request to the <mark style="color:blue;">`/subscribers`</mark> endpoint. A phone number (`number`) or email address (`email`) is required. If you add a phone number or email of a subscriber that already exists on the account, this will update the existing subscriber with any changes.

{% hint style="info" %}
It is recommended to submit the `number` field as type `string` in [E.164 format ](https://developers.mobile-text-alerts.com/tutorials/phone-number-format-guide#recommended-format-e.164). &#x20;

See [phone-number-format-guide](https://developers.mobile-text-alerts.com/tutorials/phone-number-format-guide "mention") to learn more.
{% endhint %}

### Example request to add a subscriber

Below you can see example `POST` requests to the [<mark style="color:blue;">`/subscribers`</mark>](https://developers.mobile-text-alerts.com/api-reference/subscribers#post-subscribers) endpoint to add a new subscriber:

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location --request POST 'https://api.mobile-text-alerts.com/v3/subscribers' \
  --header 'Authorization: Bearer <APIKey>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "firstName": "FirstName",
    "lastName": "LastName",
    "number": "+18002223333",
    "email": "example@mobile-text-alerts.com"
  }'
```

{% endtab %}

{% tab title="Node.js" %}
Requirements: Node.js `18+` (native `fetch`) and an `MTA_API_KEY` environment variable.

```js
async function main() {
  const response = await fetch('https://api.mobile-text-alerts.com/v3/subscribers', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      firstName: 'Sarah',
      lastName: 'Johnson',
      number: '+18002223333',
      email: 'sarah@example.com',
      groupIds: [123, 456],
      subscriberFields: {
        '2000': 'January 1st, 2000',
        '2001': 'Premium'
      }
    })
  });

  const data = await response.json();
  console.log(data);
}

main().catch((err) => {
  console.error('Request failed:', err);
  process.exitCode = 1;
});
```

{% endtab %}

{% tab title="Python" %}
Requirements: `pip install requests` and an `MTA_API_KEY` environment variable.

```python
import requests
import os

response = requests.post(
    'https://api.mobile-text-alerts.com/v3/subscribers',
    headers={
        'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}',
        'Content-Type': 'application/json'
    },
    json={
        'firstName': 'Sarah',
        'lastName': 'Johnson',
        'number': '+18002223333',
        'email': 'sarah@example.com',
        'groupIds': [123, 456],
        'subscriberFields': {
            '2000': 'January 1st, 2000',
            '2001': 'Premium'
        }
    }
    )
print(response.json())
```

{% endtab %}
{% endtabs %}

*To view all possible request parameters see:* [#create-subscriber-api-endpoint](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers#create-subscriber-api-endpoint "mention")

#### Example Response

If valid, a response will be returned with the message: `"Subscriber created successfully."`

```json
//Example successful response
{
    "message":"Subscriber created successfully.",
    "data":
    {
        "id":109021633,
        "firstName":"FirstName",
        "lastName":"LastName",
        "email":"example@mobile-text-alerts.com",
        "number":8002223333,
        "e164Number":"+18002223333",
        "date":{"val":"CURRENT_TIMESTAMP"},
        "countryId":209,
        "groups":[],
        "subscriberFieldData":[],
        "signupMethod":5,
        "longNumber":8002223333,
        "carrierId":"41"
    }
}
```

## Create Subscriber

> Add a new subscriber. If given a phone number or email that already exists tied to the same account, updates the existing subscriber with new information\
> \
> \_Required Fields: email or number\_\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"CreateSubscriberRequest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":["firstName","lastName","email","number","groupIds","subscriberFields","employeeNumber","welcomeMessage"],"description":"SubscriberRequest"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers":{"post":{"tags":["Subscribers"],"summary":"Create Subscriber","description":"Add a new subscriber. If given a phone number or email that already exists tied to the same account, updates the existing subscriber with new information\n\n_Required Fields: email or number_\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_create_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriberRequest"}}},"required":true}}}}}
```

### More Subscriber Actions

* [All Subscribers API endpoints](https://developers.mobile-text-alerts.com/api-reference/subscribers)
* [Assign Custom Subscriber Attributes](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/assign-custom-subscriber-attributes)
* [Group Subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers)


# Setting up Webhooks

Learn how to set up webhooks with the Mobile Text Alerts API

With Mobile Text Alerts webhooks you can receive real time notifications of events, such as: sent messages, message replies, and delivery statuses. With the Mobile Text Alerts [Webhooks API endpoints](https://developers.mobile-text-alerts.com/api-reference/webhooks) you can register, delete, and view the webhooks on your account.&#x20;

## Webhooks Overview

Webhooks are a way for applications to communicate with each other, with real-time data sent from one application to another whenever a given event occurs. For events you want to be notified of, you can configure a webhook to your specified URL.

For example, when a user replies to a message that was sent; Mobile Text Alerts receives the inbound message from a provider and will post the inbound message to your provided endpoint.

## Event Types

The Mobile Text Alerts API supports the following event types for webhooks:

### Message Reply <mark style="color:blue;">`message-reply`</mark>

When Mobile Text Alerts receives an inbound message from a provider, Mobile Text Alerts will post the inbound message to the customer provided endpoint.

* [Message Reply payload](https://developers.mobile-text-alerts.com/tutorials/webhooks#message-reply)

### Delivery Status <mark style="color:blue;">`delivery-status`</mark>

When Mobile Text Alerts receives an updated delivery status from a provider regarding a customer's sent message.

* [Delivery Status payload](https://developers.mobile-text-alerts.com/tutorials/webhooks#delivery-status)

### Message Send <mark style="color:blue;">`message-send`</mark>

When Mobile Text Alerts sends a message to a provider, Mobile Text Alerts will post the message to the customer-provided endpoint.

* [Message Send payload](https://developers.mobile-text-alerts.com/tutorials/webhooks#message-send)

### Number Opt-In <mark style="color:blue;">`number-opt-in`</mark>

You must receive an inbound opt-in message before you send outbound [iMessages](https://developers.mobile-text-alerts.com/messaging-routes/imessage) and [RCS messages](https://developers.mobile-text-alerts.com/messaging-routes/rcs-rbm). This webhook will post the opt-in event to the customer provided endpoint.

* &#x20;[Number Opt-In payload](https://developers.mobile-text-alerts.com/tutorials/webhooks#number-opt-in)

## Webhook Failure Email Alerts

When registering a webhook, you can choose to receive emails if Mobile Text Alerts fails to send a request to your configured URL or a non-<mark style="color:green;">`200`</mark> response code was received. To receive these email alerts: when registering a webhook, set `sendAlertEmail` to `true` , with `alertEmail` set to the intended email address.

## Next Steps: Create your first webhook

Visit [setting-up-your-first-webhook](https://developers.mobile-text-alerts.com/tutorials/webhooks/setting-up-your-first-webhook "mention") to learn how to set up your first webhook

To learn more about Mobile Text Alerts webhooks, check out these other resources below:

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th></tr></thead><tbody><tr><td>View the webhook event payloads for Mobile Text Alerts</td><td><a href="../tutorials/webhooks">webhooks</a></td></tr><tr><td>View the Webhooks API Reference</td><td><a href="../api-reference/webhooks">webhooks</a></td></tr></tbody></table>


# Check Delivery Status

Learn how to view the Delivery Status of outbound messages

There are two ways to check the delivery status of your message sends with Mobile Text Alerts:

* [#call-the-list-deliveries-api-endpoint](#call-the-list-deliveries-api-endpoint "mention")
  * Best for reporting and analytics on settled message data. This includes only the most recent status for a message.
* [#configure-the-delivery-status-webhook](#configure-the-delivery-status-webhook "mention")
  * Best for real-time status updates. This webhook can send the full status history from the moment of send to the final result (delivered, rejected, etc.).

## Call the List Deliveries API endpoint

With the [<mark style="color:green;">`GET`</mark> `/deliveries`](#get-deliveries) endpoint of the Mobile Text Alerts API, you can list all messages sent to subscribers, or use query parameters to filter results. The message status shows the most recent status for each message.

### Example request to filter the delivery status

See below how to filter messages that have delivery status of  `delivered` :&#x20;

{% tabs %}
{% tab title="cURL" %}
{% code overflow="wrap" %}

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/deliveries?filters%5Bstatus%5D=delivered' \
  --header 'Authorization: Bearer <APIKey>'
```

{% endcode %}

*Note: the `[]` brackets are escaped characters*
{% endtab %}

{% tab title="Node.js" %}

```javascript
// Get only delivered messages
const response = await fetch(
  'https://api.mobile-text-alerts.com/v3/deliveries?filters[status]=delivered',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`
    }
  }
);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

# Get only delivered messages
response = requests.get(
    'https://api.mobile-text-alerts.com/v3/deliveries',
    params={'filters[status]': 'delivered'},
    headers={'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}'}
)

```

{% endtab %}
{% endtabs %}

#### Query Parameters

<table><thead><tr><th width="198.5">Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>page</code></td><td><code>number</code></td><td>Specific page number to retrieve.</td></tr><tr><td><code>pageSize</code></td><td><code>number</code></td><td>Number of results per page.</td></tr><tr><td><code>sortBy</code></td><td><code>date</code></td><td>Field to sort results by date.</td></tr><tr><td><code>sortDirection</code></td><td><code>ASC</code>|<code>DESC</code></td><td>Direction to sort results by, choose either <code>ASC</code> for ascending or <code>DESC</code> for descending.</td></tr><tr><td><code>query</code></td><td><code>string</code></td><td>The <code>query</code> string will return all subscribers with this value in either <code>firstName</code>, <code>lastName</code>, <code>number</code>, or <code>email</code>.</td></tr><tr><td><code>filters[startDate]</code></td><td><code>date</code> in format: YYYY-MM-DD</td><td>Filter results to only show results after a specified start date.</td></tr><tr><td><code>filters[endDate]</code></td><td><code>date</code> in format: YYYY-MM-DD</td><td>Filter results to only show results before a specified end date.</td></tr><tr><td><code>filters[type]</code></td><td><code>string enum</code>:<code>sms</code>|<code>mms</code>|<code>tts</code></td><td>Filter results by message type, choose one of the following type codes: <code>sms</code>|<code>mms</code>|<code>tts</code>.</td></tr><tr><td><code>filters[status]</code></td><td><code>string enum</code>:<code>sent</code>|<code>delivered</code>|<code>undelivered</code>|<code>undeliverable</code>|<code>unknown</code>|<code>rejected</code></td><td>Filter results by delivery status, choose one of the following status codes: <code>sent</code>|<code>delivered</code>|<code>undelivered</code>|<code>undeliverable</code>|<code>unknown</code>|<code>rejected</code>.</td></tr></tbody></table>

## List Deliveries

> List all subscribers and query for subscribers. Includes all subscribers with \`query\` value in either first name, last name, number, email, or custom subscriber fields and with \`filters\` values in respective categories.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDeliveries.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IDeliveryRecord"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IDeliveryRecord":{"type":"object","properties":{"messageId":{"type":"number"},"externalId":{"type":"string","nullable":true},"message":{"type":"string"},"attachment":{"type":"string"},"status":{"$ref":"#/components/schemas/MTADeliveryLabel"},"date":{"type":"string"},"carrier":{"type":"string","nullable":true},"to":{"type":"string"},"from":{"type":"string"},"type":{"$ref":"#/components/schemas/SentMessageType"}},"required":["messageId","externalId","status","date","carrier","to","from","type"]},"MTADeliveryLabel":{"type":"string","enum":["sent","delivered","undelivered","undeliverable","unknown","rejected"]},"SentMessageType":{"type":"string","enum":["sms","mms","tts","phone-call","email","survey"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deliveries":{"get":{"tags":["Deliveries"],"summary":"List Deliveries","operationId":"deliveries_list_deliveries","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeliveries.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"type":{"$ref":"#/components/schemas/SentMessageType"},"status":{"$ref":"#/components/schemas/MTADeliveryLabel"}},"required":[]}}],"description":"List all subscribers and query for subscribers. Includes all subscribers with `query` value in either first name, last name, number, email, or custom subscriber fields and with `filters` values in respective categories.\n\n\nundefined"}}}}
```

## Configure the `delivery-status` webhook

A `delivery-status` webhook event is triggered when Mobile Text Alerts receives an updated [delivery status code](https://developers.mobile-text-alerts.com/tutorials/webhooks#mta-delivery-status-codes) from a provider for a sent message. This is best for real-time status updates, since you can receive the full status history from the moment of send to the final result (delivered, rejected, etc.).

If you haven't configured webhooks for your account, see [setting-up-your-first-webhook](https://developers.mobile-text-alerts.com/tutorials/webhooks/setting-up-your-first-webhook "mention").

Also see the [Delivery Status payload](https://developers.mobile-text-alerts.com/tutorials/webhooks#delivery-status) to learn which fields are sent as part of this webhook.


# SDKs

Mobile Text Alerts provides multiple SDKs to help you integrate with Mobile Text Alert's API across different platforms and languages.

## SDK Overview

### What is an SDK?

An SDK (Software Development Kit) is a collection of tools, libraries, documentation, and code samples that developers can use to build applications for a specific platform, framework, or service. It provides a pre-packaged toolbox so developers don't need to worry about low-level implementation details and provides a higher-level interface for interacting with a system.

### Mobile Text Alerts SDKs

The Mobile Text Alert SDKs are code libraries that wrap the Mobile Text Alert's REST API to simplify operations like authentication, sending messages, listing subscribers and all functionality of the API. Instead of manually constructing HTTP requests with proper headers and authentication, you can instead call predefined methods for all your operations. The SDK makes things easier by automatically handling things such as request formatting, error handling and retry logic.&#x20;

## Using the Mobile Text Alerts SDKs

Here are the general steps for getting started using a Mobile Text Alerts SDK library in any chosen language (with examples in TypeScript) used to call the Mobile Text Alerts API:

{% stepper %}
{% step %}

### Generate an API Key

An API Key is used to make authenticated requests to the API, see [get-an-api-key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key "mention") for steps to generate your unique key.

{% hint style="info" %}
Generating an API Key requires you to have a free account. Don't have an account yet? [Click here to create your free account.](https://mobile-text-alerts.com/signup-smsapi)
{% endhint %}
{% endstep %}

{% step %}

### Choose your language and install an SDK

See below to learn more and install the currently available official supported SDK libraries:

* [typescript-sdk](https://developers.mobile-text-alerts.com/sdks/typescript-sdk "mention")

More language libraries are actively being developed.
{% endstep %}

{% step %}

### Initialize the Client

Once you install the necessary modules in your code you will need to configure the SDK with your credentials. This usually involves passing your API key to a client constructor. The client acts as a single point of configuration for all your API interactions. This is where you set your [API key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key) for authentication, the base URL and other options. This is done during initialization, so it does not need to be passed in every individual API call.

**Example Client Configuration:**&#x20;

```typescript
import { createClient, type ClientOptions } from '@mobiletextalerts/typescript-sdk';

const clientOptions: ClientOptions = {
  baseUrl: 'https://api.mobile-text-alerts.com/v3',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  // Additional client configuration options
};

const client = createClient(clientOptions);
```

{% endstep %}

{% step %}

### Call SDK functions

After creating a client, you can use functions in the SDK to call any of the Mobile Text Alerts API endpoints.&#x20;

#### TypeScript Code Examples

Some of the most common actions are: [Send a Message](https://developers.mobile-text-alerts.com/api-reference/send#post-send) and [Add a Subscriber](https://developers.mobile-text-alerts.com/api-reference/subscribers#post-subscribers).

**Send a message:**

```typescript
import { sendMessageFromApi } from '@mobiletextalerts/typescript-sdk';

const result = await sendMessageFromApi({
  client,
  body: {
    message: "Hello from your app!",
    groups: [1234567890],
    subscribers: ["1112223333","1222333444"],
    subscriberIds: [187572],
    // Additional message options
  }
});
```

**Add a subscriber:**

```typescript
import { subscribersCreateSubscriber } from '@mobiletextalerts/typescript-sdk';

const result = await subscribersCreateSubscriber({
  client,
  body: {
     firstName: "FirstName", 
     lastName: "LastName", 
     number: 8002223333, 
     email: "example@mobile-text-alerts.com", 
     // Additional optional subscriber fields
  }
});
```

{% endstep %}

{% step %}

### Error Handling&#x20;

If the API returns an HTTP [error code](https://developers.mobile-text-alerts.com/api-basics/error-response-codes) (`400`, `401`, `404`, `500`, etc.), the SDK intercepts the response and transforms it into a meaningful exception class for each endpoint.
{% endstep %}
{% endstepper %}

### Learn More

Visit the [API Reference](https://developers.mobile-text-alerts.com/api-reference) to learn more about specific API endpoints that you can call with the SDK.


# TypeScript SDK

Set up your development environment to call the Mobile Text API with the TypeScript SDK.

## Overview

This SDK provides TypeScript functions for all Mobile Text Alerts API endpoints, and provides:

* **Request/Response Types** - All API data structures are typed
* [**Error Handling** ](#error-handling)- Specific error types for each endpoint
* **Options Types** - Configuration options with proper typing
* **Auto-completion** - Full IDE support with intelligent suggestions

## Using the TypeScript SDK

### Install Node

The Mobile Text Alerts TypeScript SDK requires a working node installation of Node.js and npm. You can check which version of Node you already have installed by running the following command:

```
node -v
```

[Learn how to install or update Node to a newer version.](https://nodejs.org/en/download/)

### Install `@mobiletextalerts/typescript-sdk`&#x20;

The Mobile Text Alerts TypeScript SDK is open-source and hosted on GitHub:

* <a href="https://www.npmjs.com/package/@mobiletextalerts/typescript-sdk" class="button primary" data-icon="npm">NPM package</a>&#x20;
* <a href="https://github.com/mobiletextalerts/typescript-sdk" class="button primary" data-icon="github">GitHub source code</a>&#x20;

The latest version of the TypeScript SDK can be installed with `npm`:

```
npm install @mobiletextalerts/typescript-sdk
```

## Client Configuration

The client acts as a single point of configuration for all your API interactions. This is where you set your [API key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key) for authentication, the base URL and other options. This is done during initialization, so it does not need to be passed in every individual API call.

### Example client configuration

```typescript
import { createClient, type ClientOptions } from '@mobiletextalerts/typescript-sdk';

const clientOptions: ClientOptions = {
  baseUrl: 'https://api.mobile-text-alerts.com/v3',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  // Additional client configuration options
};

const client = createClient(clientOptions);
```

## Usage Examples

After creating a client, you can use TypeScript functions to call any of the Mobile Text Alerts API endpoints.

### Send a Message

The following example calls the [#post-send](https://developers.mobile-text-alerts.com/api-reference/send#post-send "mention") endpoint:

```typescript
import { sendMessageFromApi } from '@mobiletextalerts/typescript-sdk';

const result = await sendMessageFromApi({
  client,
  body: {
    message: "Hello from your app!",
    groups: [1234567890],
    subscribers: ["1112223333","1222333444"],
    subscriberIds: [187572],
    // Additional message options
  }
});
```

### List Subscribers

The following example calls the [#get-subscribers](https://developers.mobile-text-alerts.com/api-reference/subscribers#get-subscribers "mention") endpoint:

```typescript
import { subscribersListSubscribers } from '@mobiletextalerts/typescript-sdk';

const subscribers = await subscribersListSubscribers({
  client,
  query: {
    page: 1,
    pageSize: 100
  }
});
```

### Add a Subscriber

The following example calls the [#post-subscribers](https://developers.mobile-text-alerts.com/api-reference/subscribers#post-subscribers "mention") endpoint:

```typescript
import { subscribersCreateSubscriber } from '@mobiletextalerts/typescript-sdk';

const result = await subscribersCreateSubscriber({
  client,
  body: {
     firstName: "FirstName", 
     lastName: "LastName", 
     number: 8002223333, 
     email: "example@mobile-text-alerts.com", 
     // Additional optional subscriber fields
  }
});
```

### Create a Template

The following example calls the [#post-templates](https://developers.mobile-text-alerts.com/api-reference/templates#post-templates "mention") endpoint:

```typescript
import { templatesCreateTemplate } from '@mobiletextalerts/typescript-sdk';

const template = await templatesCreateTemplate({
  client,
  body: {
    name: "Welcome Message",
    content: "Welcome to our service, {firstName}!"
  }
});
```

## Error Handling

If the API returns an HTTP [error code](https://developers.mobile-text-alerts.com/api-basics/error-response-codes) (`400`, `401`, `404`, `500`, etc.), the SDK intercepts the response and transforms it into a meaningful exception class for each endpoint.

```typescript
try {
  const result = await subscribersListSubscribers({ client });
  // Handle success
} catch (error) {
  // Error types are automatically inferred based on the endpoint
  console.error('API Error:', error);
}
```

### Rate Limits

Most Mobile Text Alerts API endpoints have a general rate limit of `30` requests per minute per IP address. However, some individual endpoints may override the general rate limit, see [rate-limits](https://developers.mobile-text-alerts.com/api-basics/rate-limits "mention") to learn more.


# API Basics

Learn more about REST APIs and how to interact with them.

## What is an API?

API stands for Application Programming Interface. APIs enable communication between two software components, typically a client and a server.  The application sending the request is the client, and the application sending the response is the server. When interacting with the Mobile Text Alerts API, the Mobile Text Alerts database is the server, and you send requests as the client.

There are different types of APIs, the MTA API is a REST API.

## REST APIs

REST stands for Representational State Transfer, a REST API is a way for software systems to communicate using HTTP. The main principle of REST APIs is statelessness, which means each request from a client to a server must contain all the information needed (no session stored on the server).  The server processes the request and returns the necessary data as plain text.

### HTTP Methods in REST

HTTP methods indicate the action the client would like to perform on a given resource. Examples of possible actions when calling the Mobile Text Alerts API: send a message, add/delete a subscriber, create a drip campaign, and many more.&#x20;

Each HTTP method is mapped to a specific operation and is included with every request to the API.&#x20;

#### HTTP Methods:

* `GET` - Retrieves data from the server.
  * *Example:* A `GET` request to the <mark style="color:blue;">`/subscribers`</mark> endpoint would return a list of all subscribers.
* `POST` - Sends data to the server to create something new.
  * *Example:* A `POST` request to the <mark style="color:blue;">`/send`</mark> endpoint would create a new message(s).
* `PATCH` - Updates existing data on the server.
  * *Example:* A `PATCH` request to the <mark style="color:blue;">`/threads/{threadId}/read`</mark> endpoint would update the thread specified with `{threadId}`as Read.
* `DELETE` - Removes existing data on the server.&#x20;
  * *Example:* A `DELETE` request to the  <mark style="color:blue;">`/groups/{groupId}`</mark> endpoint would remove the group specified with `{groupId}`.

### REST API Responses

After making a request to the API, it will return a response that contains the following information:

* [**HTTP status code**](https://developers.mobile-text-alerts.com/error-response-codes#http-status-codes)- This three-digit code indicates the outcome of the request
  * *Example:* <mark style="color:green;">`200`</mark>&#x20;
* [**Response Headers**](https://developers.mobile-text-alerts.com/request-response-headers#response-headers)- This provides metadata about the response.
  * *Example:* `Content-Type`*,* `Date`
* **Response Body/Payload**- This is the actual data content of the response.

  * *Example:*&#x20;

  ```json
  {
    "data": {
      "messageId": "uuid",
      "totalSent": 1,
      "totalFailedInternationalRecipients": 0
    },
    "message": "Message Sent to 1 Recipient."
  }
  ```


# Request / Response Headers

Learn which headers are used in Mobile Text Alerts API calls and responses.

## Request Headers

Request headers contain information about the client request. These are the header types used by the Mobile Text Alerts API.

### Authorization

The Authorization header is used for authentication in HTTP requests. It contains a token or credentials used to prove the client's identity. The Mobile Text Alerts API uses bearer token authentication with an API key.

**Header structure:** `"Authorization: Bearer {myAPIKey}"`

**Example request:**

```bash
curl -L \
  -H 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
  'https://api.mobile-text-alerts.com/v3/auth/verify-api-key'
```

See [Get an API Key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key) to learn how to generate and send this key in a request.

### Content-Type

Content-Type is an HTTP header that indicates the data type of the request's message body. This allows the server to understand how to process the request data.

**Header structure:** `"Content-Type: application/json"`

**Example request:**

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/groups/12345/subscribers/bulk-create' \
--header 'Content-Type: application/json' \
--data '{
    "subscriberIds": [
        123
    ]
}'
```

## Response Headers

Response headers provide metadata about the response to the client. Most of the Mobile Text Alerts API response headers provide information about your account's [rate limit](https://developers.mobile-text-alerts.com/api-basics/rate-limits) usage.

<table><thead><tr><th width="180">Parameter</th><th width="120">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>RateLimit-Limit</code></td><td><code>integer</code></td><td>The maximum number of requests that the consumer is permitted to make per window.</td></tr><tr><td><code>RateLimit-Remaining</code></td><td><code>integer</code></td><td>The number of requests remaining in the current rate limit window.</td></tr><tr><td><code>RateLimit-Reset</code></td><td><code>integer</code></td><td>The remaining window before the rate limit resets (in milliseconds).</td></tr><tr><td><code>Retry-After</code></td><td><code>integer</code></td><td>The number of seconds to wait before retrying the request.</td></tr><tr><td><code>X-RateLimit-Limit</code></td><td><code>integer</code></td><td>The maximum number of requests that the consumer is permitted to make per window.</td></tr><tr><td><code>X-RateLimit-Remaining</code></td><td><code>integer</code></td><td>The number of requests remaining in the current rate limit window.</td></tr><tr><td><code>X-RateLimit-Reset</code></td><td><code>integer</code></td><td>The remaining window before the rate limit resets (in milliseconds).</td></tr><tr><td><code>X-Request-ID</code></td><td><code>string</code></td><td>A unique identifier for the request.</td></tr></tbody></table>


# Request Parameters

Learn the types of parameters used in a request to the Mobile Text Alerts API.

## Header Parameters

Header parameters are included in the request headers. All requests to the Mobile Text Alerts API require a valid `Authorization` header. See [Request Headers](https://developers.mobile-text-alerts.com/request-response-headers#request-headers) to learn more.

## Path Parameters

Path parameters (sometimes called path variables) are part of the endpoint itself and are not optional when making a request to certain endpoints.

For example, when calling the [**Update Drip Campaign** endpoint](https://developers.mobile-text-alerts.com/api-reference/drip-campaigns#patch-drip-campaigns-dripcampaignid):

<pre><code>https://api.mobile-text-alerts.com/v3/drip-campaigns/<a data-footnote-ref href="#user-content-fn-1">{dripCampaignId}</a>
</code></pre>

The `{dripCampaignId}` is a `string` that identifies the ID of the campaign to be updated.

## Request Bodies

The request body contains the data being transferred. This is particularly important for methods such as `POST`, `PATCH`, and `DELETE`, where data is sent to the server. This data is typically sent as JSON.

For example, when calling the **Update Drip Campaign** endpoint, the `name` and `endDate` of a campaign can be updated in the request body:

```json
{
    "name": "<string>",
    "endDate": "<YYYY-MM-DD HH:mm:ss>"
}
```

Example request to [**Update Drip Campaign** endpoint](https://developers.mobile-text-alerts.com/api-reference/drip-campaigns#patch-drip-campaigns-dripcampaignid):

<pre class="language-json" data-overflow="wrap"><code class="lang-json">curl --location --request PATCH 'https://api.mobile-text-alerts.com/v3/drip-campaigns/<a data-footnote-ref href="#user-content-fn-2">12345</a>' \
--header 'Content-Type: application/json' \
--data '{
    "name": "Example Campaign Name"
}'
</code></pre>

[^1]: Path parameter

[^2]: {dripCampaignId}


# Rate Limits

Information on rate limits

An API rate limit restricts the number of requests a client can make to an API within a given period of time.

## General Rate Limit

Most Mobile Text Alerts API endpoints have a general rate limit of `30` requests per minute per IP address. However, some individual endpoints may override the general rate limit (see below).

{% hint style="warning" %}
Rate limits are **not** the same as message throughput, which is measured in message segments per second (MPS). MPS throughput is determined based on the sender's brand type, campaign type (use case), and trust score (for Standard Brands).
{% endhint %}

Your rate limit usage can be tracked in the `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and `X-RateLimit-Reset` [response headers](https://developers.mobile-text-alerts.com/request-response-headers#response-headers).

## Account-based rate limiting

Some endpoints use account-based rate limiting, where the rate limit is determined by the authenticated account instead of the IP address.

<table><thead><tr><th width="278">Endpoint</th><th>Rate Limit</th></tr></thead><tbody><tr><td><a href="../../tutorials/message-sending/send-an-sms-message#send-message-api-endpoint">POST <code>/send</code></a></td><td>25 requests every 15 seconds</td></tr><tr><td><a href="../../tutorials/manage-subscribers/group-subscribers/groups-bulk-add-delete-subscribers#post-groups-groupid-subscribers-bulk-create">POST <code>/groups/{groupId}/subscribers/bulk-create</code></a></td><td>5 requests every 15 seconds. A maximum of 1,000 records in a single request.</td></tr><tr><td><a href="../../tutorials/manage-subscribers/group-subscribers/groups-bulk-add-delete-subscribers#post-groups-groupid-subscribers-bulk-delete">POST <code>/groups/{groupId}/subscribers/bulk-delete</code></a></td><td>5 requests every 15 seconds. A maximum of 1,000 records in a single request.</td></tr><tr><td><a href="../../tutorials/custom-subscriber-attributes#get-custom-fields"><code>GET /custom-fields</code></a></td><td>15 requests every 15 seconds</td></tr><tr><td><a href="../api-reference/account-variables">GET, POST <code>/account-variables</code></a></td><td>15 requests every 15 seconds</td></tr><tr><td><a href="../../api-reference/account-variables#get-account-variables-idortitle">GET, PATCH, DELETE <code>/account-variables/{idOrTitle}</code></a></td><td>15 requests every 15 seconds</td></tr><tr><td><a href="../tutorials/manage-subscribers">GET, POST <code>/subscribers</code></a></td><td><p>15 requests every 15 seconds.</p><p><em>For large scale subscriber changes</em> <a href="../tutorials/manage-subscribers/bulk-create-update-subscribers"><em>Bulk Create/Update Subscribers</em></a> <em>endpoints are recommended.</em></p></td></tr><tr><td><a href="../tutorials/manage-subscribers">GET, PATCH, DELETE <code>/subscribers/:idOrNumber</code></a></td><td>15 requests every 15 seconds</td></tr><tr><td><a href="../tutorials/manage-subscribers/bulk-create-update-subscribers">POST, PATCH <code>/subscribers/bulk</code></a></td><td>15 requests every 15 seconds. A maximum of 1,000 records in a single request.</td></tr></tbody></table>


# Error Response Codes

The Mobile Text API returns HTTP status codes and JSON-based error codes and messages.

## HTTP Status Codes

Each request to the API will return an HTTP status code, a three-digit code that indicates the outcome of the request.&#x20;

<table><thead><tr><th width="106">Code</th><th width="233"></th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:green;"><code>200</code></mark></td><td><code>Success</code></td><td>Indicates a successful request and will contain <a href="../request-response-headers#response-headers">response headers</a> with addition details about the request.</td></tr><tr><td><mark style="color:red;"><code>400</code></mark></td><td><code>BadRequestError</code></td><td>Indicates that the request was malformed or invalid. Make sure you included all required fields to the endpoint in the request.</td></tr><tr><td><mark style="color:red;"><code>401</code></mark></td><td><code>UnauthorizedError</code></td><td>Indicates that the client is not authorized to access the requested resource. Make sure you are including a valid <a href="../../getting-started/get-an-api-key#bearer-token-authentication">API Key</a> in the request header.</td></tr><tr><td><mark style="color:red;"><code>403</code></mark></td><td><code>ForbiddenError</code></td><td>Indicates the client is authenticated but not authorized to access the requested resource.</td></tr><tr><td><mark style="color:red;"><code>429</code></mark></td><td><code>RateLimitError</code></td><td>Indicates too many requests to the server within a window of time, exceeding the allowed <a href="rate-limits">rate limit</a> for that endpoint. </td></tr><tr><td><mark style="color:red;"><code>500</code></mark></td><td><code>InternalServerError</code></td><td>Indicates the server encountered an unexpected error that prevented it from fulfilling the request. This usually means there is an issue with the server, not the request.</td></tr></tbody></table>


# SMPP Server

## Mobile Text Alerts SMPP Server

Connect to Mobile Text Alerts via SMPP for SMS messaging from systems that use the SMPP protocol.

{% hint style="info" %}
**Limited Access** The Mobile Text Alerts SMPP server is available as an opt-in system offering. Access is currently limited to approved accounts. To request access or obtain your SMPP credentials, contact your account manager or reach out to support.
{% endhint %}

### What is SMPP?

SMPP (Short Message Peer-to-Peer) is a telecommunications protocol used for exchanging SMS messages between messaging entities. It is commonly used by enterprise platforms, telecom providers, and legacy systems that send and receive SMS at scale over persistent TCP connections rather than HTTP-based REST APIs.

If your system already communicates over SMPP — or you need a persistent, low-latency connection for high-throughput messaging — the Mobile Text Alerts SMPP server allows you to send messages, receive replies, and track delivery statuses using the same SMPP interface your platform already supports.

If you are building a new integration and do not have an existing SMPP requirement, the Mobile Text Alerts [REST API](https://developers.mobile-text-alerts.com/developer-center-introduction) is recommended as the primary integration method.

### Connection Details

| Parameter      | Value                                      |
| -------------- | ------------------------------------------ |
| Host           | `smpp.mobile-text-alerts.com`              |
| Port           | `2776` (TLS)                               |
| Protocol       | SMPP v5.0 (backwards compatible with v3.4) |
| Transport      | TLS required (SMPP over TLS)               |
| Authentication | `system_id` + `password` via SMPP bind PDU |

{% hint style="warning" %}
**TLS is required.** Plain-text TCP connections are not accepted. Your SMPP client must support TLS to connect to the Mobile Text Alerts SMPP server.
{% endhint %}

### Authentication

The Mobile Text Alerts SMPP server uses standard SMPP bind authentication. When establishing a session, your client sends a bind PDU containing a `system_id` and `password`. These credentials are provisioned by Mobile Text Alerts and are specific to your account.

#### Obtaining Credentials

SMPP credentials are provisioned by your account manager. To request access:

1. Contact your account manager or reach out to support.
2. Your team will receive a `system_id` and `password` for use in SMPP bind requests.
3. Store these credentials securely. They function as your authentication to the SMPP server, similar to an API key for the REST API.

#### Bind Modes

The server supports all three standard SMPP bind modes:

| Bind Mode   | PDU                | Use Case                                                                                        |
| ----------- | ------------------ | ----------------------------------------------------------------------------------------------- |
| Transceiver | `bind_transceiver` | Send and receive messages on the same session. **Recommended for most integrations.**           |
| Transmitter | `bind_transmitter` | Send messages only. No inbound messages or delivery receipts will be delivered on this session. |
| Receiver    | `bind_receiver`    | Receive inbound messages and delivery receipts only. Cannot be used to send messages.           |

For most integrations, `bind_transceiver` is the simplest option — it allows you to send messages and receive both replies and delivery receipts on a single connection.

### Supported Operations

The following SMPP PDUs are supported by the Mobile Text Alerts SMPP server:

#### Sending Messages

| PDU              | Direction       | Description                                                                        |
| ---------------- | --------------- | ---------------------------------------------------------------------------------- |
| `submit_sm`      | Client → Server | Submit a message for delivery to a mobile subscriber.                              |
| `submit_sm_resp` | Server → Client | Response to `submit_sm`, contains the `message_id` assigned by Mobile Text Alerts. |

#### Receiving Messages and Delivery Receipts

| PDU               | Direction       | Description                                                                                                                        |
| ----------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `deliver_sm`      | Server → Client | Delivers inbound messages (MO) and delivery receipts (DLRs) to your client.                                                        |
| `deliver_sm_resp` | Client → Server | Your client's acknowledgment of a received `deliver_sm`. Must return `command_status` `0x00000000` (ESME\_ROK) to confirm receipt. |

#### Message Management

| PDU         | Direction       | Description                                                                |
| ----------- | --------------- | -------------------------------------------------------------------------- |
| `query_sm`  | Client → Server | Query the status of a previously submitted message using its `message_id`. |
| `cancel_sm` | Client → Server | Cancel a previously submitted message that has not yet been delivered.     |

#### Session Management

| PDU                 | Direction        | Description                                                                     |
| ------------------- | ---------------- | ------------------------------------------------------------------------------- |
| `enquire_link`      | Either direction | Keepalive check to verify the SMPP session is active. Either side may initiate. |
| `enquire_link_resp` | Either direction | Response confirming the session is alive.                                       |
| `unbind`            | Either direction | Gracefully close the SMPP session. Either side may initiate.                    |
| `unbind_resp`       | Either direction | Acknowledgment confirming the session has been closed.                          |

### Sending Messages

Messages are sent by submitting a `submit_sm` PDU to the Mobile Text Alerts SMPP server. The server will route the message through your account's configured sending number(s) and return a `submit_sm_resp` containing a `message_id` that can be used to track the message.

#### Key Fields for `submit_sm`

| Field                 | Description                                                                                                        |
| --------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `source_addr_ton`     | Type of Number for the source address. Use `0x01` (International) for E.164 numbers or `0x00` (Unknown) if unsure. |
| `source_addr_npi`     | Numbering Plan Indicator for the source address. Use `0x01` (ISDN/E.164).                                          |
| `source_addr`         | The sender number. You may leave this empty and Mobile Text Alerts will use your account's default sending number. |
| `dest_addr_ton`       | Type of Number for the destination address. Use `0x01` (International) for E.164 formatted numbers.                |
| `dest_addr_npi`       | Numbering Plan Indicator for the destination. Use `0x01` (ISDN/E.164).                                             |
| `destination_addr`    | The recipient's phone number. Use E.164 format (e.g., `+12125551234`).                                             |
| `data_coding`         | Character encoding for the message body. See [Character Encoding](#character-encoding) below.                      |
| `short_message`       | The message body, encoded according to the `data_coding` value.                                                    |
| `registered_delivery` | Set to `0x01` to request a delivery receipt via `deliver_sm`. See [Delivery Receipts](#delivery-receipts).         |

#### Addressing

For the destination address, use E.164 format: a `+` followed by the country code and subscriber number (e.g., `+12125551234` for a US number). Set `dest_addr_ton` to `0x01` (International) and `dest_addr_npi` to `0x01` (ISDN/E.164).

For the source address, you can either provide your account's dedicated sending number in E.164 format, or leave `source_addr` empty to use your account's default number.

#### Character Encoding

The Mobile Text Alerts SMPP server supports three character encodings:

| Encoding | `data_coding` Value | Max Characters per Segment | Use Case                                                                         |
| -------- | ------------------- | -------------------------- | -------------------------------------------------------------------------------- |
| ASCII    | `0x01`              | 160                        | Standard English text messages. **Default encoding.**                            |
| Latin-1  | `0x03`              | 160                        | Western European languages with accented characters (é, ñ, ü, etc.).             |
| UCS-2    | `0x08`              | 70                         | Full Unicode support including non-Latin scripts (Chinese, Arabic, emoji, etc.). |

If `data_coding` is set to `0x00`, the server will treat the encoding as ASCII.

{% hint style="info" %}
Your SMPP client library may handle `data_coding` selection automatically based on the characters in your message. Refer to your client library's documentation.
{% endhint %}

#### Long Messages

SMS messages that exceed the per-segment character limit (160 for ASCII/Latin-1, 70 for UCS-2) must be split into multiple segments using User Data Headers (UDH) for concatenation. Most SMPP client libraries handle this automatically.

When sending a concatenated (multi-part) message:

* Each segment is sent as a separate `submit_sm` PDU.
* The `short_message` field includes a UDH that identifies the reference number, total number of parts, and the sequence number of each part.
* The `esm_class` field should have bit 6 set (`0x40`) to indicate a UDH is present in the `short_message`.

Each segment consumes one message credit. An SMS message that spans 2 segments will consume 2 credits.

#### Response

A successful `submit_sm_resp` returns `command_status` `0x00000000` (ESME\_ROK) and a `message_id` string. Retain this `message_id` to correlate delivery receipts and to use with `query_sm` or `cancel_sm`.

### Receiving Messages and Delivery Receipts

Inbound messages (mobile-originated messages from subscribers) and delivery receipts are both delivered to your client via `deliver_sm` PDUs on the same SMPP session. Your client must be bound in transceiver or receiver mode to receive these.

#### Inbound Messages (MO)

When a subscriber replies to a message sent from your account, Mobile Text Alerts delivers the reply as a `deliver_sm` PDU. The key fields are:

| Field              | Description                                              |
| ------------------ | -------------------------------------------------------- |
| `source_addr`      | The subscriber's phone number (the sender of the reply). |
| `destination_addr` | Your account's number that the reply was sent to.        |
| `short_message`    | The content of the subscriber's reply.                   |
| `data_coding`      | The encoding of the message body.                        |

Your client must respond with a `deliver_sm_resp` with `command_status` `0x00000000` (ESME\_ROK) to acknowledge receipt. If the server does not receive a valid acknowledgment, it may retry delivery.

#### Delivery Receipts

Delivery receipts (DLRs) report the delivery status of messages you have sent. To receive DLRs, set `registered_delivery` to `0x01` in your `submit_sm` request.

DLRs are delivered as `deliver_sm` PDUs with `esm_class` indicating a delivery receipt. The `short_message` field of a DLR contains a formatted string with the delivery status information.

#### DLR Message Format

The `short_message` field of a delivery receipt follows this structure:

```
id:<message_id> sub:<submitted_count> dlvrd:<delivered_count> submit date:<submit_timestamp> done date:<done_timestamp> stat:<status> err:<error_code> text:<first_20_chars>
```

| Field         | Description                                                                     |
| ------------- | ------------------------------------------------------------------------------- |
| `id`          | The `message_id` returned in the original `submit_sm_resp`.                     |
| `sub`         | Number of messages submitted (typically `001`).                                 |
| `dlvrd`       | Number of messages delivered (typically `001` for delivered, `000` for failed). |
| `submit date` | Timestamp when the message was submitted.                                       |
| `done date`   | Timestamp when the final delivery status was received.                          |
| `stat`        | Delivery status code. See the table below.                                      |
| `err`         | Network-specific error code (may be `000` if not applicable).                   |
| `text`        | First 20 characters of the original message.                                    |

#### Delivery Status Codes

Delivery receipts include a `stat` field that uses standard SMPP delivery status values.

| Status Code | Meaning                                                                     |
| ----------- | --------------------------------------------------------------------------- |
| `DELIVRD`   | Message was successfully delivered to the recipient's handset.              |
| `EXPIRED`   | Message validity period expired before delivery could be completed.         |
| `DELETED`   | Message was deleted before delivery.                                        |
| `UNDELIV`   | Message could not be delivered (permanent failure).                         |
| `ACCEPTD`   | Message has been accepted by the carrier but delivery is not yet confirmed. |
| `UNKNOWN`   | Message status is unknown.                                                  |
| `REJECTD`   | Message was rejected by the carrier or provider.                            |

For error statuses (`UNDELIV`, `REJECTD`, etc.), the `err` field contains the corresponding Mobile Text Alerts delivery status code. See [Check Delivery Status](https://developers.mobile-text-alerts.com/check-delivery-status) to learn more about Mobile Text Alerts delivery status codes and how to interpret them.

#### Distinguishing Inbound Messages from DLRs

Both inbound messages and delivery receipts arrive as `deliver_sm` PDUs. To differentiate them, inspect the `esm_class` field:

* **Inbound message (MO):** `esm_class` = `0x00` (default)
* **Delivery receipt (DLR):** `esm_class` has bits 2–5 set to indicate a delivery receipt (typically `0x04`)

Your SMPP client library may provide a higher-level abstraction for this — consult your library's documentation.

### Message Management

#### Query Message Status

Use `query_sm` to check the current status of a previously submitted message. Provide the `message_id` from the `submit_sm_resp` to retrieve the message's delivery state.

#### Cancel a Message

Use `cancel_sm` to cancel a message that has not yet been delivered. This is useful for time-sensitive messages where delivery after a certain point is no longer relevant. Provide the `message_id` from the `submit_sm_resp`.

{% hint style="info" %}
Cancellation is only possible if the message has not yet been forwarded to the downstream carrier. Once a message is in transit, it cannot be recalled.
{% endhint %}

### Session Management

#### Keepalive (`enquire_link`)

SMPP sessions are long-lived TCP connections. To keep the session active and detect connection issues, the `enquire_link` PDU is used as a heartbeat mechanism. Either side (your client or the Mobile Text Alerts server) may send an `enquire_link`, and the other side must respond with an `enquire_link_resp`.

Configure your SMPP client to send `enquire_link` PDUs at regular intervals. An interval of **30 to 60 seconds** is recommended.

{% hint style="warning" %}
**Inactivity Timeout:** The server will close sessions that have not received any PDU (including `enquire_link`) within **120 seconds**. Ensure your client sends `enquire_link` PDUs well within this window to avoid disconnection.
{% endhint %}

#### Disconnecting

To gracefully close an SMPP session, send an `unbind` PDU. The server will respond with `unbind_resp` and close the connection. If your client disconnects without unbinding (e.g., due to a network failure), the server will detect the broken connection and clean up the session.

#### Reconnection

If your session is disconnected — whether due to network issues, server maintenance, or inactivity timeout — your client should automatically attempt to reconnect and rebind. Implement reconnection with exponential backoff to avoid overwhelming the server:

1. Wait 1 second, then attempt to reconnect.
2. If the connection fails, wait 2 seconds, then retry.
3. Continue doubling the wait time up to a maximum of 60 seconds.
4. Once connected, send a new bind PDU to re-authenticate.

### Error Handling

When a request fails, the server returns a response PDU with a non-zero `command_status` value indicating the reason for the failure.

#### Common SMPP Error Codes

| `command_status` | Name              | Description                                            |
| ---------------- | ----------------- | ------------------------------------------------------ |
| `0x00000000`     | ESME\_ROK         | Success — no error.                                    |
| `0x00000001`     | ESME\_RINVMSGLEN  | Message length is invalid.                             |
| `0x00000002`     | ESME\_RINVCMDLEN  | Command length is invalid.                             |
| `0x00000003`     | ESME\_RINVCMDID   | Invalid or unsupported command ID.                     |
| `0x00000005`     | ESME\_RALYBND     | Client is already bound to the session.                |
| `0x0000000D`     | ESME\_RINVSRCADR  | Invalid source address.                                |
| `0x0000000E`     | ESME\_RINVDSTADR  | Invalid destination address.                           |
| `0x00000045`     | ESME\_RSUBMITFAIL | Message submission failed.                             |
| `0x00000058`     | ESME\_RTHROTTLED  | Request was throttled. Slow down your submission rate. |
| `0x000000FF`     | ESME\_RUNKNOWNERR | An unknown error occurred.                             |

For a complete list of SMPP error codes, refer to the [SMPP v3.4 specification](https://smpp.org/SMPP_v3_4_Issue1_2.pdf), Section 5.1.3.

### Session and Rate Limits

The Mobile Text Alerts SMPP server enforces two types of limits that are configured on a per-account basis:

* **Bind limits** restrict the number of concurrent SMPP sessions (binds) your account can maintain at the same time. If you attempt to bind beyond your account's limit, the bind request will be rejected.
* **Throttling limits** restrict the rate at which your account can submit messages. If you exceed your account's submission rate, the server will return `ESME_RTHROTTLED` (`0x00000058`). Your client should wait briefly and retry.

Your specific limits are communicated when your SMPP credentials are provisioned. Contact your account manager if you need to adjust these limits.

### Comparison: SMPP vs REST API

If you're deciding between the SMPP server and the Mobile Text Alerts REST API, the table below summarizes the key differences:

| Feature               | SMPP Server                                                  | REST API                                                           |
| --------------------- | ------------------------------------------------------------ | ------------------------------------------------------------------ |
| Protocol              | SMPP v5.0 over TLS (backwards compatible with v3.4)          | HTTPS (REST/JSON)                                                  |
| Connection model      | Persistent TCP session (long-lived)                          | Stateless HTTP requests                                            |
| Authentication        | `system_id` + `password` (SMPP bind)                         | Bearer token (API key)                                             |
| Best suited for       | Legacy systems, high-throughput pipelines, telecom platforms | Web/mobile applications, modern integrations, event-driven systems |
| Message sending       | `submit_sm` PDU                                              | `POST /send` endpoint                                              |
| Delivery receipts     | `deliver_sm` PDU on the same session                         | `delivery-status` webhook or `GET /deliveries` polling             |
| Inbound messages      | `deliver_sm` PDU on the same session                         | `message-reply` webhook                                            |
| Subscriber management | Not available via SMPP                                       | Full CRUD via `/subscribers` endpoints                             |
| Scheduling            | Not available via SMPP                                       | `scheduledDate` field on `POST /send`                              |
| Groups / segmentation | Not available via SMPP                                       | Full support via `/groups` endpoints                               |
| Templates             | Not available via SMPP                                       | `templateId` on `POST /send`                                       |
| SDK support           | Use any SMPP client library                                  | Official TypeScript SDK                                            |
| Availability          | Early preview (by request)                                   | Generally available with all subscriptions                         |

{% hint style="info" %}
The SMPP server provides message-level operations (send, receive, delivery status). Account management features such as subscriber management, groups, templates, campaigns, and scheduling are available exclusively through the [REST API](https://developers.mobile-text-alerts.com/developer-center-introduction).
{% endhint %}

### Getting Started

1. **Request access.** Contact your account manager or Mobile Text Alerts support to request SMPP access for your account.
2. **Receive your credentials.** Your team will be provided a `system_id` and `password` for authenticating with the SMPP server.
3. **Configure your SMPP client.** Set the connection details in your SMPP client library:

   | Setting     | Value                                |
   | ----------- | ------------------------------------ |
   | Host        | `smpp.mobile-text-alerts.com`        |
   | Port        | `2776`                               |
   | TLS         | Enabled (required)                   |
   | `system_id` | *(provided by your account manager)* |
   | `password`  | *(provided by your account manager)* |
4. **Bind to the server.** Establish a TLS connection and send a `bind_transceiver` PDU with your credentials. A successful `bind_transceiver_resp` with `command_status` `0x00000000` confirms you are connected and authenticated.
5. **Send a test message.** Submit a `submit_sm` PDU with `registered_delivery` set to `0x01` to a test phone number. Verify you receive both a `submit_sm_resp` (with a `message_id`) and a subsequent `deliver_sm` with the delivery receipt.
6. **Set up `enquire_link`.** Configure your client to send `enquire_link` PDUs every 30–60 seconds to keep the session alive. The server will close sessions that are inactive for more than 120 seconds.


# How to Use AI with Mobile Text Alerts

Learn more about AI-powered features available with Mobile Text Alerts

Mobile Text Alerts has many built-in AI features to help simplify using our services, and if you’re using AI tools like Claude or Cursor, you can integrate these tools with Mobile Text Alerts. MCP (Model Context Protocol) servers for Developer Center and the Mobile Text Alerts API can help your AI assistants integrate easily with Mobile Text Alerts.

## AI in Platform Dashboard

In the [platform dashboard](https://platform.mobile-text-alerts.com), there are several built-in AI powered features such as:

* Suggest a Message
* Shorten a Message &#x20;
* Generate an Image

&#x20;Look for the <img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2F8k5FB3MGoDPFemyGWHlP%2FAIAssist.png?alt=media&#x26;token=9e54f32a-f0e4-46f3-a3f8-b3798275a669" alt="" data-size="line"> icon for quick access to these features.

## Mobile Text Alerts MCP Server

### What is an MCP server?

MCP (Model Context Protocol) servers are backend services that extend AI models like ChatGPT, Claude, Cursor with custom tools, data, or functionality.

New to MCP Servers and want to learn more? See [mcp-servers](https://developers.mobile-text-alerts.com/mcp-servers "mention").

## Developer Center

### LLM-friendly version of Developer Center

The content on Developer Center can be downloaded in different formats to be used by Large Language Models (LLMs) to ingest and access. This allows AI systems like ChatGPT, Claude, Cursor, and Copilot to retrieve and provide accurate, contextual responses about the Mobile Text Alerts API.

* **`.md` pages** - All pages of the Developer Center are available as markdown files. Add the `.md` extension to any page (or click on the Copy menu on the top right, and select **View as Markdown**) to see the content of that page rendered in markdown, which can be passed to an LLM for more efficient processing than an HTML file.
* [**`llms.txt`**](https://llmstxt.org/) - This is a proposed standard for making web content available in text-based formats that are easier for LLMs to process.
  * [`https://developers.mobile-text-alerts.com/llms.txt`](https://developers.mobile-text-alerts.com/llms.txt)
* **`lms-full.txt`** - Where the `llms.txt` file contains an index of all the page URLs and titles, the `llms-full.txt` contains the full content of Developer Center in one file that can be passed to LLMs as context.&#x20;
  * [`https://developers.mobile-text-alerts.com/llms-full.txt`](https://developers.mobile-text-alerts.com/llms-full.txt)

### Open in ChatGPT or Claude

You can also ask ChatGPT or Claude questions about the content in Developer Center. Click on the Copy menu on the top right of any page, and select either **Open in ChatGPT** or **Open in Claude**. This will feed all the information in Developer Center into the AI so it can answer your MTA-related questions.

<div align="left"><figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FMaKm75moNsrw5JBfnlCE%2FCopyMenuAI.png?alt=media&#x26;token=bb5f9e3b-e202-40d6-938e-7b0e155807f4" alt="" width="262"><figcaption></figcaption></figure></div>

### Developer Center MCP Server

This Developer Center GitBook site includes a Model Context Protocol (MCP) server. This allows AI assistants to access the documentation content directly. Your AI tools such as Claude Desktop, Cursor, and VS Code can use this server to access the information to answer questions about how to use Mobile Text Alerts features.&#x20;

There is also the [knowledge-base-mcp-server](https://developers.mobile-text-alerts.com/mcp-servers/knowledge-base-mcp-server "mention") hosted by Mobile Text Alerts that contains both the Developer Center content and the [Help Center](https://mobile-text-alerts.deskpro.com/) content.

#### How to connect an AI assistant to the Developer Center MCP Server

{% stepper %}
{% step %}

### Copy the Developer Center MCP Server URL

Copy the following URL:

```
https://developers.mobile-text-alerts.com/~gitbook/mcp
```

(Or from any page you can click on the Copy menu on the top right, and select **Connect with MCP** to copy the URL.)
{% endstep %}

{% step %}

### Configure your AI tool

Add the MCP server URL to your AI assistant’s settings. Each tool has a different setup process, so view the documentation for your tool to see how to configure an MCP server for it.
{% endstep %}

{% step %}

### Query the Developer Center content

Once connected, your AI assistant will have real-time access to all the published Developer Center pages to retrieve specific pages and answer questions.
{% endstep %}
{% endstepper %}


# MCP Servers

Learn more about Model Context Protocol and its use cases.

## What is MCP?

Model Context Protocol (MCP) is an open-source standard developed by [Anthropic](https://www.anthropic.com/) in November 2024. MCP defines a shared communication protocol between an AI client (such as a model or assistant) and one or more servers (which provide capabilities, data, or APIs).&#x20;

MCP servers are backend services that extend AI models like ChatGPT, Claude, Cursor with custom tools, data, or functionality. The goal is to make it possible for AI models to call functions, retrieve data, and work with resources without custom integrations or private APIs. The AI model acts as an MCP client, and includes built-in support for the MCP client interface. When you connect your AI client to an MCP server (such as the MTA MCP Actions server) this allows the model to securely fetch information, run computations, or interact with an external API.&#x20;

[Learn more about Model Context Protocol](https://modelcontextprotocol.io/docs/getting-started/)

[Click here to see a list of applications](https://modelcontextprotocol.io/clients) that support MCP integrations.

## How is MCP Useful When Working with AI?

When building or extending AI applications, one of the key challenges is connecting the model’s reasoning layer with real-world data and services. LLMs train on data and context (usually human-readable text) but can’t easily gain knowledge from external services.

Before MCP, custom integrations to specific tools were created to give the AI access to external features, but these integrations were specific to that LLM and tool. So an open standard was created so that all AI tools could communicate with services in the same way.&#x20;

#### Ways MCP enhances AI workflows

* **Standardized Integration:** Instead of building custom APIs or plugins for each data source or service, you can connect via MCP. Different AI systems (such as Claude, ChatGPT, or Cursor) can all interact with the same MCP server.&#x20;
* **Security and Context Control:** MCP supports permissions and clear data boundaries, ensuring AI models can access only the intended resources.
* **Dynamic Context Enrichment:** AI models can request and use live data—from databases, code repositories, monitoring systems, or alerts—directly in context, improving output accuracy and reducing hallucination.
* **Local and Remote Flexibility:** MCP works both with [locally installed servers](#local-package-servers) (for secure or offline data) and [remote-hosted servers](#remote-hosted-servers) (for distributed or shared services).

## Types of MCP Servers

MCP servers can be deployed locally or remotely, depending on your use case, security needs, and environment.

### Remote-Hosted Servers

These servers are hosted externally, usually as web services or API endpoints, and made accessible via standard MCP protocol connections.

#### **Typical use cases**

* Integrating with SaaS products (e.g., analytics dashboards, notification systems, CRM data).
* Providing organization-wide AI access to shared tools or datasets.
* Allows multiple AI clients to use the same MCP endpoint.

#### **Benefits**

* Centralized maintenance and version control.
* Easier sharing across teams or projects.
* Scalable infrastructure (e.g., using cloud hosting).

#### Example

[Mobile Text Alerts MCP Actions](https://developers.mobile-text-alerts.com/mcp-servers/actions-mcp-server) server provides access to the Mobile Text Alerts API, so any AI model configured with it can send messages (and other actions) securely.

### Local Package Servers

Local MCP servers are installed as packages or modules directly on a developer’s system or inside a controlled environment. They typically run alongside an AI client and expose capabilities locally.

#### **Typical use cases**

* Interacting with local files, codebases, or development tools.
* Testing or prototyping custom MCP capabilities.
* Keeping sensitive data fully offline.

#### **Benefits**

* Data never leaves the local machine.
* Low-latency performance for local context access.
* Easy to customize or extend for specialized workflows.

#### **Example**

A developer might install a local MCP package that lets an AI assistant read and refactor code in the current project directory or execute local scripts securely.

## Mobile Text Alerts MCP Servers

### Mobile Text Alerts - Actions MCP Server

This server hosted by Mobile Text Alerts enables users using AI assistants to send SMS right from within their AI workflows. See [actions-mcp-server](https://developers.mobile-text-alerts.com/mcp-servers/actions-mcp-server "mention") to learn more.

### Mobile Text Alerts - Knowledge Base MCP Server

This server hosted by Mobile Text Alerts enables AI assistants to read and search the content within both the Developer Center and [Help Center](https://mobile-text-alerts.deskpro.com/) to learn how to utilize the all the features provided by Mobile Text Alerts . See [knowledge-base-mcp-server](https://developers.mobile-text-alerts.com/mcp-servers/knowledge-base-mcp-server "mention") to learn more.

### GitBook Developer Center MCP Server

This Developer Center GitBook site includes a MCP server.  See [#developer-center-mcp-server](https://developers.mobile-text-alerts.com/ai/how-to-use-ai-with-mobile-text-alerts#developer-center-mcp-server "mention") to learn more.

## Summary

\
By standardizing communication between AI clients and external tools, MCP simplifies integration, strengthens security, and unlocks more capable and context-aware AI applications.

For full technical details and protocol specifications, visit [**modelcontextprotocol.io**](https://modelcontextprotocol.io).


# Actions MCP Server

Learn how to utilize Mobile Text Alert's Actions MCP Server

Mobile Text Alerts offers a robust and powerful Model Context Protocol (MCP) server, unlocking the capabilities to send and manage SMS messaging directly by an AI assistant. This server allows AI assistants and other applications to access your Mobile Text Alerts account from beyond our web and mobile app platforms.

## Access the Server

### Server URL

The Actions MCP server is a remote server hosted at the following URL:

```
https://mcp.mobile-text-alerts.com/mcp
```

[Learn more about connecting to remote MCP servers.](https://modelcontextprotocol.io/docs/develop/connect-remote-servers)

### Authorization

You can authenticate with the following methods:&#x20;

#### OAuth (recommended) &#x20;

The server adheres to the latest [MCP specification](https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization#dynamic-client-registration) and implements a fully compatible OAuth 2.1 flow with Dynamic Client Registration (DCR). Link your Mobile Text Alerts account simply by logging in and authorizing your AI assistant to access your account.

#### Bearer Token Authentication

The Actions MCP server also accepts a Mobile Text Alerts API key via the Authorization header using [Bearer Token Authentication](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key#bearer-token-authentication). By providing this key,  you are implicitly authorizing your AI assistant or agent to access your Mobile Text Alerts account

See [get-an-api-key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key "mention") to learn how to get an API Key.

## Tools & Usage

The Actions MCP server supports multiple tools, enabling your AI assistant access to the following actions with the Mobile Text Alerts API:

* **Send Message -** This sends a message immediately, for scheduling messages to be sent at a future time, use the Schedule Message tool (below).
* **Schedule Message -** Schedule a message to be sent at a specific future date/time.&#x20;
* **Add Subscribers -** Add or update your subscribers in bulk.
* **Create Group -** Create a regular or adaptive group in Mobile Text Alerts.

See [connect-with-claude](https://developers.mobile-text-alerts.com/mcp-servers/actions-mcp-server/connect-with-claude "mention") if you will connecting Mobile Text Alerts Actions MCP server with Claude (web or Desktop).

## Troubleshooting

Need additional help or have questions? Send an email to <contact@mobile-text-alerts.com> or use our support chat on [mobile-text-alerts.com](http://mobile-text-alerts.com/) and indicate your question is about the Mobile Text Alerts MCP server.


# Connect with Claude

Learn how to connect to the Mobile Text Alerts Actions MCP server with Claude (web or Desktop)

{% hint style="warning" %}
The free version of Claude.ai and Claude Desktop **cannot** connect to remote MCP servers, you must have a Team/Pro/Enterprise account.

On Claude Desktop free users are currently only able to install **local** MCP servers. We're working to develop a local-friendly version of our MCP servers where possible.
{% endhint %}

## Add the Mobile Text Alerts Actions MCP Server

1. Open Claude (web or Desktop app) and click the "Search and tools" icon and select **Manage Connectors**.

   ![](https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FRGM9DPYc0nbPP9SqrIBr%2FSearchToolsicon.png?alt=media\&token=5f3eebce-ad6c-4787-b79d-5137a8e76aa9)
2. Under **Connectors**, click **Add custom connector** (or **+ Add**) to begin the connection process.
3. Paste the following MCP Actions Server URL into the connector URL field:

   ```
   https://mcp.mobile-text-alerts.com/mcp    
   ```
4. &#x20;Give the connector a friendly name such as: “Mobile Text Alerts”.&#x20;
   * ***Note:*** The "Advanced settings" section can be left blank. The Mobile Text Alerts MCP server uses the latest OAuth 2.1 specification with Dynamic Client Registration.
5. Next click **Add**. You should see the new "Mobile Text Alerts" connector listed under Connectors.
6. Configure the authentication with one of the following methods:
   * **OAuth** *(recommended)*: Click **Connect** to launch the Mobile Text Alerts connection flow, where you will be redirected to the Mobile Text Alerts platform to login. After logging in (or if already logged in), you'll be presented with an authorization screen that confirms you'd like to connect your account with Claude. Click "Allow"
   * **Bearer Token:** Copy your Mobile Text Alerts [API Key](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key) in the connector’s Authorization header.&#x20;
7. After a successful authorization, you will be redirected back to the Claude Connector settings page. The **Connect** button should now be replaced with a **Configure** button. This allows you to view the tools registered with Claude and control individual tool settings, such as enabling/disabling and controlling how/when Claude can use a particular tool.
8. You can now use this connector. Test it by asking Claude something that uses the Mobile Text Alerts Actions server.&#x20;

> Example prompt: “Using the Mobile Text Alerts connector, list available tools” — Claude should show tool names (Send Message, Schedule Message, Add Subscribers). &#x20;

When Claude uses this tool, you'll see it appear in the chat view with the Mobile Text Alerts name and logo. This can be expanded to view the exact parameters passed in the tool call.

### Learn more

Visit [Claude Support](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp) to learn more about custom connectors using remote MCP.


# Knowledge Base MCP Server

Learn how to utilize the Mobile Text Alert Knowledge Base MCP Server

Mobile Text Alerts offers a Model Context Protocol (MCP) server for all the content in both Developer Center and the [Help Center](https://mobile-text-alerts.deskpro.com/). This server allows AI assistants to read and search within all the available content to learn how to utilize Mobile Text Alerts features.&#x20;

This allows you to ask your AI-tool (Cursor, Claude, etc.) a question and it can search all the available help sources in real-time and use the retrieved information to give you accurate, context-aware answers.

## Access the Server

### Server URL

The Knowledge Base MCP server is a remote server hosted at the following URL:

```
https://kb.mobile-text-alerts.com/mcp
```

[Learn more about connecting to remote MCP servers.](https://modelcontextprotocol.io/docs/develop/connect-remote-servers)

### Authorization

No authentication is required for this server.

## Tools

The Knowledge Base MCP server supports the following tools:

* `search_documentation` - This is first used by the agent to search for relevant content for a given term or concept. This returns a list of results with page titles, links, etc.
* `read_documentation` - An agent can pass a page URL to this tool, which returns a full Markdown version of the article with additional scaffolding for easier AI consumption.

## Connect to the Knowledge Base MCP Server

### Cursor

You can configure remote custom MCP servers with the  `mcp.json` file.&#x20;

**Configuration:** (no authentication required)

```json
{
  "mcpServers": {
    "mobile-text-alerts-knowledge-base": {
      "url": "https://kb.mobile-text-alerts.com/mcp"
    }
  }
}
```

Once installed, under **Settings** you should see `mobile-text-alerts-knowledge-base` under **Installed MCP Servers** with the available tools listed below.

Visit the [Cursor Docs](https://cursor.com/docs/context/mcp) to learn more about installing MCP servers with Cursor.

### Claude

1. Open Claude (web or Desktop app) and click the "Search and tools" icon and select **Manage Connectors**. ![](https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FRGM9DPYc0nbPP9SqrIBr%2FSearchToolsicon.png?alt=media\&token=5f3eebce-ad6c-4787-b79d-5137a8e76aa9)
2. Under **Connectors**, click **Add custom connector** (or **+ Add**) to begin the connection process.
3. Paste the following Server URL into the connector URL field:

   ```
   https://kb.mobile-text-alerts.com/mcp   
   ```
4. Give the connector a friendly name such as: “Mobile Text Alerts Knowledge Base".
5. Next click **Add**. You should see the new connector listed under Connectors.
6. Since there is no authentication required, you can now use this connector. Test it by asking Claude something that uses the Mobile Text Alerts Knowledge Base MCP server.&#x20;

> Example prompt: “Using the Mobile Text Alerts Knowledge Base connector, list available tools” — Claude should show tool names (Search Documentation, Read Documentation). &#x20;

When Claude uses this tool, you'll see it appear in the chat view with the Mobile Text Alerts name and logo. This can be expanded to view the exact parameters passed in the tool call.

Visit [Claude Support](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp) to learn more about custom connectors using remote MCP.


# 10DLC

Learn about 10DLC and how to call the API for your account's number information

## What is 10DLC? <a href="#what-is-10dlcwhat-is-10dlc" id="what-is-10dlcwhat-is-10dlc"></a>

A 10DLC refers to a *10-digit long code* in Application-to-Person (A2P) messaging. A 10DLC is a 10-digit phone number for a business that looks like a standard 10-digit phone number with a geographical area code. 10DLCs, [toll-free numbers](https://developers.mobile-text-alerts.com/messaging-routes/toll-free), and short codes are the three primary number types businesses use to engage in A2P text messaging.

10DLC differ from toll-free phone numbers, which have an “800” area code (rather than an area code that is local to a geographical area), and from short codes, which are 5-6 digits. 10DLC requires a special registration process and must comply with US messaging guidelines.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FiLBDfzV5k7rLA4f0YHbS%2F10dlc_Image_01a_32e784e810.webp?alt=media&#x26;token=b629f7e5-5e8e-461a-8bad-569d20da5edc" alt=""><figcaption><p>10DLC vs Toll-Free vs Short Code</p></figcaption></figure>

### **Pros for using 10DLC numbers**

* 10DLCs may improve SMS engagement rates. (Receiving a text from a 10-digit number with a local area code can feel more personal than receiving a text from a 5-digit short code or toll-free number.)
* 10DLCs have much lower costs than dedicated short codes, and in many cases are included for free.
* Unregistered 10DLCs typically have better delivery rates than unregistered toll-free numbers.

### **Cons for using 10DLC numbers**

* The registration process costs $15/month (as opposed to toll-free numbers, which are free to register) if you have a low-volume plan.
* Unregistered 10DLCs have throughputs of only 60 messages per minute, much lower than toll-free numbers or short codes.
* Registered 10DLCs have throughputs of around 150 messages per minute, much lower than toll-free numbers or short codes.
* 10DLCs have a daily limit of around 2,000 messages.
* 10DLC registration requires that your business/organization has an EIN/tax ID, so it is not always a good solution for sole proprietors or new businesses.
* 10DLCs aren’t as convenient as dedicated short codes, because they are longer numbers.

### 10DLC throughput and limits <a href="#id-10dlc-throughput-and-limits" id="id-10dlc-throughput-and-limits"></a>

10DLCs will give you the lowest throughput, at **150 text messages per minute**.

The daily limit for 10DLCs is 2,000 messages per day, but can in some cases this can be increased (increases may incur fees from the mobile carriers).

### Summary

10DLCs allow for sending mass text messages at an affordable cost, using a local area code which can feel more personable to recipients. Though these benefits make 10DLC an excellent SMS solution for many businesses, MTA generally recommends a toll-free number since toll-free numbers are free and have higher messaging speeds.

## **Get a 10DLC for sending messages**

You can get a free 10DLC with your Mobile Text Alerts account—however, if you would like to register the phone number for better message delivery, the cost is $15/month on the lower plans (it is, however, included for free on most plans).

[Click here](https://mobile-text-alerts.com/articles/sms-marketing-10dlc) to learn more about 10DLC, registering your brand and more.

## View your Numbers with the API

Just as you can view your numbers on the [platform dashboard](https://platform.mobile-text-alerts.com/dedicated-numbers), you can view all numbers on your account by calling the [<mark style="color:blue;">`/dedicated-numbers`</mark>](#get-dedicated-numbers) endpoint of the API. This will list data name, type, status, and more.

#### Example Request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/dedicated-numbers' \
  --header 'Authorization: Bearer 3068eebf-7611-5458-830e-65tf055a0b95'
```

#### Example Response

```json
{"data":
    {"rows":
        [{"name":"Main Phone Number",
        "created":"2025-01-27T15:26:48.000Z",
        "longcodeId":10721,"number":"8332298025",
        "tollFree":1,
        "isShortcode":0,
        "branded":0,
        "pending":1,
        "verified":0,
        "countryCode":"US",
        "users":{},
        "type":"Toll-Free",
        "status":"Basic",
        "deliveryRate":0,
        "tollFreeVerificationStatus":0,
        "tollFreeVerificationSubmissionDate":"2025-03-25T18:21:23.276Z"
        }],
    "page":0,"pageSize":25,"total":1
    }
} 

```

## GET /dedicated-numbers

> List Dedicated Numbers

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDedicatedNumbers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IApiLongcodeJoin"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IApiLongcodeJoin":{"type":"object","properties":{"name":{"type":"string"},"created":{"type":"string"},"longcodeId":{"type":"number"},"number":{"type":"string"},"tollFree":{"type":"number"},"isShortcode":{"type":"number"},"branded":{"type":"number"},"pending":{"type":"number"},"verified":{"type":"number"},"countryCode":{"type":"string"},"users":{"type":"object","additionalProperties":{"type":"string"}},"type":{"type":"string"},"status":{"$ref":"#/components/schemas/DedicatedNumberStatus"},"deliveryRate":{"type":"number"},"tollFreeVerificationStatus":{"allOf":[{"$ref":"#/components/schemas/TollFreeVerificationStatus"},{"$ref":"#/components/schemas/NullReference"}]},"tollFreeVerificationSubmissionDate":{"type":"string","nullable":true}},"required":["name","created","longcodeId","number","tollFree","isShortcode","branded","pending","verified","countryCode","users"]},"DedicatedNumberStatus":{"type":"string","enum":["Basic","Pending Carrier Approval","Carrier Approved","Undefined"]},"TollFreeVerificationStatus":{"format":"int32","type":"number","enum":[1,2,3,4,5]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/dedicated-numbers":{"get":{"tags":["Dedicated Numbers"],"summary":"List Dedicated Numbers","operationId":"dedicated_numbers_list_dedicated_numbers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDedicatedNumbers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"isTollfree":{"type":"boolean"},"userId":{"type":"number"},"pending":{"type":"boolean"}},"required":[]}}]}}}}
```


# Toll-Free

Learn about Toll-Free numbers and how to call the API for your account's number information

## What is a Toll-Free number?

Toll-free SMS numbers are 10-digit numbers with an 800 “area code” as the leading digits (example: 800-780-8000).

Text-enabled toll-free numbers allow you to send messages at decent messaging speeds without adding extra fees.

All accounts at Mobile Text Alerts include a dedicated toll-free number for free.

### Toll-free Verification&#x20;

Toll-free numbers must be verified, this reduces the risk of filtering your message traffic. This is a mandatory industry-wide process that whitelists your text messaging traffic.&#x20;

When you first create your account, you will need to enter your Brand Registration information. This includes your company's contact information, expected messaging use case and messages, and a Privacy Policy for compliance. After submitting this information, MTA will submit your Toll-Free number to carriers for approval.

You can call the [<mark style="color:blue;">`/dedicated-numbers`</mark>](#dedicated-numbers) endpoint of the API to see the status of your toll-free number(s) with the [`tollFreeVerificationStatus`](#verification-status) field..

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FGwr9sHpJEwiCUZrEhJzK%2F10dlc_Image_01b_6055a4acc7.webp?alt=media&#x26;token=575a150f-111c-4c6b-a3c0-62fdd1df55a9" alt=""><figcaption><p>10DLC vs Toll-Free vs Short Code</p></figcaption></figure>

### **Pros for using a toll-free number**

* The registration process for toll-free numbers is free.
* Toll-free numbers usually allow for higher messaging speeds than 10DLCs (1,200 messages per minute as opposed to 150 messages per minute).
* Toll-free number registration doesn’t require an EIN/tax ID, so sole proprietors and very small businesses may have an easier time getting registered.
* Toll-free numbers have no daily limits, unlike 10DLCs which have a daily limit of around 2,000.

### **Cons for using a toll-free number**

* Toll-free numbers generally have much slower messaging speeds than short codes (though they are faster than 10DLCs).
* Toll-free numbers may not seem as personable (and therefore not get as much engagement) as 10DLC’s because the “area code” is a generic 800 number.
* Toll-free numbers aren’t as convenient as dedicated short codes, because they are longer numbers.

### Toll-free throughput and limits <a href="#toll-free-throughput-and-limits" id="toll-free-throughput-and-limits"></a>

Toll-free numbers will give you significantly higher throughput than 10DLC’s, at **1,200 text messages per minute**.

Unlike 10DLCs, toll-free numbers have no daily limits.

### Summary

Mobile Text Alerts generally recommends toll-free numbers over 10DLCs because registration for toll-free numbers is always free, and they have faster messaging speeds. But they do sacrifice the benefit of a personal area code, businesses with a more robust budget may want to consider a dedicated short code.

## **Get a toll-free number for sending messages**

A dedicated toll-free number is included for free with any Mobile Text Alerts subscription. You can get started in seconds to test it out for yourself and for your business today.

Make sure to submit the **Brand Registration** form that appears at the top of the main dashboard page when you log in to your account.

## View your Numbers with the API

Just as you can view your numbers on the [platform dashboard](https://platform.mobile-text-alerts.com/dedicated-numbers), you can view all numbers on your account by calling the [<mark style="color:blue;">`/dedicated-numbers`</mark>](#get-dedicated-numbers) endpoint of the API. This will list data name, type, status, and more.

### Verification Status&#x20;

This endpoint will return the verification status of your toll-free number(s) with `tollFreeVerificationStatus`  this is an `ENUM` value (0-5) that corresponds with the following statuses:

* `0` - Not Submitted
* `1` - Verification Form Complete
* `2` - Submitted for Review by Carriers
* `3` - Approved by Carrier
* `4` - Denied by Carrier
* `5` - Submission Failure Reported by Carrier

#### Example request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/dedicated-numbers' \
  --header 'Authorization: Bearer 3068eebf-7611-5458-830e-65tf055a0b95'
```

#### Example response

```json
{"data":
    {"rows":
        [{"name":"Main Phone Number",
        "created":"2025-01-27T15:26:48.000Z",
        "longcodeId":10721,"number":"8332298025",
        "tollFree":1,
        "isShortcode":0,
        "branded":0,
        "pending":1,
        "verified":0,
        "countryCode":"US",
        "users":{},
        "type":"Toll-Free",
        "status":"Basic",
        "deliveryRate":0,
        "tollFreeVerificationStatus":0,
        "tollFreeVerificationSubmissionDate":"2025-03-25T18:21:23.276Z"
        }],
    "page":0,"pageSize":25,"total":1
    }
} 
```

## GET /dedicated-numbers

> List Dedicated Numbers

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDedicatedNumbers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IApiLongcodeJoin"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IApiLongcodeJoin":{"type":"object","properties":{"name":{"type":"string"},"created":{"type":"string"},"longcodeId":{"type":"number"},"number":{"type":"string"},"tollFree":{"type":"number"},"isShortcode":{"type":"number"},"branded":{"type":"number"},"pending":{"type":"number"},"verified":{"type":"number"},"countryCode":{"type":"string"},"users":{"type":"object","additionalProperties":{"type":"string"}},"type":{"type":"string"},"status":{"$ref":"#/components/schemas/DedicatedNumberStatus"},"deliveryRate":{"type":"number"},"tollFreeVerificationStatus":{"allOf":[{"$ref":"#/components/schemas/TollFreeVerificationStatus"},{"$ref":"#/components/schemas/NullReference"}]},"tollFreeVerificationSubmissionDate":{"type":"string","nullable":true}},"required":["name","created","longcodeId","number","tollFree","isShortcode","branded","pending","verified","countryCode","users"]},"DedicatedNumberStatus":{"type":"string","enum":["Basic","Pending Carrier Approval","Carrier Approved","Undefined"]},"TollFreeVerificationStatus":{"format":"int32","type":"number","enum":[1,2,3,4,5]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/dedicated-numbers":{"get":{"tags":["Dedicated Numbers"],"summary":"List Dedicated Numbers","operationId":"dedicated_numbers_list_dedicated_numbers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDedicatedNumbers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"isTollfree":{"type":"boolean"},"userId":{"type":"number"},"pending":{"type":"boolean"}},"required":[]}}]}}}}
```


# Short Code

Learn about dedicated short codes and how to call the API for your account's number information

## What is a dedicated short code?

A dedicated short code is a 5 or 6-digit phone number for sending and receiving messages that is exclusively owned by a single brand or organization (example: 52001).

Dedicated short codes have the best throughput (rate of messages sent per second) and are the most convenient for users (since they are short, they are easy to remember and type into a phone). Dedicated short codes support sending hundreds or thousands of messages at once, with high deliverability rates.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FgF6VdJ3NLuF08Fd9RC6N%2F10dlc_Image_01c_d70220877a.webp?alt=media&#x26;token=8e16f58c-041b-48eb-a959-d9f874f730a9" alt=""><figcaption><p>10DLC vs Toll-Free vs Short Code</p></figcaption></figure>

### **Pros for using a dedicated short code**

* Dedicated short codes have a much higher SMS throughput volume (starting as high as 350 messages per second or 21,000 messages per minute). So messages will go out faster than with 10-digit numbers.
* Dedicated short codes are convenient for your audience because they are typically 5-6 digits.

### **Cons for using a dedicated short code**

* Registration is required to use a short code in any capacity.
* Dedicated short codes are the most costly SMS marketing option, with a one-time $2,500 provisioning fee and a $600/month leasing fee (premium and vanity codes may cost more).
* Setup time is significantly longer than other options, as it can take anywhere from 3 weeks to 4 months to get final approval from the mobile carriers.

### Short code throughput and limits <a href="#short-code-throughput-and-limits" id="short-code-throughput-and-limits"></a>

Short code numbers give you the highest throughput by far, at as much as **21,000 text messages per minute**.

Unlike 10DLCs, short code numbers have no daily limits.

### Summary

Dedicated short codes cost significantly more than other messaging options. We recommend them for businesses with a larger budget and high send volume.

## Short Code Type Options

There are three types of dedicated short codes. You can lease one of these options or migrate an existing dedicated short code through Mobile Text Alerts.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FESvPGtbaMNLYz3ZXJGap%2F10dlc_Image_02_1_6c0e3dc60d.webp?alt=media&#x26;token=53a7f53a-d407-4bec-889d-20ca11a454c3" alt=""><figcaption><p>Three types of short code options</p></figcaption></figure>

### **Premium short code**

Premium short codes allow spelling out a brand name or a significant word using a mobile phone’s dial pad. These codes create memorable customization, but may be pricier than other options.

*Examples: 827438 for “Target” or 262966 for “Amazon.”*

### **Vanity short code**

Vanity short codes are numbers that you can select from a list of available codes. With this option you can choose a code that is easy for your customers to remember.

Depending on the options available, you may even be able to select a code that fits your brand without paying the full price of leasing a premium short code.

### **Random short code**

Random short codes are short numbers that are randomly assigned.

The benefit of choosing a random short code is that you receive all the same short code features for a lower cost than a premium or vanity short code.

## **Get a dedicated short code for sending messages**

If you’d like to lease a dedicated short code for your business, you can [contact us](https://mobile-text-alerts.com/contact).

## View your Numbers and Short Codes with the API

### List the short codes on your account

You can view all the short codes assigned to your account by calling the [Get shortcodes endpoint](https://developers.mobile-text-alerts.com/api-reference/shortcodes#get-shortcodes).

#### Example request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/shortcodes' \
  --header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258'
```

#### Example response

```json
{
  "data": {
    "shortcodes": ["99999", "11111"]
  }
}
```

## GET /shortcodes

> List Short Codes

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListShortcodes.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"shortcodes":{}},"required":["shortcodes"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/shortcodes":{"get":{"tags":["Shortcodes"],"summary":"List Short Codes","operationId":"shortcodes_list_shortcodes","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListShortcodes.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

### List all numbers on your account

Just as you can view your numbers on the [platform dashboard](https://platform.mobile-text-alerts.com/dedicated-numbers), you can view all numbers on your account by calling the [<mark style="color:blue;">`/dedicated-numbers`</mark>](#get-dedicated-numbers) API endpoint. This returns the name, type, status, and more.

#### Example request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/dedicated-numbers' \
  --header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258'
```

#### Example response

```json
{
  "data": {
    "rows": [
      {
        "name": "Main Phone Number",
        "created": "2025-01-27T15:26:48.000Z",
        "longcodeId": 10721,
        "number": "8332298025",
        "tollFree": 1,
        "isShortcode": 0,
        "branded": 0,
        "pending": 1,
        "verified": 0,
        "countryCode": "US",
        "users": {},
        "type": "Toll-Free",
        "status": "Basic",
        "deliveryRate": 0,
        "tollFreeVerificationStatus": 0,
        "tollFreeVerificationSubmissionDate": "2025-03-25T18:21:23.276Z"
      }
    ],
    "page": 0,
    "pageSize": 25,
    "total": 1
  }
}
```

## GET /dedicated-numbers

> List Dedicated Numbers

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDedicatedNumbers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IApiLongcodeJoin"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IApiLongcodeJoin":{"type":"object","properties":{"name":{"type":"string"},"created":{"type":"string"},"longcodeId":{"type":"number"},"number":{"type":"string"},"tollFree":{"type":"number"},"isShortcode":{"type":"number"},"branded":{"type":"number"},"pending":{"type":"number"},"verified":{"type":"number"},"countryCode":{"type":"string"},"users":{"type":"object","additionalProperties":{"type":"string"}},"type":{"type":"string"},"status":{"$ref":"#/components/schemas/DedicatedNumberStatus"},"deliveryRate":{"type":"number"},"tollFreeVerificationStatus":{"allOf":[{"$ref":"#/components/schemas/TollFreeVerificationStatus"},{"$ref":"#/components/schemas/NullReference"}]},"tollFreeVerificationSubmissionDate":{"type":"string","nullable":true}},"required":["name","created","longcodeId","number","tollFree","isShortcode","branded","pending","verified","countryCode","users"]},"DedicatedNumberStatus":{"type":"string","enum":["Basic","Pending Carrier Approval","Carrier Approved","Undefined"]},"TollFreeVerificationStatus":{"format":"int32","type":"number","enum":[1,2,3,4,5]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/dedicated-numbers":{"get":{"tags":["Dedicated Numbers"],"summary":"List Dedicated Numbers","operationId":"dedicated_numbers_list_dedicated_numbers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDedicatedNumbers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"isTollfree":{"type":"boolean"},"userId":{"type":"number"},"pending":{"type":"boolean"}},"required":[]}}]}}}}
```


# iMessage

Learn the basics of iMessage

{% hint style="info" %}
*This feature is currently in* ***beta*** *and is not yet generally available. If you're interested in sending iMessages and want to participate in our beta program, please reach out to your account manager to notify them of your interest.*
{% endhint %}

## What is iMessage?

iMessage is Apple's proprietary, free, and encrypted messaging service for sending text, photos, videos, and more between Apple devices (iPhone, iPad, Mac, Apple Watch, and Apple Vision Pro) using Wi-Fi or cellular data. Known for its "blue bubbles",  with iMessage users can send and receive messages with each other, similar to SMS, MMS, or email. iMessage is a secure message ecosystem, with high user trust for sending and receiving iMessages. It is estimated that there are over one billion iMessage users across the globe.

### Advantages of iMessage

Globally iMessage has become a highly trusted method of communication due to its security features and ubiquity. iMessages can have a broader reach and better engagement by using an identity synonymous with your brand.&#x20;

iMessage also has a much higher throughput in terms of media sizes for attachments, which enables higher resolution photos and even videos.

## How to send iMessages with Mobile Text Alerts

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2Ff7yJk4b7Z5TcbiFUXsKX%2Fimessage_Image_01_3_30bfaebb1b.webp?alt=media&#x26;token=b3764563-49c4-42cc-b2d8-4086a3d4818c" alt=""><figcaption><p>Steps to sending iMessages with Mobile Text Alerts</p></figcaption></figure>

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Step 1: Get a registered Sender Identity</strong></td><td><a href="../tutorials/message-sending/send-an-imessage/sender-identity">sender-identity</a></td></tr><tr><td><strong>Step 2: Receive opt-in consent for your subscribers</strong></td><td><a href="../tutorials/message-sending/send-an-imessage/subscriber-opt-in">subscriber-opt-in</a></td></tr><tr><td><strong>Step 3: Send iMessages to opted in subscribers</strong></td><td><a href="../tutorials/message-sending/send-an-imessage/send-imessages">send-imessages</a></td></tr><tr><td><strong>Step 4: SMS Fallback for failed iMessage sends</strong></td><td><a href="../tutorials/message-sending/send-an-imessage/sms-fallback">sms-fallback</a></td></tr></tbody></table>


# RCS / RBM

Learn about Rich Communication Services (RCS) messaging and how it is used for businesses with RBM (RCS Business Messaging)

## What is RCS messaging?

RCS stands for *Rich Communication Services*, which is a next-generation messaging protocol that upgrades traditional SMS/MMS  by allowing more dynamic and secure conversations.&#x20;

### RCS Message Features

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2F2yhJMB190qkQdyuLvgup%2Frcs_message_image_01_1_0fea716c5e.webp?alt=media&#x26;token=7c24e661-bd5d-4540-a210-741d445d33e7" alt=""><figcaption><p>Key Features of an RCS Message</p></figcaption></figure>

* **Richer message content**- RCS allows sending high-resolution images, videos, audio messages and other rich media without strict file size limits.&#x20;
* **More features and capabilities**- RCS messages support read receipts, typing indicators, and group chats.&#x20;
* **Message delivery and connectivity**- RCS uses data or Wi-Fi to send/receive messages which can result in faster and more reliable message delivery.
* **Increased security**- Encryption is on by default for Google Messages users with RCS enabled, protecting messages from being accessed by Google or other third parties.

### RCS vs SMS/MMS:

<table><thead><tr><th></th><th width="137">SMS</th><th width="116">MMS</th><th>RCS</th></tr></thead><tbody><tr><td><strong>Character limit</strong></td><td>160</td><td>1,550</td><td>~10,000</td></tr><tr><td><strong>Image size</strong></td><td>Not supported</td><td>500KB</td><td>Up to 100MB, but may vary by carrier.</td></tr><tr><td><strong>Read receipts</strong></td><td>No</td><td>No</td><td>Yes</td></tr><tr><td><strong>Typing indicators</strong></td><td>No</td><td>No</td><td>Yes</td></tr><tr><td><strong>Encryption</strong></td><td>No</td><td>No</td><td>Yes (Google Messages)</td></tr></tbody></table>

### Who can receive RCS messages?

#### Android

RCS is currently available for virtually all Android phones (including Samsung) via the Google Messages app.&#x20;

#### Apple

Apple introduced RCS support in iOS 18 with supported carriers, allowing iPhone users to send and receive messages with Android users using the RCS standard. RCS messages will appear in green text bubbles, while iMessages appear in blue.&#x20;

Note that RCS messages with Apple devices aren’t end-to-end encrypted.

[Learn more about RCS Messaging](https://mobile-text-alerts.com/articles/rcs-message)

## What is RCS Business Messaging (RBM)?&#x20;

RCS Business Messaging, or RBM, is a messaging platform that allows businesses to engage with customers by sending RCS messages. Messages sent via RBM agents will use RCS as the messaging route.

RCS Business Messaging can provide customers with a more engaging and interactive experience.

### RCS/RBM Agents

An RCS Agent is the digital identity of the brand seen by the customer when sending RCS messages. This is similar to a Sender ID for SMS message, but with added features such as the brand name, logo and a “verified sender” check mark. This adds branding to conversations, creating a more interactive experience that helps businesses build stronger connections with more trust for customers.

An RBM Agent initiates conversations with customers based on pre-defined triggers. Unlike SMS, a customer can’t text in a keyword to a brand’s RCS agent to hear more, but they can reply to sent messages to create a two-way conversation.

Mobile Text Alerts handles the complexities of agent deployment on every RCS supported carrier network, allowing RCS to easily become another messaging channel for your brand.

[Learn more about RCS Business Messaging](https://developers.google.com/business-communications/rcs-business-messaging)

## How to send RCS messages with the MTA API

When sending RCS messages via the API, Mobile Text Alerts will handle routing messages intelligently based on current subscriber status. For the subscribers included in a <mark style="color:blue;">`/send`</mark> call, the system will verify whether they are enabled for RCS and then route messages through your agent.&#x20;

There is also support to configure selecting and sending via multiple brands/agents, and graceful fallback to SMS. See [Send a Message](https://developers.mobile-text-alerts.com/getting-started/send-a-message) to learn more.


# Message Sending

See the different tutorials for ways to send messages with the MTA API

{% hint style="warning" %}
Trial accounts and unverified phone numbers are restricted to only sending [templated message](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) content. [Click here](https://mobile-text-alerts.deskpro.com/kb/articles/phone-number-verification) to learn how to get a verified number and start sending your own content.
{% endhint %}

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Learn more about how to customize your message sends with the API:</td><td><a href="message-sending/send-an-sms-message">send-an-sms-message</a></td><td><a href="message-sending/send-an-mms-message">send-an-mms-message</a></td><td><a href="message-sending/send-an-imessage">send-an-imessage</a></td><td></td></tr><tr><td>Learn how to receive message responses and to reply to them with the API</td><td><a href="message-sending/receive-and-reply-to-messages">receive-and-reply-to-messages</a></td><td></td><td></td><td></td></tr><tr><td>Learn how to use Message Templates in send requests to the API:</td><td><a href="message-sending/message-templates">message-templates</a></td><td></td><td></td><td></td></tr></tbody></table>


# Send an SMS Message

Learn how to customize your message sends with the Mobile Text Alerts API

## SMS differences from MMS

SMS stands for *Short Message Service*. It is used for sending short text messages (under 160 characters) between mobile devices. SMS messages do not support pictures, videos, or multimedia attachments. MMS was created for these types of messages and stands for *Multimedia Messaging Service*. MMS message sends have a higher [credit cost](#credit-costs) per send.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FVxJUEy4mx4rGzltgJZyF%2Fmms_services_vs_sms_infographic_48a300f951.webp?alt=media&#x26;token=c596497e-d2a0-4b1b-8b9c-c24ebcae86e7" alt=""><figcaption><p>SMS Messaging vs. MMS Messaging</p></figcaption></figure>

{% hint style="info" %}
A message **with** an attachment will be sent as MMS by default (messages without an attachment will be [sent as SMS](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-sms-message)).  Messages **without** an attachment can be sent as MMS if `isMMS` is set to `true`.
{% endhint %}

### Credit Costs

* **1** credit cost per SMS message (160 character limit, no attachment)
* **3** credit cost per MMS message (1550 character limit, plus 500KB image attachment)

{% hint style="info" %}
Before sending a message, you can calculate the will cost with the [#post-send-cost](https://developers.mobile-text-alerts.com/api-reference/send#post-send-cost "mention") endpoint. The `messageCredits` field indicates the number of credits to be consumed.
{% endhint %}

## Schedule Message Sends

You can indicate the exact time a message will be sent (in UTC) with the `scheduledDate` request field. This field uses [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html), so it is structured: year, month, day, hour, minutes, seconds, and milliseconds.

For example, `"20250306T193000-0000"` would represent March 6, 2025, 7:30:00 PM UTC.

### Repeat scheduled message sends

Scheduled messages can be set to repeat on a custom schedule by using the `repeat` request field. In this field, each day of the week is represented by a `boolean` value, which when `true` indicates the days the message send request will be repeated.

The `type` field is a `string` with the value either `week` or `month`, which indicates if the message sends should be repeated by the day of month or the day of week.

The `frequency` is a `number` between `-1` and `5`, each indicating a specific frequency of repeats:

```
CUSTOM = -1,
NEVER = 0,      
DAILY = 1,      
WEEKLY = 2,      
BIWEEKLY = 3,      
MONTHLY = 4,      
ANNUALLY = 5 
```

### Example repeat schedule

If a message is scheduled on Saturday March 1, 2025 and is repeated by *day of month*, then the next send would be Tuesday April 1, 2025. But if it is repeated by *day of week*, then the next message would be sent on the first Saturday in April, so Saturday April 5, 2025.

**Example** `repeat` **field:**

```json
 "repeat": {
      "monday": false,
      "tuesday": false,
      "wednesday": false,
      "thursday": false,
      "friday": false,
      "saturday": true,
      "sunday": false,
      "type": "month",
      "frequency": 2,
    }
```

## Properties field for custom variables in messages

With the `properties` field, you can include Liquid template variables in your messages. This lets you personalize each subscriber's message with a single API call. This is useful for a subscriber's first name or a custom link.

The `properties` field is a map between the subscribers you're sending to and the values of the variables in your message. These variables exist only in the context of a single send. Each property must be explicitly defined in the `properties` object if it is used in the message. For predefined subscriber fields that persist beyond a single send, use subscriber attributes.

{% hint style="warning" %}
Note that **Properties** are not the same as **Subscriber Attributes**. Subscriber attributes are a separate system for tracking fields stored on a subscriber record.

* [**Custom Subscriber Attributes**](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/assign-custom-subscriber-attributes) - are defined fields for a subscriber that can be added and edited through the API, platform, Workflow Builder and more. Subscriber attributes are enclosed in single square brackets: `[first name]`
* **Properties** - only exist in the context of a single send. These are Liquid template variables enclosed in double curly braces: `{{firstName}}`
  {% endhint %}

### How to include `properties` in a `/send` message request

{% stepper %}
{% step %}
Include your variable(s) in the `message` field, wrapped between `{{` and `}}`.

`"message": "Hello {{firstName}}! Visit {{link}} to reveal your discount!"`
{% endstep %}

{% step %}
Define the values of your variable(s) for each subscriber that will receive the message in the `properties` field.

<pre class="language-json"><code class="lang-json">"properties": {
        "<a data-footnote-ref href="#user-content-fn-1">3175551111</a>": {
            "firstName": "John",
            "link": "https://example.com/20percent"
        },
        "<a data-footnote-ref href="#user-content-fn-1">3175552222</a>": {
            "firstName": "Jane",
            "link": "https://example.com/10percent"
        }
    }
</code></pre>

{% endstep %}

{% step %}
Create your request to the <mark style="color:blue;">`/send`</mark> endpoint.

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
--data 
'{
    "subscribers": ["3175551111", "3175552222"],
    "message": "Hello {{firstName}}! Visit {{link}} to reveal your discount!",
    "properties": {
        "3175551111": {
            "firstName": "John",
            "link": "https://example.com/20percent"
        },
        "3175552222": {
            "firstName": "Jane",
            "link": "https://example.com/10percent"
        }
    }
}'
```

{% endstep %}
{% endstepper %}

## Message Templates

Message Templates lets you save pre-set messages. See the [Message Templates](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) tutorial to learn how to use templates with the Mobile Text Alerts API.

{% hint style="warning" %}
Trial accounts and unverified phone numbers are restricted to only sending [templated message](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) content. [Click here](https://mobile-text-alerts.deskpro.com/kb/articles/phone-number-verification) to learn how to get a verified number and start sending your own content.
{% endhint %}

## Include a header and/or footer

A header or footer text can be useful in messaging for:

* Legal compliance (opt-out text)
* Branding (company name)
* Context (alert type)

You can include a header text in your messages with the `header` request field, this will be included before the message body.  Note that a newline will be added between the header and message body.

You can also include footer text in your messages with the `footer` request field, this is included at the end of the message body. Note that a space will be added between the message body and footer.

## Send Message API Endpoint

<mark style="color:green;">`POST`</mark> <mark style="color:blue;">`/send`</mark>

See below for the API reference for the `/send` endpoint.

For steps on how to create an example request to this endpoint see [Send a message with the Mobile Text Alerts API](https://developers.mobile-text-alerts.com/getting-started/send-a-message#send-a-message-with-the-mobile-text-alerts-api).

**Headers**

| Name          | Value                                                                                                                       |
| ------------- | --------------------------------------------------------------------------------------------------------------------------- |
| Content-Type  | `application/json`                                                                                                          |
| Authorization | `Bearer` [`<APIKey>`](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key#bearer-token-authentication) |

**Request Fields**

<table><thead><tr><th width="194">Name</th><th width="139">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the message being sent.</td></tr><tr><td><code>image</code></td><td><code>string</code></td><td>The URL of an <a href="../send-an-mms-message#supported-attachment-types">attachment</a> for a message. By default, messages with attachments (<code>image</code>) will be sent as an <a href="send-an-mms-message">MMS</a>.</td></tr><tr><td><code>rehost</code></td><td><code>boolean</code></td><td>Specifies if the <a href="../send-an-mms-message#attachment-hosting-with-rehost-field">attached image should be rehosted</a> by Mobile Text Alerts before being sent.</td></tr><tr><td><code>templateId</code></td><td><code>number</code></td><td>Unique ID of the <a href="#message-templates">template</a> corresponding to the controlled template to be used as the message body.</td></tr><tr><td><code>linkId</code></td><td><code>number</code></td><td>If the message contains a <code>templateId</code> and the <a href="#message-templates">template</a> includes a link, <code>linkId</code> is required to identify the link.</td></tr><tr><td><code>subscriberIds</code></td><td><code>number[]</code></td><td>List of subscriber IDs to send the message to.</td></tr><tr><td><code>subscribers</code></td><td><code>number[]</code> or <code>string[]</code></td><td>A list of phone numbers and/or emails to send the message to. <a href="../phone-number-format-guide">Phone numbers can be provided as either <code>number</code> or <code>string</code>.</a></td></tr><tr><td><code>allSubscribers</code></td><td><code>boolean</code></td><td><p>Default value is <code>false</code>.</p><p>If <code>true</code>, send the message to all subscribers.</p></td></tr><tr><td><code>groups</code></td><td><code>number[]</code></td><td>List of group IDs to send the message to.</td></tr><tr><td><code>threadId</code></td><td><code>number</code></td><td>Unique ID of the thread to send the message to.</td></tr><tr><td><code>isMMS</code></td><td><code>boolean</code></td><td><p>Default value:</p><ul><li><code>false</code> for messages with <strong>no</strong> attachment</li><li><code>true</code> for messages with an attachment</li></ul><p>Indicates if the message will be sent as an <a href="send-an-mms-message">MMS</a>.</p></td></tr><tr><td><code>header</code></td><td><code>string</code></td><td>A <code>header</code> is a message that is included before the message body. A newline will be added between the <code>header</code> and message body.</td></tr><tr><td><code>footer</code></td><td><code>string</code></td><td>A <code>footer</code> is a message to include at the end of the message body. A space will be added between the message body and <code>footer</code>.</td></tr><tr><td><code>longcodeId</code></td><td><code>number</code></td><td>Unique ID corresponding to the dedicated number to send the message from.</td></tr><tr><td><code>senderName</code></td><td><code>string</code></td><td>If your account is <a href="send-an-imessage">enabled for iMessage</a> sending, this field is used to specify the desired sender name.</td></tr><tr><td><code>externalId</code></td><td><code>number</code></td><td>An ID to assign to the message metadata. This <code>externalId</code> is included in <a href="../../../getting-started/setting-up-webhooks#webhooks-overview">webhook</a> notifications.</td></tr><tr><td><code>properties</code></td><td><code>{ [key: string]: string }</code></td><td><a href="#how-to-include-properties-in-a-send-message-request">Properties</a> are used to populate Liquid template variables in your message.</td></tr><tr><td><code>scheduledDate</code></td><td><code>string</code></td><td><p>The date and time a <a href="#schedule-message-sends">message is scheduled to send</a>.</p><p>Must be in <a href="https://www.iso.org/iso-8601-date-and-time-format.html">ISO 8601</a> format (e.g., <code>"20230302T173000-0500"</code>).</p></td></tr><tr><td><code>repeat</code></td><td><a href="#repeat-scheduled-message-sends"><code>(custom)</code></a></td><td><p><code>repeat</code> indicates how a scheduled message should be sent <a href="#repeat-scheduled-message-sends">repeatedly</a>.</p><p>Default: If a value for <code>repeat</code> is not provided, the scheduled message will not repeat.</p></td></tr><tr><td><code>tags</code></td><td><code>(custom)</code></td><td>Tags is a map of custom data to be included with your <a href="../../getting-started/setting-up-webhooks">webhook</a> notifications.</td></tr></tbody></table>

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "data": {
    "messageId": "uuid",
    "totalSent": 1,
    "totalFailedInternationalRecipients": 0
  },
  "message": "Message Sent to 1 Recipient."
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "httpCode": 400,
  "message": "text",
  "timestamp": "2025-03-03T14:27:08.966Z",
  "type": "bad_request_error",
  "name": "MTABadRequestError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "httpCode": 401,
  "message": "text",
  "timestamp": "2025-03-04T19:24:00.365Z",
  "type": "unauthorized_error",
  "name": "MTAUnauthorizedError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="403" %}

```json
{
  "httpCode": 403,
  "message": "text",
  "timestamp": "2025-03-04T19:24:00.365Z",
  "type": "forbidden_error",
  "name": "MTAForbiddenError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "reason": null
}
```

{% endtab %}

{% tab title="429" %}

```json
{
  "httpCode": 429,
  "message": "text",
  "timestamp": "2025-03-04T19:24:00.365Z",
  "type": "rate_limit_error",
  "name": "MTARateLimitError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "httpCode": 500,
  "message": "text",
  "timestamp": "2025-03-04T19:24:00.365Z",
  "type": "internal_server_error",
  "name": "MTAInternalServerError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}
{% endtabs %}

[^1]: subscriberId


# Send an MMS Message

Learn more about sending an MMS with Mobile Text Alerts

MMS stands for *Multimedia Messaging Service*. It is used for sending messages that include a media attachment. MMS messages have a 500 KB size limit, a 1550 character limit, and a higher credit cost per send than SMS.

<div align="left"><figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FaJxuDDvz1UijOhtJpT2b%2Fmms_holiday_example_c673426406.webp?alt=media&#x26;token=425ffc73-1e36-4bb1-96aa-279ecd35d67d" alt="" width="325"><figcaption><p>MMS example</p></figcaption></figure></div>

### Credit Costs

* **1** credit cost per SMS message (160 character limit, no attachment)
* **3** credit cost per MMS message (1550 character limit, plus 500KB image attachment)

{% hint style="info" %}
A message **with** an attachment will be sent as MMS by default (messages without an attachment will be [sent as SMS](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-sms-message)).  Messages **without** an attachment can be sent as MMS if `isMMS` is set to `true`.
{% endhint %}

{% hint style="info" %}
Before sending a message, you can calculate the will cost with the [#post-send-cost](https://developers.mobile-text-alerts.com/api-reference/send#post-send-cost "mention") endpoint. The `messageCredits` field indicates the number of credits to be consumed.
{% endhint %}

### When to use MMS over SMS <a href="#when-should-you-use-mmswhen-should-you-use-mms" id="when-should-you-use-mmswhen-should-you-use-mms"></a>

Some situations where MMS is worth using instead of SMS:

* Very long text content
* Sales-oriented content, where an image can help drive the call-to-action
* Audience is primarily within the US/Canada
* A Mobile Text Alerts plan with rollover and/or excess credits
* Target audience responds better to media in messages

## Supported attachment types

The following file types are supported to use as attachments for MMS:

<details>

<summary>Image file types</summary>

```
.jpeg
.jpg
.gif
.png
.bmp
```

</details>

<details>

<summary>Audio file types</summary>

```
.mp4
.mpeg
.ogg
.rn-realaudio
.wav
.3gpp
.3gpp2
.ac3
.webm
.amr-nb
.amr
```

</details>

<details>

<summary>Video file types</summary>

<pre><code>.mpeg
<strong>.mp4
</strong>.quicktime
.webm
.3gpp
.3gpp2
.3gpp-tt
.h261
.h263
.h264
</code></pre>

</details>

<details>

<summary>Other file types</summary>

```
.vcard
.csv
.rtf
.pdf
```

</details>

## Attachment hosting with `rehost` field

You can choose to host the URL of an attachment for an MMS on your own servers, or it can be hosted by Mobile Text Alerts. When sending a request to the `/send` endpoint, if the `rehost` flag is set to `true`, the attachment will be rehosted by Mobile Text Alerts before sending. This can be useful if the recipient isn't receiving your attachment, or you don't want to host the attachment.

## How to send an MMS with the API

MMS messages are sent via the API with a `POST` request to the <mark style="color:blue;">`/send`</mark> endpoint, just like SMS. Include the `image` field with the URL of the attachment to send. All requests to this endpoint must contain both **recipient** and **content** information.

**Required request fields:**

* **Choose recipient(s):** (Must be one of the following)
  * `subscriberIds: number[]` - List of subscriber IDs of recipients. Messages can be sent to specific subscribers, with each subscriber assigned a unique `subscriberId`.
  * `subscribers: (number | string)[]` - List of recipient phone numbers or email addresses. A new subscriber will be created for new recipients that are not already subscribers on your account.
    * To ensure your messages are sent to the intended recipients this field must be formatted correctly based on how your subscribers are stored. E.164 formatted strings are recommended. See [phone-number-format-guide](https://developers.mobile-text-alerts.com/tutorials/phone-number-format-guide "mention") to learn more.
  * `allSubscribers: boolean` - Flag to indicate send message to all subscribers if `true`. When `allSubscribers` is set to `true`, no other recipient fields should be specified. Default value is `false`.
  * `groups: number[]` - List of group IDs of recipients. Messages can be sent to specific groups, with each group assigned a unique `groupId`.
  * `threadId: number` - Messages can be sent in reply to a thread, with each thread assigned a unique `threadId`.
* **Content:** (Must include at least one of the following)
  * `message: string` - The content of the message being sent.
  * `image: string` - The URL of an [attachment](#supported-attachment-types) for a message. By default, messages with attachments (`image`) will be sent as an MMS. This URL needs to be publicly accessible; this ensures Mobile Text Alerts can access it when sending.
  * `templateId: number` - Messages can be saved as pre-set message templates for reuse with saved controlled templates on your account assigned a `templateId`. Visit [Message Templates](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) tutorial to learn more.
* **Other fields:**
  * `rehost: boolean` - If the `rehost` flag is included and is set to `true`, the attachment will be [rehosted by Mobile Text Alerts](#attachment-hosting-with-rehost-field) before being sent to the recipients.

### How to send an MMS with the API

{% stepper %}
{% step %}

### Indicate the recipient(s)

You can send a message to a phone number as a test. Set the `subscribers` field to the recipient phone number.

```json
"subscribers": [1112223333]
```

{% endstep %}

{% step %}

### Create the message content and attachment

The text content of the message should be assigned to the `message` field and the URL of the attachment to the `image` field.

```json
"message": "Use promo code TESTMESSAGE for 5% off when you sign up. STOP to end"
"image": "https://imgur.com/gallery/example"
```

{% endstep %}

{% step %}

### Form API request

Create the API request to the `/send` endpoint. Remember to include [Authorization](https://mobile-text-alerts.gitbook.io/developer-center#authentication) header.

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
--data '{"subscribers": [1112223333],
        "message": "Use promo code TESTMESSAGE for 5% off when you sign up. STOP to end",
        "image": "https://imgur.com/gallery/example"
        }'
```

{% endstep %}

{% step %}

### Receive response

The API will return a message about the status of your request.

```json
{
  "data": {
    "messageId": "uuid",
    "totalSent": 1,
    "totalFailedInternationalRecipients": 0
  },
  "message": "Message Sent to 1 Recipient."
}
```

{% endstep %}
{% endstepper %}

<details>

<summary>Send Message endpoint <mark style="color:orange;background-color:yellow;">POST</mark> <code>/send</code></summary>

</details>

## Learn More

[Mobile Text Alerts - MMS Messaging](https://mobile-text-alerts.com/articles/mms-services)

[SMS and MMS: What They Are and When to Use Them](https://mobile-text-alerts.com/articles/sms-and-mms)


# Send an iMessage

View the steps to sending iMessages with Mobile Text Alerts

{% hint style="info" %}
*This feature is currently in* ***beta*** *and is not yet generally available. If you're interested in sending iMessages and want to participate in our beta program, please reach out to your account manager to notify them of your interest.*
{% endhint %}

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2Ff7yJk4b7Z5TcbiFUXsKX%2Fimessage_Image_01_3_30bfaebb1b.webp?alt=media&#x26;token=b3764563-49c4-42cc-b2d8-4086a3d4818c" alt=""><figcaption></figcaption></figure>

<table data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Step 1: Get a registered Sender Identity</strong></td><td><a href="send-an-imessage/sender-identity">sender-identity</a></td></tr><tr><td><strong>Step 2: Receive opt-in consent for your subscribers</strong></td><td><a href="send-an-imessage/subscriber-opt-in">subscriber-opt-in</a></td></tr><tr><td><strong>Step 3: Send iMessages to opted in subscribers</strong></td><td><a href="send-an-imessage/send-imessages">send-imessages</a></td></tr><tr><td><strong>Step 4: SMS Fallback for failed iMessage sends</strong></td><td><a href="send-an-imessage/sms-fallback">sms-fallback</a></td></tr></tbody></table>


# Sender Identity

Learn about Sender Identities and how to get one provisioned for your account

## Sender Identity <a href="#sender-identities" id="sender-identities"></a>

When sending iMessages, you will use a dedicated **Sender Identity** to identify your brand when communicating with your subscribers.

### What is a Sender Identity?

A Sender Identity is the set of characters shown at the top of an iMessage conversation for iMessage-enabled recipients. This is the contact information your recipients will see when interacting with your brand via iMessage.

A Sender Identity looks like an email address and consists of a sending name and a domain. You can use one or more Sender Identities when sending iMessages via Mobile Text Alerts. You can select which one to use, just like when selecting an outbound longcode for SMS.

### Get a registered Sender Identity

[**Contact us**](https://mobile-text-alerts.com/contact) and ask about getting an iMessage Sender Identity. Include the name of your brand in your request so that we can get a Sender Identity setup that closely corresponds to your business.

{% hint style="info" %}
*Mobile Text Alerts cannot guarantee access to everyone who requests a Sender Identity.*
{% endhint %}

### Provisioning and Use of Sender Identities

Upon enrollment in the iMessage sending program, a Sender Identity will be provisioned for your account. You can supply a desired name for your Sender Identity, but it will come with a pre-configured domain that is verified for iMessage sending.

Mobile Text Alerts also provides support for [Custom Domains](#custom-domains) for Sender Identities. You can request additional Sender Identities to be provisioned for your account. Depending on the number of identities requested, it may take up to three days to complete the provisioning process. Once provisioned, each Sender Identity will be attached to an outbound longcode on your account. When sending messages, selecting a specific longcode will correspond to a specific Sender Identity. If Mobile Text Alerts detects that a recipient is iMessage-enabled, it will use the Sender Identity associated with the outbound longcode and send via iMessage instead of SMS.

#### Custom Domains

Custom domains are supported, but require additional configuration and setup before use. After submitting a request for a custom domain, Mobile Text Alerts will identify the domain to use and may purchase and maintain it on your behalf, depending on your use case. Domains provisioned and managed by Mobile Text Alerts have an additional cost, or you can purchase and provide your own.

Finally, DNS entries will need to be configured to properly set up the custom domain. After this initial configuration, all future Sender Identities can be provisioned using this domain.


# Subscriber Opt In

Learn about subscriber opt-in and how to do this with Mobile Text Alerts deeplinks

As with SMS, capturing proper consent and opt-ins from your recipients is critical to successfully using iMessage capabilities. Capturing opt-ins ensures your recipients are expecting iMessages and gives you an opportunity to identify yourself. This helps ensure your messages are delivered and not marked as spam.

## iMessage Opt In

You **must** receive an inbound opt-in message before you send outbound iMessages. An explicit iMessage opt-in is required regardless of whether an opt-in was collected for communications via SMS or email. This can be as simple as sending in "Sign me up" to your Sender Identity.

To help facilitate this, Mobile Text Alerts provides a [deeplink](#deeplinks) feature that automatically tracks iMessage opt-ins.

## Deeplinks

A deeplink looks and works like a standard website link, but behaves differently depending on the user's browser, device, or operating system. Mobile Text Alerts provides deeplinking technology that can identify whether a recipient can send iMessages and prompt them to send their first inbound opt-in message to your Sender Identity.

### Generate a Deeplink with the API

Deeplinks used for iMessages can be generated by calling the [<mark style="color:blue;">`/deeplinks/imessage`</mark>](#deeplinks-imessage) endpoint with the following fields:

* `senderName`: The sender name used to pre-populate the "To:" field for iMessage
  * If no `senderName` is provided, the `longcodeId` is required for a valid request.
* `optInMessage`: The opt-in message used to populate the deeplink URLs.
* `longcodeId`: The ID of the associated fallback longcode for your `senderName`.

#### Example request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/deeplinks/imessage' \
--data '{
    "longcodeId": 12345,
    "optInMessage": "Example"
}'
```

#### Example successful response

```json
{
  "deeplinkUrl": "https://platform.mobile-text-alerts.com/deeplinks/abc"
}
```

## Create IMessage Deeplink

> \*\*This feature is currently in closed beta\*\*. Please contact your MTA account rep or MTA support for more information.\
> \
> \### Request Body\
> \
> \- \`longcodeId\`: The id of the longcode.\
> \
> \- \`optInMessage\`: The opt-in message used to populate the deeplink urls.\
> \
> \- \`senderName\`: The sender name used to pre-populate the "To:" field for iMessage\
> &#x20;   \- If this field is empty, the sender name associated with the longcode will be used as the default.\
> \
> \
> \### Response\
> \
> Upon successful creation, the response will include the \`deeplinkUrl\`\
> \
> \#### Example\
> \
> Request:\
> \
> \`\`\` json\
> {\
> &#x20; "longcodeId": 1337,\
> &#x20; "optInMessage": "Example",\
> &#x20; "senderName": "<example@i-msg.co>"\
> }\
> \
> &#x20;\`\`\`\
> \
> Response:\
> \
> \`\`\` json\
> {\
> &#x20; "deeplinkUrl": "<https://platform.mobile-text-alerts.com/deeplinks/abc"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> \
> undefined

````json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateIMessageDeeplink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"deeplinkUrl":{"type":"string"}},"required":["deeplinkUrl"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateIMessageDeeplink.Request":{"type":"object","properties":{"longcodeId":{"type":"number"},"optInMessage":{"type":"string"},"senderName":{"type":"string"}},"required":["optInMessage"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deeplinks/imessage":{"post":{"tags":["Deeplinks"],"summary":"Create IMessage Deeplink","operationId":"deeplinks_create_i_message_deeplink","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIMessageDeeplink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIMessageDeeplink.Request"}}},"required":true},"description":"**This feature is currently in closed beta**. Please contact your MTA account rep or MTA support for more information.\n\n### Request Body\n\n- `longcodeId`: The id of the longcode.\n\n- `optInMessage`: The opt-in message used to populate the deeplink urls.\n\n- `senderName`: The sender name used to pre-populate the \"To:\" field for iMessage\n    - If this field is empty, the sender name associated with the longcode will be used as the default.\n\n\n### Response\n\nUpon successful creation, the response will include the `deeplinkUrl`\n\n#### Example\n\nRequest:\n\n``` json\n{\n  \"longcodeId\": 1337,\n  \"optInMessage\": \"Example\",\n  \"senderName\": \"example@i-msg.co\"\n}\n\n ```\n\nResponse:\n\n``` json\n{\n  \"deeplinkUrl\": \"https://platform.mobile-text-alerts.com/deeplinks/abc\"\n}\n\n ```\n\n\nundefined"}}}}
````

### How to use a Mobile Text Alerts deeplink

{% stepper %}
{% step %}

### Generate your iMessage opt-in link

[See steps above.](#generate-a-deeplink-with-the-api) *Example:* `https://mobile-text-alerts.com/deeplink/abcd1234`
{% endstep %}

{% step %}

### Direct your subscribers to this deeplink

Through your method of choice, get this link to your subscribers. For example, you could send an SMS campaign from Mobile Text Alerts that announces your customers can now receive iMessages from you by clicking the link.
{% endstep %}

{% step %}

### Recipient clicks the link and iMessage capability is verified

When clicked, Mobile Text Alerts will automatically detect whether the recipient can send and receive iMessages.

* **iMessage detected:** If the recipient can send and receive iMessages, Mobile Text Alerts will redirect them to an iMessage-specific link that launches iMessage and prefills their opt-in message. All they have to do is hit send.
  * *Example:* `imessage://yoursenderidentity@your-imsg-domain.com&body=Signup`
* **Cannot send/receive iMessages:** If the link was opened on an Android phone, the web, or another non-iMessage-supported device, the deeplink will gracefully redirect them to a context-sensible location.
  * *Example:* Launch the SMS app instead, show a web opt-in form, etc.
    {% endstep %}
    {% endstepper %}

{% hint style="info" %}
If you choose another method to prompt recipients to opt in to iMessages, you can still use the special `imessage://` style URL to launch the iMessage app and prefill the message.
{% endhint %}

### Send Outbound Messages First

Mobile Text Alerts currently does **not** allow outbound messages to be sent to recipients before receiving an inbound opt-in message. As a result, messages can only be sent via iMessage to recipients who have explicitly completed the opt-in flow. This provides the best protection for your Sender Identities. Recipients are naturally wary of receiving unsolicited messages through iMessage because it is primarily a peer-to-peer messaging system. Apple may prompt users with a "Report Junk" warning for outbound messages received without an explicit inbound message from the recipient. These reports can result in your Sender Identity being blocked or disabled, which directly impacts your ability to deliver messages via iMessage. Mobile Text Alerts' opt-in requirement provides the best possible protection for your Sender Identities.

#### Are there ways to send outbound messages first via iMessage?

In certain uncommon cases, the restriction on requiring an inbound opt-in can be relaxed for individual Sender Identities, after careful review by our team. As described [above](#sending-outbound-messages-first), this significantly increases the risk of impact on delivery rates for that Sender Identity, and in requesting to lift this restriction, you are accepting that increased risk. Our team will only consider these requests for pre-existing Sender Identities that have already been in use. Our evaluation will look at the age of the Sender Identity (min 3 months old), number of active conversations, and overall inbound message reply rates. It is not guaranteed that a Sender Identity will be approved for outbound-first messaging.


# Send iMessages

Learn how to send iMessages via the API

Once your subscribers [opt in to receive iMessages](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-imessage/subscriber-opt-in), you can send iMessages to them. Mobile Text Alerts will automatically capture and record inbound opt-in messages and flag your subscribers as iMessage-enabled and opted in. Remember, opt-ins are tied to a specific [Sender Identity](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-imessage/sender-identity), so you must receive inbound consent from a subscriber on each Sender Identity you plan to use.

## Send iMessages via the API

When sending iMessages via the API, you need to specify a Sender Identity, and Mobile Text Alerts will handle routing messages intelligently based on current subscriber status. For the subscribers included in a <mark style="color:blue;">`/send`</mark> call, the system will verify whether they are iMessage-enabled and then route messages through your Sender Identity. A graceful [fallback to SMS](#sms-fallback) is also supported.

After completing the necessary configuration and setup steps, you should have a Sender Identity attached to one of your existing outbound longcodes used for SMS/MMS. This structure requires minimal changes to start using the iMessage route and provides flexibility to manage Sender Identities the same way you manage longcodes.

### Specify a Sender Identity with `senderName`

When calling the <mark style="color:blue;">`/send`</mark> endpoint, include `senderName` in the request to directly specify the sender name to use, without needing to include a `longcodeId`.

A Sender Identity must be indicated with either `senderName` or `longcodeId`.

### Specify a Sender Identity with `longcodeId`

When calling the <mark style="color:blue;">`/send`</mark> endpoint, you can also include `longcodeId` in the request. It will be used as a fallback to `senderName`. When a longcode has an associated iMessage Sender Identity, Mobile Text Alerts will use that identity for iMessage-enabled recipients.

### Create a request to the `/send` endpoint with the Sender Identity

See [Send a Message](https://developers.mobile-text-alerts.com/getting-started/send-a-message) to learn more about making a <mark style="color:blue;">`/send`</mark> call to the API.

## Webhooks

When sending messages via the iMessage route, you will receive webhooks from Mobile Text Alerts just as you would for other messaging routes (such as SMS). For messages routed via iMessage, you will receive [`delivery-status`](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks#delivery-status-delivery-status) callbacks as the message status changes during the sending process.

For webhook calls for iMessage [`message-send`](https://developers.mobile-text-alerts.com/webhooks#message-send) or [`message-reply`](https://developers.mobile-text-alerts.com/webhooks#message-reply) events, the payloads will include the `senderName` field to identify the sender "in-scope" with sending that message when sent via iMessage. For message replies, this is the `senderName` that the inbound reply was sent to.

When inbound messages are sent to your Sender Identities, Mobile Text Alerts will deliver [`message-reply`](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks#message-reply-message-reply) webhooks consistent with inbound SMS messages.

[Click here](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks) for more information on configuring webhooks for your account.


# SMS Fallback

Learn how the SMS fallback is handled for failed iMessage send requests

The iMessage route supports graceful fallback for several failure scenarios.

**Possible reasons an outbound iMessage send may fail:**

* The subscriber is not capable of receiving iMessages
* The subscriber has not opted-in via inbound message to the selected Sender Identity
* The Sender Identity has been disabled, blocked, or banned
* Our iMessage route is temporarily unavailable

If any of these failures occur, Mobile Text Alerts will fall back to SMS to deliver your message. This helps ensure your subscriber receives your message, even if there's an issue delivering via iMessage.


# Message Templates

Learn how to use Message Templates when calling the Mobile Text Alerts API

Pre-set message templates allow you to create a message once and then have it on hand to send at any time. You can create and send message templates in the platform, mobile app, and the API.

## Use a template to send a message with the API

Templates can be sent by making a `POST` request to the <mark style="color:blue;">`/send`</mark> endpoint. All requests to this endpoint must contain both **recipient** and **content** information. When using a message template, the `templateId` is used as the content.

**Required request fields:**

* **Choose recipient(s):** (Must be one of the following)
  * `subscriberIds: number[]` - List of subscriber IDs of recipients. Messages can be sent to specific subscribers, with each subscriber assigned a unique `subscriberId`.
  * `subscribers: (number | string)[]`- List of recipient phone numbers or email addresses. A new subscriber will be created for new recipients that are not already subscribers on your account.
  * `allSubscribers: boolean` - Flag to indicate send message to all subscribers if `true`. When `allSubscribers` is set to `true`, no other recipient fields should be specified. Default value is `false`.
  * `groups: number[]` - List of group IDs of recipients. Messages can be sent to specific groups, with each group assigned a unique `groupId`.
  * `threadId: number` - Messages can be sent in reply to a thread, with each thread assigned a unique `threadId`.
* **Content:**
  * `templateId: number` - Messages can be saved as pre-set message templates for reuse with saved controlled templates on your account assigned a `templateId`.
* **Other fields:**
  * `linkId: number` - If a message contains a `linkId`, then this field is required. Links can be created with the [`/shortlinks` endpoint](#create-a-short-link).

### Send a message template with the API

{% stepper %}
{% step %}

### Indicate the recipient(s)

You can send a message to a phone number as a test. Here you would set the `subscribers` field to the recipient phone number.

```json
"subscribers": [1112223333]
```

{% endstep %}

{% step %}

### Indicate the template to be sent

Use the `templateId` field to indicate which template will be used.

```json
"templateId": 101
```

{% endstep %}

{% step %}

### Form API request

Create the API request to the `/send` endpoint. Remember to include the [Authorization](https://mobile-text-alerts.gitbook.io/developer-center#authentication) header.

```json
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
--data '{"subscribers": [1112223333],
        "templateId": 101
        }'
```

{% endstep %}

{% step %}

### Receive response

The API will return a message about the status of your request.

```json
{
  "data": {
    "messageId": "uuid",
    "totalSent": 1,
    "totalFailedInternationalRecipients": 0
  },
```

{% endstep %}
{% endstepper %}

<details>

<summary>Send Message <mark style="color:orange;background-color:yellow;">POST</mark> <code>/send</code></summary>

</details>

## Using Shortlinks with Controlled Templates

When sending or scheduling a message, the `/send` endpoint will compose the message body using the provided `templateId` for a controlled template and, if required by the template, a provided `linkId`. Links can be created with the `/shortlinks` endpoint.

<details>

<summary>Create Short Link <mark style="color:orange;background-color:yellow;">POST</mark> <code>/shortlinks</code></summary>

</details>

## Include personalization in a template

Mobile Text Alerts supports Liquid templates for message personalization. A template can include custom variables like `{{firstName}}`, which are replaced using per-recipient properties. This requires you to provide a `properties` object that maps each phone number to its corresponding data.

See [#properties-field-for-custom-variables-in-messages](https://developers.mobile-text-alerts.com/tutorials/send-an-sms-message#properties-field-for-custom-variables-in-messages "mention") to learn more.

## Templates API endpoints

### View all templates

You can call <mark style="color:green;background-color:green;">GET</mark> `/templates` to see all the available templates on your account:

<details>

<summary>List Templates <mark style="color:green;background-color:green;">GET</mark> <code>/templates</code></summary>

</details>

### View a specific template

To see the details on a specific template, you will need the `{id}` of the template. Then call <mark style="color:green;background-color:green;">GET</mark> `/templates/{id}` :

<details>

<summary>Get Template <mark style="color:green;background-color:green;">GET</mark> <code>/templates/{id}</code></summary>

</details>

### Update a specific template

To make changes to a specific template, you will need the `{id}` of the template. Then call <mark style="color:purple;background-color:purple;">PATCH</mark> `/templates/{id}` with the body containing the new template data, `message` is required.

**Example request:**

```json
curl --location --request PATCH 'https://api.mobile-text-alerts.com/v3/templates/123' \
--data '{
    "name": "Updated Template Name",
    "message": "This is an updated template message",
    "isMMS": true
}'
```

<details>

<summary>Update Template <mark style="color:purple;background-color:purple;">PATCH</mark> <code>/templates/{id}</code></summary>

</details>

### Delete a Template

To remove a specific template, you will need the `{id}` of the template, then call <mark style="color:red;background-color:red;">DELETE</mark> `/templates/{id}`

<details>

<summary>Delete Template <mark style="color:red;background-color:red;">DELETE</mark> <code>/templates/{id}</code></summary>

</details>

### Create a new template

When creating a new template, the `message` field is required to hold the content of the message.

**Example request:**

```json
curl --location 'https://api.mobile-text-alerts.com/v3/templates' \
--data '{
    "name": "New Template",
    "message": "This is a template message",
    "isMMS": true
}'
```

<details>

<summary>Create Template <mark style="color:orange;background-color:yellow;">POST</mark> <code>/templates</code></summary>

</details>

## Template-Only Sending

If your account is configured for template-only message sending, please use the Controlled Template endpoints below to view available templates:

<details>

<summary>List Controlled Templates <mark style="color:green;background-color:green;">GET</mark> <code>/controlled-templates</code></summary>

</details>

<details>

<summary>Get Controlled Template Endpoint <mark style="color:green;background-color:green;">GET</mark> <code>/controlled-templates/{controlledTemplateId}</code></summary>

</details>

### Template Examples

* [91 Sample Text Messages to Customers, Message Templates](https://mobile-text-alerts.com/articles/sample-text-messages-to-customers)
* [43 Auto Reply Text Message Examples (+ 3 Tips)](https://mobile-text-alerts.com/articles/auto-reply-text-message-examples)


# Receive and Reply to Messages

This tutorial will explain the steps involved to receive message responses and to reply to them with the API

{% hint style="info" %}
**Prerequisite:**

In order to receive message reply notifications, you must first configure a [`message-reply`](https://developers.mobile-text-alerts.com/webhooks#message-reply) webhook.

If you haven't yet configured any webhooks for your account see:  [setting-up-your-first-webhook](https://developers.mobile-text-alerts.com/tutorials/webhooks/setting-up-your-first-webhook "mention")
{% endhint %}

## Overview of process:

1. [Send outbound message](#step-1-send-outbound-message)
2. [User receives message and replies, you receive the reply](#step-2-user-receives-message-and-replies-you-receive-the-reply)
3. [Create response to a reply](#step-3-create-response-to-a-reply)

See below for details of each step of the process to ensure you have the data required to complete this process.

## Step 1: Send outbound message

An initial message is sent, just as other messages, with a request to the `/send` endpoint of the API. But in order to track this message for potential future replies, this request must contain identifying metadata.

### Use request metadata to add an internal identifier

This identifier can be set in either of the following parameters when creating your initial request: `externalId` or `tags` .

Either parameter can be used to ensure that the `message-reply` payload sent your endpoint will contain the necessary data needed for you to create a reply.

#### - Include the `externalId` parameter

The `externalId` parameter is an optional string field intended for you create and assign your own identifier for each message request. This is strongly recommended as it ensures consistency between your system and Mobile Text Alerts. With an `externalId` MTA can return this specific identifier in all future webhook calls related to this message.

**Example:** `"externalId": "RequestId-4e0242e2-d101"`

#### - Include the `tags` parameter

You can also use the `tags` parameter, a general purpose tagging system, as a way to assign any additional data in the request to the `/send` endpoint. The `tags` object is tracked with the outbound message record and will be reflected in all webhook calls related to this outbound message. The `tags`  can contain metadata about the recipient, the message send request, an identifier to you external system and any other data for your use case.

**Example:** `"tags": {"ABCompanyId": "4e0242e2-d101"}`&#x20;

#### Send the request

A successful `/send` request will return a `messageId` as part of the response. This is the unique identifier of the request assigned by Mobile Text Alerts. It is recommended to store this `messageId`  in your system to reconcile with your provided internal identifier.

## Step 2: User receives message and replies, you receive the reply

Message reply notifications, will be sent via [`message-reply`](https://developers.mobile-text-alerts.com/webhooks#message-reply) webhook calls. A `message-reply` event sent to your webhook URL will contains the following field data in the payload that is relevant to sending response messages:

* `fromNumber` -  identifies the phone number of the subscriber that sent the reply&#x20;
* `externalId`  - the original string you provided on the initial *outbound* message
* `messageId` - the internal MTA identifier for this *inbound* message reply
* `message` - (SMS/text only replies)  the full contents of the subscriber's reply.&#x20;
* `url` - (MMS replies) a URL where the inbound media has been re-hosted. If you plan to use this supplied media within your application, it is recommended that you download and cache this resource for further use.
* `tags` - the original tag metadata you provided on the initial *outbound* message

Refer to the [`message-reply` webhook payload](https://developers.mobile-text-alerts.com/webhooks#message-reply) for additional field information.

## Step 3: Create response to a reply

The `fromNumber` identifies the phone number of the subscriber that replied, but that subscriber may receive messages from different numbers on your account or may be replying to different messages at different points in time. To avoid this confusion, instead of associating your reply to a *subscriber*, it is best to associate a reply to an *outbound message*.

You can determine the initial outbound message being replied to by retrieving the original outbound message from your system, using the `externalId` and/or `tags` in the reply payload. This enables your application to produce a consistently ordered chain of messages, both outbound and inbound, needed to support 2-way conversations.

To form your response message request, you can reuse the initial outbound number by setting the same `longcodeId` value in the `/send` request that was previously used for the original outbound message. Set the recipient to the value of the `fromNumber`. Ensure that you provide a new internal identifier for this outbound message in order to repeat this process of send and reply.


# Manage Subscribers

View all the ways you can interact with the API to manage your subscribers

* [#list-all-subscribers-api-endpoint](#list-all-subscribers-api-endpoint "mention")
* [#create-subscriber-api-endpoint](#create-subscriber-api-endpoint "mention")
* [#update-subscriber-api-endpoint](#update-subscriber-api-endpoint "mention")
* [#get-subscriber-api-endpoint](#get-subscriber-api-endpoint "mention")
* [#delete-subscriber-api-endpoint](#delete-subscriber-api-endpoint "mention")

## List all Subscribers API Endpoint

[<mark style="color:green;">`GET`</mark> `/subscribers`](#get-subscribers)

List and search subscribers. Results include subscribers where the `query` value matches first name, last name, number, email, or custom subscriber fields. You can also apply `filters` for these same categories.

**Rate Limit**

This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests per `15` seconds.

### Example Request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/subscribers' \
  --header 'Authorization: Bearer 6078eebf-7661-5458-330e-74cd055a0b03'
```

**Example Successful Response**

```json
{
  "data": {
    "rows": [
      {
        "id": 109021626,
        "firstName": "Test",
        "lastName": "Example",
        "email": "test@mobile-text-alerts.com",
        "number": 0,
        "date": "2025-03-20T19:09:38.000Z",
        "countryId": null,
        "groups": [],
        "subscriberFieldData": [],
        "signupMethod": 11,
        "longNumber": 0,
        "carrierId": 41
      },
      {
        "id": 109021633,
        "firstName": "FirstName",
        "lastName": "LastName",
        "email": "example@mobile-text-alerts.com",
        "number": 1112228904,
        "e164Number": "+1112228904",
        "date": "2025-03-21T15:50:54.000Z",
        "countryId": 209,
        "groups": [],
        "subscriberFieldData": [],
        "signupMethod": 5,
        "longNumber": 1112228904,
        "carrierId": 41
      }
    ],
    "page": 0,
    "pageSize": 25,
    "total": 2
  }
}
```

## List Subscribers

> List all subscribers and query for subscribers. Includes all subscribers with \`query\` value in either first name, last name, number, email, or custom subscriber fields and with \`filters\` values in respective categories.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListSubscribers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicNumber"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"ISubscribersFilter":{"type":"object","properties":{"date":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"groupId":{"type":"string"},"countryId":{"type":"string"},"signupMethod":{"type":"string"},"subscriberIds":{"type":"string"},"isLandline":{"type":"boolean"},"areaCode":{"type":"string"},"attributeId":{"type":"string"},"attributeString":{"type":"string"},"attributeDate":{"type":"string"},"attributeBoolean":{"type":"boolean"},"attributeMultiSelect":{"type":"boolean"},"attributeIsEmpty":{"type":"boolean"},"attributeIsNotEmpty":{"type":"boolean"},"isNotAGroupMember":{"type":"boolean"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers":{"get":{"tags":["Subscribers"],"summary":"List Subscribers","description":"List all subscribers and query for subscribers. Includes all subscribers with `query` value in either first name, last name, number, email, or custom subscriber fields and with `filters` values in respective categories.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_list_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSubscribers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ISubscribersFilter"}},{"name":"settings","in":"query","required":false,"schema":{"type":"object","properties":{"includeGroupMemberData":{"type":"boolean"}},"required":[]}},{"name":"allSubscribers","in":"query","required":false,"schema":{"type":"boolean"}}]}}}}
```

## Create Subscriber API Endpoint

[<mark style="color:orange;">`POST`</mark> `/subscribers`](#post-subscribers)

Used to add a new subscriber.

{% hint style="info" %}
If you provide a phone number or email that already exists on the same account, this endpoint will update the existing subscriber with new information.
{% endhint %}

**Rate Limit**

This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests per `15` seconds.

{% hint style="info" %}
If you are creating many subscribers at one time, use the [Bulk Create](https://developers.mobile-text-alerts.com/tutorials/bulk-create-update-subscribers#post-subscribers-bulk) endpoint to batch updates. This can save on request round-trip time and overall API call volume.
{% endhint %}

**Body**

*Required Fields:* `email` *or* `number`

<table><thead><tr><th width="186.5">Name</th><th width="170.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>firstName</code></td><td><code>string</code></td><td>First name of the subscriber.</td></tr><tr><td><code>lastName</code></td><td><code>string</code></td><td>Last name of the subscriber.</td></tr><tr><td><code>number</code><em>(required if no email)</em></td><td><code>number</code>/<code>string</code></td><td>Phone number of the subscriber. <a href="../phone-number-format-guide#recommended-format-e.164">E.164 formatted strings are recommended to avoid confusion.</a></td></tr><tr><td><code>email</code> <em>(required if no number)</em></td><td><code>string</code></td><td>Email address of the subscriber.</td></tr><tr><td><code>e164Number</code></td><td><code>string</code></td><td><p><a href="../phone-number-format-guide#e.164-numbering-plan-format">E.164 international telephone number</a> of the subscriber. If supplied, will be used over <code>number</code> .</p><p></p><p><em>E.164 Format:</em> </p><p>[+] [country code] [subscriber number including area code] (max. 15 digits)</p></td></tr><tr><td><code>groupIds</code></td><td><code>number[]</code></td><td>List of group ids of the groups the subscriber belongs to.</td></tr><tr><td><code>subscriberFields</code></td><td><code>dictionary</code>: <code>subscriberFieldIds:string</code> as the keys and <code>data: string</code> corresponding values</td><td><p>A dictionary of key value pairs of additional <a href="manage-subscribers/assign-custom-subscriber-attributes">custom subscriber attributes</a> for the subscriber.</p><p></p><p><em>Example:</em> </p><pre class="language-curl"><code class="lang-curl">"subscriberFields": {
<strong>    "2000": "January 1st, 2000",
</strong><strong>    "2001": "Custom Field Data"
</strong>}
</code></pre></td></tr></tbody></table>

### Example Request

```bash
curl -XPOST --location 'https://api.mobile-text-alerts.com/v3/subscribers' \
  --header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
  --header 'Content-Type: application/json' \
  --data-raw '{  
    "firstName": "FirstName", 
    "lastName": "LastName", 
    "number": 8002223333, 
    "email": "example@mobile-text-alerts.com" 
}'
```

**Example Successful Response**

```json
{
  "data": {
    "id": 100,
    "firstName": "firstName",
    "lastName": "lastName",
    "email": "test@example.com",
    "number": 1234567890,
    "date": "2021-01-01T00:00:00.000Z",
    "countryId": 0,
    "groups": [
      {
        "id": 100,
        "name": "Group A"
      },
      {
        "id": 101,
        "name": "Group B"
      },
      {
        "id": 102,
        "name": "Group C"
      }
    ],
    "subscriberFieldData": [
      {
        "id": 1000,
        "subscriberFieldId": 2000,
        "data": "January 1st, 2000"
      },
      {
        "id": 1001,
        "subscriberFieldId": 2001,
        "data": "Custom Field Value"
      }
    ],
    "signupMethod": 3,
    "longNumber": 1234567890
  }
}
```

## Create Subscriber

> Add a new subscriber. If given a phone number or email that already exists tied to the same account, updates the existing subscriber with new information\
> \
> \_Required Fields: email or number\_\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"CreateSubscriberRequest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":["firstName","lastName","email","number","groupIds","subscriberFields","employeeNumber","welcomeMessage"],"description":"SubscriberRequest"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers":{"post":{"tags":["Subscribers"],"summary":"Create Subscriber","description":"Add a new subscriber. If given a phone number or email that already exists tied to the same account, updates the existing subscriber with new information\n\n_Required Fields: email or number_\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_create_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriberRequest"}}},"required":true}}}}}
```

## Update Subscriber API Endpoint

[<mark style="color:purple;">`PATCH`</mark> `/subscribers/{idOrNumberOrEmail}`](#patch-subscribers-idornumberoremail)

Update details for a specific subscriber. If a field isn't specified, the original value is retained. The exception is `groups`, where the subscriber is added to the specified groups and removed from all other groups.

If you provide a phone number or email that already exists, this endpoint returns `success: false`.

**Path Variable**

When making the request, the subscriber ID, phone number, or email must be included as an identifier in the path:

* `idOrNumber: string`
* `subscriberId: number`

**Rate Limit**

This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests per `15` seconds.

{% hint style="info" %}
If you are updating many subscribers at one time, use the [Bulk Update](https://developers.mobile-text-alerts.com/tutorials/bulk-create-update-subscribers#patch-subscribers-bulk) endpoint to batch updates. This can save on request round-trip time and overall API call volume.
{% endhint %}

**Body** *(all optional)*

<table><thead><tr><th width="186.5">Name</th><th width="170.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>firstName</code></td><td><code>string</code></td><td>First name of the subscriber.</td></tr><tr><td><code>lastName</code></td><td><code>string</code></td><td>Last name of the subscriber.</td></tr><tr><td><code>number</code></td><td><code>number</code></td><td>Phone number of the subscriber. <a href="../phone-number-format-guide#recommended-format-e.164">E.164 formatted strings are recommended to avoid confusion.</a></td></tr><tr><td><code>email</code> </td><td><code>string</code></td><td>Email address of the subscriber.</td></tr><tr><td><code>e164Number</code></td><td><code>string</code></td><td><p><a href="../phone-number-format-guide#e.164-numbering-plan-format">E.164 international telephone number of the subscriber.</a> If supplied, will be used over <code>number</code> .</p><p></p><p><em>E.164 Format:</em> </p><p>[+] [country code] [subscriber number including area code] (max. 15 digits)</p></td></tr><tr><td><code>groupIds</code></td><td><code>number[]</code></td><td>List of group ids of the groups the subscriber belongs to.</td></tr><tr><td><code>subscriberFields</code></td><td><code>dictionary</code>: <code>subscriberFieldIds:string</code> as the keys and <code>data: string</code> corresponding values</td><td><p>A dictionary of key value pairs of additional <a href="manage-subscribers/assign-custom-subscriber-attributes">custom subscriber attributes</a> for the subscriber.</p><p></p><p><em>Example:</em> </p><pre class="language-curl"><code class="lang-curl">"subscriberFields": {
<strong>    "2000": "January 1st, 2000",
</strong><strong>    "2001": "Custom Field Data"
</strong>}
</code></pre></td></tr></tbody></table>

### Example Request

```bash
curl --request PATCH --location 'https://api.mobile-text-alerts.com/v3/subscribers/100' \
  --header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
  --header 'Content-Type: application/json' \
  --data-raw '{"firstName":"FirstName1","lastName":"LastName1"}'
```

**Example Successful Response**

```json
{"message":"Subscriber updated successfully.",
    "data":{
        "id":109021633,
        "firstName":"FirstName",
        "lastName":"LastName",
        "email":"example@mobile-text-alerts.com",
        "number":12223334444,
        "e164Number":"+12223334444",
        "date":"2025-03-21T15:50:54.000Z",
        "countryId":209,"groups":[],
        "subscriberFieldData":[],
        "signupMethod":5,
        "longNumber":2069638904,
        "carrierId":41
        }
}
```

## Update Subscriber

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"UpdateSubscriberRequest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":["firstName","lastName","email","number","groupIds","subscriberFields","employeeNumber","welcomeMessage"],"description":"SubscriberRequest"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/{idOrNumberOrEmail}":{"patch":{"tags":["Subscribers"],"summary":"Update Subscriber","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_update_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriberRequest"}}},"required":true},"parameters":[{"name":"idOrNumberOrEmail","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Get Subscriber API Endpoint

[<mark style="color:green;">`GET`</mark> `/subscribers/{idOrNumber}`](#get-subscribers-idornumberoremail)

List data for the specified subscriber (using the path variable).

**Path Variable**

When making the request, the subscriber ID or phone number must be included as an identifier in the path:

* `idOrNumber: string`
* `subscriberId: number`

**Rate Limit**

This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests per `15` seconds.

### Example Request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/subscribers/100' \
  --header 'Authorization: Bearer 6078eebf-7661-5458-330e-74cd055a0b03'
```

**Example Successful Response**

```json
{"data":
    {"id":100,
    "firstName":"FirstName",
    "lastName":"LastName",
    "email":"example@mobile-text-alerts.com",
    "number":1112228904,"e164Number":"+1112228904",
    "date":"2025-03-21T15:50:54.000Z",
    "countryId":209,
    "groups":[],
    "subscriberFieldData":[],
    "signupMethod":5,
    "longNumber":2069638904,
    "carrierId":41
    }
}
```

## Get Subscriber

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/{idOrNumberOrEmail}":{"get":{"tags":["Subscribers"],"summary":"Get Subscriber","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_get_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"idOrNumberOrEmail","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Delete Subscriber API Endpoint

[<mark style="color:red;">`DELETE`</mark> `/subscribers/{idOrNumber}`](#delete-subscribers-idornumberoremail)

Remove the specified subscriber (using the path variable).

**Path Variable**

When making the request, the subscriber ID or phone number must be included as an identifier in the path:

* `idOrNumber: string`
* `subscriberId: number`

A <mark style="color:red;">`404`</mark> response will be returned if this identifier is not found.

**Rate Limit**

This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests per `15` seconds.

### Example Request

```bash
curl --request DELETE --location 'https://api.mobile-text-alerts.com/v3/subscribers/100' \
  --header 'Authorization: Bearer 6078eebf-7661-5458-330e-74cd055a0b03'
```

**Example Successful Response**

```json
{"message":"Subscriber deleted successfully."}
```

## Delete Subscriber

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteSubscriber.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/{idOrNumberOrEmail}":{"delete":{"tags":["Subscribers"],"summary":"Delete Subscriber","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_delete_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"idOrNumberOrEmail","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

Visit [subscribers](https://developers.mobile-text-alerts.com/api-reference/subscribers "mention") for full API reference.


# Assign Custom Subscriber Attributes

Learn how you can add and update the Custom Subscriber Attributes assigned to your individual subscribers.

Custom Subscriber Attributes are used to store data of any type that you define for your subscribers. These attributes can be added and updated manually through [the platform](#manage-custom-subscriber-attributes-in-the-platform), automatically from your subscribers via [SMS with a workflow](#use-a-workflow-to-collect-subscriber-attributes), and with the [Mobile Text Alerts API](#manage-subscriber-attributes-with-the-mobile-text-alerts-api).

{% hint style="info" %}
This page describes how to assign Custom Subscriber Attributes, see [custom-subscriber-attributes](https://developers.mobile-text-alerts.com/tutorials/custom-subscriber-attributes "mention") to learn how to create these fields with the API.
{% endhint %}

## Manage Custom Subscriber Attributes in the Dashboard

Visit the [Manage Custom Attributes](https://platform.mobile-text-alerts.com/subscribers/attributes) tab in the platform dashboard by selecting **Subscribers** > **Attributes**. Here you can view and search all attributes currently available for your subscribers.

### Edit or Delete Attributes

Click on a specific attribute to edit it, or click the "trash bin" icon <img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FfdNY02Zp05hvgjOdyM9k%2FScreen%20Shot%202025-05-09%20at%2012.11.09%20PM.png?alt=media&#x26;token=3cc948a2-bf63-4430-8e96-b3ce690f7684" alt="" data-size="line"> to delete an attribute.

### Add Attributes

1. Click the **Add Attribute** button.
2. Enter the **Name** of the new attribute.
3. Select from the following data types under **Attribute Type**:
   * `Text` (plain text)
   * `Number` (digits only)
   * `Date` (you will need to specify the date format)
   * `Checkbox` (a flag option that allows either checked or unchecked)
   * `Option`/`Multi Options` (this will allow you to create an `enum` of possible options)
   * `Address` (text for storing subscriber addresses)

***Example:*** To create a field to store subscribers' birthdays, you could create the following attribute:

* **Name:** "Birthday" with the **Attribute Type:** `Date`.

### Assign Attributes to Subscribers

After your attributes are created, you can assign the data for those attributes to your subscribers manually on the [Manage Subscribers](https://platform.mobile-text-alerts.com/subscribers/manage) page, or by importing a spreadsheet.

You can also configure your account's [sign-up page](https://platform.mobile-text-alerts.com/optins/sign-up-page) to collect subscriber data as part of the enrollment process.

## Use a Workflow to Collect Subscriber Attributes

Workflow Builder allows you to automatically collect data from your subscribers via SMS.

{% embed url="<https://youtu.be/sitvk0UqIiM>" %}

[Click here to learn more](https://mobile-text-alerts.deskpro.com/kb/articles/new-how-to-use-the-workflow-builder).

## Manage Subscriber Attributes with the Mobile Text Alerts API

### Add/update a subscriber's attributes

{% hint style="info" %}
This section explains how to add/update attributes for individual subscribers on your account. To learn how to manage the attributes that are configured for your account, visit [custom-subscriber-attributes](https://developers.mobile-text-alerts.com/tutorials/custom-subscriber-attributes "mention").
{% endhint %}

Subscriber attributes can be added or updated by including key/value pairs in `subscriberFields` as part of the request body to one of the [/subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers) endpoints.

The data type of the Custom Subscriber Attribute must match what is configured for that field. For example, the request below uses the following Custom Subscriber Attribute: `"name":"Birthday","type":"date","format":"MM/DD/YYYY"`.

#### **Example Request to Create a Subscriber** [`POST` <mark style="color:blue;">`/subscribers`</mark>](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/..#post-subscribers)

<pre class="language-json"><code class="lang-json">curl -XPOST --location 'https://api.mobile-text-alerts.com/v3/subscribers' \
  --header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
  --header 'Content-Type: application/json' \
  --data-raw '{  
    "firstName": "FirstName", 
    "lastName": "LastName", 
    "number": 8002223333, 
    "email": "example@mobile-text-alerts.com",
    "subscriberFields": {
      "<a data-footnote-ref href="#user-content-fn-1">Birthday</a>": "01/01/2000"
    } 
}'
</code></pre>

Mobile Text Alerts will assign each custom attribute a `SubscriberFieldId`. Each subscriber attribute will have a unique `id` assigned for that instance. You can retrieve this data by viewing the subscriber record via the API.

### View Subscriber Attributes

Custom subscriber attributes are returned by the Mobile Text Alerts API in the `subscriberFieldData` field, which contains:

* `id` - Refers to the specific *instance* of that field for the specified subscriber
* `subscriberFieldId` - Identifies the `CustomFieldId` of the Custom Subscriber Attribute. This can be used to [retrieve or update the Custom Subscriber Attribute](https://developers.mobile-text-alerts.com/custom-subscriber-attributes#update-a-custom-subscriber-attribute).
* `data` - The data for this field for the specified subscriber

For example, when retrieving a subscriber's data from [`GET` `/subscribers`](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/..#get-subscribers):

#### Example Response:

<pre class="language-json"><code class="lang-json">{"id":109021626,
    "firstName":"Test",
    "lastName":"Example",
    "email":"example@mobile-text-alerts.com",
    "number":0,
    "date":"2025-03-20T19:09:38.000Z",
    "countryId":null,
    "groups":[],
    "<a data-footnote-ref href="#user-content-fn-2">subscriberFieldData</a>":
        [{"id":21323389,"subscriberFieldId":7506,"data":"01/01/2000"},
        {"id":21323390,"subscriberFieldId":7507,"data":"ExampleAttribute"}],
    "signupMethod":11,
    "longNumber":0,
    "carrierId":41
}
</code></pre>

[^1]: fieldName

[^2]: Custom subscriber attributes


# Group Subscribers

Learn how to create and update groups of subscribers, useful for targeted messaging.

Organizing subscribers into different groups enables you to easily send targeted messages to specific segments. With Mobile Text Alerts, you can add, edit, and remove groups and subscribers via the [online dashboard](https://platform.mobile-text-alerts.com/manage-groups) or with the [Mobile Text Alerts API](#manage-groups-with-the-api), making it easy to keep your contact lists updated.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FRFMxkp6P9bYrholEAE65%2FManageGroupDashboard.png?alt=media&#x26;token=ba1a4955-e71a-448a-8fff-c11a67ac8b5f" alt=""><figcaption><p>Manage Group Members in the online dashboard</p></figcaption></figure>

## Manage Groups with the API

The Mobile Text Alerts API allows you to [create a group](#create-a-new-group), [delete a group](#delete-group), [update an existing group's metadata](#update-groups), or [view all groups](#list-all-groups) for your account.

Note that these actions are used to make changes to the group itself, not the subscribers that may be contained within the group. See [Manage Group Members](#manage-group-members) to see actions for adding/removing subscribers from your groups.

[Click here](https://developers.mobile-text-alerts.com/api-reference/groups) to view the full API Reference for Groups.

### Create a new Group

A <mark style="color:orange;">`POST`</mark> call to the [`/groups`](#post-groups) endpoint creates a new group. See below for all additional request fields for group metadata.

#### Example request

```bash
curl -L \
  --request POST \
  --url 'https://api.mobile-text-alerts.com/v3/groups' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "Example"
  }'
```

**Successful response:** `"message": "Created group Example."`

#### Request Fields

<table><thead><tr><th width="166.5">Name</th><th width="164.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code> <em>- required</em></td><td><code>string</code></td><td>The name of the group.</td></tr><tr><td><code>hidden</code></td><td><code>boolean</code></td><td>Indicates if the group is hidden.</td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Description of the group.</td></tr><tr><td><code>displayName</code></td><td><code>string</code></td><td>An alternate display name for this group</td></tr><tr><td><code>sortOrder</code></td><td><code>number</code></td><td>Override default sorting when displaying this group on the subscriber sign up page</td></tr><tr><td><code>isTemporary</code></td><td><code>boolean</code></td><td>When set to true, this group is marked as temporary. Temporary groups are deleted at midnight of the day following their creation.</td></tr><tr><td><code>createdAt</code></td><td><code>string</code></td><td>Timestamp of when the group was created. For example: <code>"2025-05-29T19:04:14.000Z"</code></td></tr><tr><td><code>settings</code></td><td><code>object</code></td><td>This field is only used for<a href="group-subscribers/adaptive-groups"> Adaptive Groups</a>. See <a href="adaptive-groups#configure-settings-field-for-a-group">Configure <code>settings</code> field for a group</a> to learn more about this field.</td></tr></tbody></table>

## POST /groups

> Create Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateGroup.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicGroup"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]},"CreateGroup.Request":{"$ref":"#/components/schemas/Partial-IGroup"},"Partial-IGroup":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"keyword":{"type":"string"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups":{"post":{"tags":["Groups"],"summary":"Create Group","operationId":"groups_create_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroup.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroup.Request"}}},"required":true}}}}}
```

### Delete Group

Groups can be deleted without needing to supply a request body. Simply include the `{groupId}` of the group to be deleted as a path parameter with your <mark style="color:red;">`DELETE`</mark> request.

#### Example Request

In the example below, we delete `groupId`: `187561`.

```bash
curl --request DELETE --location 'https://api.mobile-text-alerts.com/v3/groups/187561' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03'
```

**Successful Response:** `{"message":"Group deleted successfully."}`

## DELETE /groups/{groupId}

> Delete Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteGroup.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}":{"delete":{"tags":["Groups"],"summary":"Delete Group","operationId":"groups_delete_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGroup.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

### Update Groups

The fields that contain group metadata can be added or updated at any time by calling the <mark style="color:purple;">`PATCH`</mark> [`/groups/{groupId}`](#patch-groups-groupid) endpoint with the identifying `{groupId}` of the group to be updated. See below for all optional request fields that contain group metadata.

#### Example Request

In the example below, we update `groupId`: `187561`.

```bash
curl -L \
  --request PATCH \
  --url 'https://api.mobile-text-alerts.com/v3/groups/187561' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "New Name"
  }'
```

**Successful response:** `"message": "Updated group New Name."`

#### Request Fields

<table><thead><tr><th width="166.5">Name</th><th width="164.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code> <em>- required</em></td><td><code>string</code></td><td>The name of the group.</td></tr><tr><td><code>hidden</code></td><td><code>boolean</code></td><td>Indicates if the group is hidden.</td></tr><tr><td><code>description</code></td><td><code>string</code></td><td>Description of the group.</td></tr><tr><td><code>displayName</code></td><td><code>string</code></td><td>An alternate display name for this group</td></tr><tr><td><code>sortOrder</code></td><td><code>number</code></td><td>Override default sorting when displaying this group on the subscriber sign up page</td></tr><tr><td><code>isTemporary</code></td><td><code>boolean</code></td><td>When set to true, this group is marked as temporary. Temporary groups are deleted at midnight of the day following their creation.</td></tr><tr><td><code>createdAt</code></td><td><code>string</code></td><td>Timestamp of when the group was created. For example: <code>"2025-05-29T19:04:14.000Z"</code></td></tr><tr><td><code>settings</code></td><td><code>object</code></td><td>This field is only used for<a href="group-subscribers/adaptive-groups"> Adaptive Groups</a>. See <a href="adaptive-groups#configure-settings-field-for-a-group">Configure <code>settings</code> field for a group</a> to learn more about this field.</td></tr></tbody></table>

## PATCH /groups/{groupId}

> Update Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateGroup.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicGroup"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]},"UpdateGroup.Request":{"$ref":"#/components/schemas/Partial-IGroup"},"Partial-IGroup":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"keyword":{"type":"string"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}":{"patch":{"tags":["Groups"],"summary":"Update Group","operationId":"groups_update_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroup.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroup.Request"}}},"required":true},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

### List All Groups

Call the <mark style="color:green;">`GET`</mark> [`/groups`](#get-groups) endpoint to see the groups on your account.

{% hint style="warning" %}
This endpoint does **not** show [adaptive groups](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/adaptive-groups) by default, see [List Adaptive Groups](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/adaptive-groups#list-adaptive-groups-with-the-api) to learn more.
{% endhint %}

{% hint style="info" %}
This endpoint produces paginated results. You may need to make multiple queries to retrieve every group on your account.
{% endhint %}

Query responses include the following data:

* `page` - the current page of results being shown
* `pageSize` - number of groups shown per page
* `total` - the total number of groups on your account

#### Example Request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/groups' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03'
```

**Successful response:**

```json
{"data":
    {"rows":
    [{"id":187561,
        "name":"Test Group",
        "hidden":0,
        "displayName":null,
        "welcomeMessage":"",
        "sortOrder":null,
        "description":"First group created for testing.",
        "createdAt":"2025-05-29T19:04:14.000Z",
        "memberCount":0,"type":"static"},
    {"id":187572,
        "name":"API-Test",
        "hidden":0,
        "displayName":null,
        "welcomeMessage":"",
        "sortOrder":null,
        "description":null,
        "createdAt":"2025-05-29T14:47:26.000Z",
        "memberCount":0,"type":"static"}],
"page":0,"pageSize":25,"total":2}}
```

## GET /groups

> List Groups

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListGroups.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroup"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups":{"get":{"tags":["Groups"],"summary":"List Groups","operationId":"groups_list_groups","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGroups.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"includeAdaptive":{"type":"boolean"}},"required":[]}}]}}}}
```

## Manage Group Members

Subscribers can be [added](#add-subscriber-to-group) or [deleted](#delete-group-member) from your groups with the API endpoints documented below.

{% hint style="info" %}
If you need to add or delete many group members in a single request, see [groups-bulk-add-delete-subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/groups-bulk-add-delete-subscribers "mention") for bulk endpoints that can accept up to 1,000 records in a single request.
{% endhint %}

### Add Subscriber to Group

To add a subscriber to a group, you need both the `subscriberId` and the `groupId`. The `subscriberId` is passed in the request body, and the `groupId` is specified as a path parameter.

#### Example request:

In the example below, we add `subscriberId`: `108767117` to `groupId`: `187561`.

```bash
curl -X POST --location 'https://api.mobile-text-alerts.com/v3/groups/187561/subscribers' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
  --header 'Content-Type: application/json' \
  --data '{"subscriberId":108767117}'
```

**Successful response:** `{"message":"Added subscriber 108767117 to group 187561."}`

{% hint style="info" %}
By default, when adding a subscriber to a group, the `addToDripCampaigns` field is set to `true`. Set this field to `false` if you don't want this subscriber included in drip campaigns.
{% endhint %}

## Add Subscriber to Group

> Required Fields: \`subscriberId\`\
> \
> Note: Field \`addToDripCampaigns\` is \`true\` by default.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateGroupMember.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateGroupMember.Request":{"type":"object","properties":{"subscriberId":{"type":"number"},"addToDripCampaigns":{"type":"boolean"}},"required":["subscriberId"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers":{"post":{"tags":["Groups"],"summary":"Add Subscriber to Group","operationId":"groups_create_group_member","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupMember.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupMember.Request"}}},"required":true},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"description":"Required Fields: `subscriberId`\n\nNote: Field `addToDripCampaigns` is `true` by default.\n\n\nundefined"}}}}
```

### Delete Group Member

Subscribers can be removed from a group by identifying them with the `groupId` and `subscriberId` in the path parameters to the <mark style="color:red;">`DELETE`</mark> [`/groups/{groupId}/subscribers/{subscriberId}`](#delete-groups-groupid-subscribers-subscriberid) endpoint.

#### Example request

In the example below, we delete `subscriberId`: `108767117` from `groupId`: `187561`.

```bash
curl --request DELETE --location 'https://api.mobile-text-alerts.com/v3/groups/187561/subscribers/108767117' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03'
```

**Successful Response:** `{"message":"Deleted subscriber 108767117 from group 187561."}`

## DELETE /groups/{groupId}/subscribers/{subscriberId}

> Remove Subscriber from Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteGroupMember.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers/{subscriberId}":{"delete":{"tags":["Groups"],"summary":"Remove Subscriber from Group","operationId":"groups_delete_group_member","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGroupMember.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}},{"name":"subscriberId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```


# Adaptive Groups

Learn how to configure Adaptive Groups with the Mobile Text Alerts API to create groups that auto-populate over time.

With Adaptive Groups, you can automatically segment subscribers based on predefined criteria. Once configured, these groups auto-populate with subscribers who meet the defined conditions, without manual intervention. This ongoing audience segmentation enables targeted messaging for smarter, data-driven campaigns.

This page explains how to create and configure Adaptive Groups using the Mobile Text Alerts API. [Click here](https://mobile-text-alerts.deskpro.com/kb/articles/adaptive-groups) for more details about using Adaptive Groups in the platform dashboard.

## Manage Adaptive Groups with the API

Adaptive Groups use the same API endpoints as standard groups for all actions, but they use additional request fields for Adaptive Group settings.

### Create an Adaptive Group

Adaptive Groups are created using the same `POST` [`/groups` endpoint](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/..#create-a-new-group) used for standard groups. A group will be stored as an Adaptive Group when the `settings` field is included in the request body.

`settings` **object definition:**

```
interface IGroupSettings {
match: 'AND' | 'OR';
conditions: IGroupCondition[];
}
```

`match: 'AND' | 'OR'` *required* - Determines which `conditions` (detailed below) must be met for a subscriber to be added to a group:

* `AND` - A subscriber needs to meet *all* conditions.
* `OR` - A subscriber needs to meet *any* condition.

In the platform dashboard, this is shown as "All conditions" (`AND`) and "Any condition" (`OR`) when creating or editing an Adaptive Group.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FoGMZKMU3sVgC7yIs6N5e%2FScreen%20Shot%202025-06-24%20at%203.16.01%20PM.png?alt=media&#x26;token=1300d8fd-94d0-4b3a-9a87-cfb8e83ab3af" alt=""><figcaption><p>How the match field is selected in the platform dashboard</p></figcaption></figure>

`conditions: IGroupCondition[]` *required* - Contains the rules or conditions of an Adaptive Group.

<pre><code>type IGroupCondition = {
    type: string;
    conditionAttribute: string;
    conditionOperator: IGroupOperator;
<strong>    conditionValue: (string | number)[];
</strong>};
</code></pre>

See below for details on the subfields:

* `type: string` *required* - Identifies the data type of the attribute referenced in the rule. For preset attributes, the types are as follows:
  * First Name: `"string"`
  * Last Name: `"string"`
  * Phone Number: `"number"`
  * Email: `"string"`
  * Opt-In Source: `"number"` - Set of [hardcoded values that map to IDs](#opt-in-source-ids)
  * Join Date: `"date"`
  * Clicked Link: `"number"` - The numeric ID corresponding to the desired short link.
  * Groups: `"number"` - The numeric ID corresponding to the desired group.
* `conditionAttribute: string` *required* - Defines the field that will be checked when the Adaptive Group rules are evaluated. The preset attributes are as follows:
  * ```
    enum IGroupConditionAttribute { 
        FIRST_NAME = 'firstName', 
        LAST_NAME = 'lastName',
        EMAIL = 'email', 
        PHONE_NUMBER = 'number', 
        JOIN_DATE = 'date', 
        SIGN_UP_METHOD = 'signUpMethod', 
        CLICKED_LINK = 'linkClickTracking', 
        CUSTOM_FIELD = 'custom-' 
    } 
    ```

{% hint style="info" %}
*You can use `CUSTOM_FIELD` to reference* [*Custom Subscriber Attributes*](https://developers.mobile-text-alerts.com/tutorials/custom-subscriber-attributes) *that have been created on your account. For the value, use the custom field ID to reference the specific field as follows: `'custom-<customFieldId>'`. Call the* [*GET /custom-fields endpoint*](https://developers.mobile-text-alerts.com/custom-subscriber-attributes#get-custom-fields) *to retrieve the `customFieldId` values for attributes on your account.*

*Note that the type of this field must match the type of the specific custom attribute.*
{% endhint %}

* `conditionOperator: string enum` *required* - This comparison expression determines how the attribute is compared to the chosen value. This must be one of the following `enum` values:

  ```ts
  enum IGroupOperator {
    EQUALS = 'equals',
    NOT_EQUALS = 'not equals',
    CONTAINS = 'contains',
    STARTS_WITH = 'starts with',
    ENDS_WITH = 'ends with',
    GREATER_THAN = 'greater than',
    LESS_THAN = 'less than',
    IS_EMPTY = 'is empty',
    IS_NOT_EMPTY = 'is not empty',
    BETWEEN = 'between',
    NOT_BETWEEN = 'not between',
    IS_TRUE = 'is checked',
    IS_FALSE = 'is not checked',
  }
  ```
* `conditionValue: (string | number)[]` *required* - This is the value that the subscriber attribute will be compared against. The type of this value must match the type listed in the `type` field.

{% hint style="info" %}

#### Optional Advanced Settings

The `settings` field can also contain optional fields `conditionSubOperator` and `conditionSubValue`. These fields add an additional layer of comparison and complexity. They are recommended only for advanced users.
{% endhint %}

<details>

<summary>List of Opt-In Source IDs</summary>

```
OPT_IN_MESSAGE = 1,
SIGN_UP_FORM = 2,
CONTROL_PANEL = 3,
SPREADSHEET_IMPORT = 4,
API = 5,
ACTIVE_DIRECTORY_SYNC = 6,
BLESS_IMPORT = 7,
CONSTANT_CONTACT = 8,
SONLET_SYNC = 9,
THIRD_PARTY_SYNC = 9,
BLESS_REGISTRATION = 10,
MANUAL_ENTRY = 11,
ZIPWHIP_SYNC = 12,
OPT_IN_WEB_BANNER = 13,
ZAPIER_SYNC = 14,
SHOPIFY_SYNC = 15,
HUBSPOT_SYNC = 16,
KEYWORD = 17,
QR_CODE = 18,
WEBINAR_IMPORT = 19
```

</details>

#### Example `settings` configuration for an Adaptive Group

Let's create an Adaptive Group with two conditions. If a subscriber meets either condition, they will be added to the group.

If a subscriber matches any of these conditions, they will be added to the group, so `match: "OR"`.

* **Join Date is between 06/01/2025 to 06/30/2025**
  * The following shows how this would be mapped to fields:
    * `"type": "date"` - The Join Date field uses the type `"date"`.
    * `"conditionAttribute": "date"` - The Attribute Name for Join Date is just `"date"`.
    * `"conditionOperator": "between"` - The comparison being configured is **between** two dates.
    * `"conditionValue": ["2025-06-01 04:00", "2025-06-30 04:00"]` - The start and end range of the "between" comparison are provided as an array with two date strings.
* **Email ends with "@yourorg.com"**
  * The following shows how this would be mapped to fields:
    * `"type":"string"` - The Email field uses the type `"string"`.
    * `"conditionAttribute":"email"` - The Attribute Name for Email is `"email"`.
    * `"conditionOperator":"ends with"` - Here we want to look for matching domains of the email address, so `"ends with"` is used.
    * `"conditionValue":["@yourorg.com"]` - The string value that the subscriber email will be compared against to see if it matches `"ends with"`.

Below shows how this is displayed in the platform dashboard:

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FcUl3y6zu5GsVbb8ynSBS%2FScreen%20Shot%202025-06-25%20at%204.58.46%20PM.png?alt=media&#x26;token=6b8be9e6-1610-4252-a155-e4d9e968d563" alt=""><figcaption><p>Example Adaptive Group conditions shown in the platform dashboard</p></figcaption></figure>

Complete `settings` configuration for this example:

```json
"settings":
    {"match":"OR",
    "conditions": [
        {"type":"date",
        "conditionAttribute":"date",
        "conditionOperator":"between",
        "conditionValue":["2025-06-01 04:00","2025-06-30 04:00"]},
        
        {"type":"string",
        "conditionAttribute":"email",
        "conditionOperator":"ends with",
        "conditionValue":["@yourorg.com"]}
        ]
    }
```

See [Create Group](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/..#create-a-new-group) to learn more about this endpoint.

### Update an Adaptive Group

The `settings` field that contains the conditions for an Adaptive Group can be updated at any time by calling the <mark style="color:purple;">`PATCH`</mark> [`/groups/{groupId}`](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/..#update-groups) endpoint with the identifying `{groupId}` of the group to be updated.

### List Adaptive Groups

By default, Adaptive Groups are **not** listed when calling the `GET` [`/groups`](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/..#list-all-groups) endpoint. To include Adaptive Groups, add the optional query parameter `filters[includeAdaptive]`.

#### Example query with Adaptive Groups included:

*(Note: the `[]` brackets are escaped characters in the cURL request.)*

{% code overflow="wrap" %}

```
curl --location 'https://api.mobile-text-alerts.com/v3/groups?filters%5BincludeAdaptive%5D=true' \
  --header 'Authorization: Bearer 3068eebf-7661-5458-830e-65cd055a0b03'
```

{% endcode %}


# Groups Bulk Add/Delete Subscribers

Bulk endpoints can be used to add or delete up to 1,000 subscriber records in a group in a single request.

## Bulk Add Subscribers to Group

The <mark style="color:orange;">`POST`</mark> [`groups/{groupId}/subscribers/bulk-create`](#post-groups-groupid-subscribers-bulk-create) endpoint can be used to add up to 1,000 subscribers to a single group in a single request.&#x20;

When adding subscribers to a group you will need the `subscriberId`  of each of the subscribers to add and the `groupId` of the group that these subscribers will be added to. The `subscriberIds` parameter in the body of the request accepts an array of `subscriberId` values, while the `groupId` is specified as a path parameter.&#x20;

#### Example Request

In the below example we are adding `subscriberId` :`108767117` and `108767118`  to `groupId`: `187561` .

```json
curl -L \
  --request POST \
  --url 'https://api.mobile-text-alerts.com/v3/groups/187561/subscribers/bulk-create' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
  --header 'Content-Type: application/json' \
  --data '{
    "subscriberIds": [
      108767117,
      108767118
    ]
  }'
```

**Successful response:**  `{"message":"Added 2 subscribers to group 187561."`

## Bulk Add Subscribers To Group

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`5\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkCreateGroupMembers.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"BulkCreateGroupMembers.Request":{"type":"object","properties":{"subscriberIds":{"type":"array","items":{"type":"number"}}},"required":["subscriberIds"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers/bulk-create":{"post":{"tags":["Groups"],"summary":"Bulk Add Subscribers To Group","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `5` requests every `15` seconds","operationId":"groups_bulk_create_group_members","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateGroupMembers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateGroupMembers.Request"}}},"required":true}}}}}
```

## Bulk Remove Subscribers from Group

The <mark style="color:orange;">`POST`</mark> [`groups/{groupId}/subscribers/bulk-delete`](#post-groups-groupid-subscribers-bulk-delete) endpoint can be used to remove up to 1,000 subscribers from a single group in a single request.&#x20;

When removing subscribers from a group you will need the `subscriberId`  of each of the subscribers to be removed and the `groupId`  of the group that these subscribers will be deleted from. The `subscriberIds` parameter in the body of the request accepts an array of `subscriberId` values, while the `groupId` is specified as a path parameter.&#x20;

#### Example Request

In the below example we are removing `subscriberId` :`108767117` and `108767118`  from `groupId`: `187561` .

```json
curl -L \
  --request POST \
  --url 'https://api.mobile-text-alerts.com/v3/groups/{groupId}/subscribers/bulk-delete' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
  --header 'Content-Type: application/json' \
  --data '{
    "subscriberIds": [
      108767117,
      108767118
    ]
  }'
```

**Successful response:** `{"message": "Removed 2 subscribers from group 187561."}`

## Bulk Remove Subscribers from Group

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`5\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkDeleteGroupMembers.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"BulkCreateGroupMembers.Request":{"type":"object","properties":{"subscriberIds":{"type":"array","items":{"type":"number"}}},"required":["subscriberIds"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers/bulk-delete":{"post":{"tags":["Groups"],"summary":"Bulk Remove Subscribers from Group","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `5` requests every `15` seconds","operationId":"groups_bulk_delete_group_members","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteGroupMembers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateGroupMembers.Request"}}},"required":true}}}}}
```


# Bulk Create/Update Subscribers

Learn how to use the bulk subscriber endpoints, useful for large scale subscriber updates.

When creating or updating many subscribers at one time with the [Create Subscriber](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/..#create-subscriber-api-endpoint) and [Update Subscriber ](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/..#update-subscriber-api-endpoint)endpoints you can quickly exhaust the available [rate limit](https://developers.mobile-text-alerts.com/api-basics/rate-limits). The [Bulk Create Subscribers](#bulk-create-subscribers) and [Bulk Update Subscribers](#bulk-update-subscribers) endpoints are recommended for handling large subscriber changes via the API, this can save on both request round trip time and overall API call volume.

## Bulk Create Subscribers

This endpoint is used to create (or update and create) many subscriber accounts in one request.

### `CreateOnly` Parameter

If set to `true` the `createOnly` path parameter indicates the only action should be to create new subscribers and will not update records of existing subscribers. If set to `false` then both creating or updating (if the subscriber exists) actions will be performed.

### Subscriber Request Body

Records of subscribers should be in an array.&#x20;

*Required Fields for new subscribers:* `email` *or* `number`

<table><thead><tr><th width="186.5">Name</th><th width="170.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>firstName</code></td><td><code>string</code></td><td>First name of the subscriber.</td></tr><tr><td><code>lastName</code></td><td><code>string</code></td><td>Last name of the subscriber.</td></tr><tr><td><code>number</code><em>(required if no email)</em></td><td><code>number</code>/<code>string</code></td><td>Phone number of the subscriber. <a href="../../phone-number-format-guide#recommended-format-e.164">E.164 formatted strings are recommended to avoid confusion.</a></td></tr><tr><td><code>email</code> <em>(required if no number)</em></td><td><code>string</code></td><td>Email address of the subscriber.</td></tr><tr><td><code>e164Number</code></td><td><code>string</code></td><td><p><a href="../../phone-number-format-guide#e.164-numbering-plan-format">E.164 international telephone number</a> of the subscriber. If supplied, will be used over <code>number</code> .</p><p></p><p><em>E.164 Format:</em> </p><p>[+] [country code] [subscriber number including area code] (max. 15 digits)</p></td></tr><tr><td><code>groupIds</code></td><td><code>number[]</code></td><td>List of group ids of the groups the subscriber belongs to.</td></tr><tr><td><code>subscriberFields</code></td><td><code>dictionary</code>: <code>subscriberFieldIds:string</code> as the keys and <code>data: string</code> corresponding values</td><td><p>A dictionary of key value pairs of additional <a href="assign-custom-subscriber-attributes">custom subscriber attributes</a> for the subscriber.</p><p></p><p><em>Example:</em> </p><pre class="language-curl"><code class="lang-curl">"subscriberFields": {
<strong>    "2000": "January 1st, 2000",
</strong><strong>    "2001": "Custom Field Data"
</strong>}
</code></pre></td></tr></tbody></table>

## Bulk Create Subscribers

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request. Records of subscribers should be in an array. The \`createOnly\` field indicates if the action is creating new subscribers only (doesn't accept records of existing subscribers) or the action is creating or updating (accept records of existing subscribers and update info according to the records).\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkCreateSubscribers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"totalRecordCount":{"type":"number"},"createdRecordCount":{"type":"number"},"errorRecordCount":{"type":"number"},"createdRecords":{"type":"array","items":{"$ref":"#/components/schemas/IPublicNumber"}},"errorRecords":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateSubscriber.Request"},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}],"description":"BulkCreateSubscribers.ErrorRecord"}}},"required":["totalRecordCount","createdRecordCount","errorRecordCount","createdRecords","errorRecords"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"CreateSubscriber.Request":{"$ref":"#/components/schemas/INewNumber"},"INewNumber":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"e164Number":{"type":"string"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":[]},"BulkCreateSubscribers.Request":{"type":"array","items":{"$ref":"#/components/schemas/CreateSubscriber.Request"}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/bulk":{"post":{"tags":["Subscribers"],"summary":"Bulk Create Subscribers","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request. Records of subscribers should be in an array. The `createOnly` field indicates if the action is creating new subscribers only (doesn't accept records of existing subscribers) or the action is creating or updating (accept records of existing subscribers and update info according to the records).\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_bulk_create_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubscribers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubscribers.Request"}}},"required":true},"parameters":[{"name":"createOnly","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```

## Bulk Update Subscribers

This endpoint is used to update many subscriber accounts in one request. The `number` field is used to identify the subscriber record to be updated , if no `number` is provided then  `email` will be used an identifier. One of these fields must be provided to identify the subscriber record to be updated.&#x20;

### Subscriber Request Body

Records of subscribers should be in an array.&#x20;

<table><thead><tr><th width="186.5">Name</th><th width="170.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>firstName</code></td><td><code>string</code></td><td>First name of the subscriber.</td></tr><tr><td><code>lastName</code></td><td><code>string</code></td><td>Last name of the subscriber.</td></tr><tr><td><code>number</code></td><td><code>number</code></td><td>Phone number of the subscriber. <a href="../../phone-number-format-guide#recommended-format-e.164">E.164 formatted strings are recommended to avoid confusion.</a></td></tr><tr><td><code>email</code> </td><td><code>string</code></td><td>Email address of the subscriber.</td></tr><tr><td><code>e164Number</code></td><td><code>string</code></td><td><p><a href="../../phone-number-format-guide#e.164-numbering-plan-format">E.164 international telephone number of the subscriber.</a> If supplied, will be used over <code>number</code> .</p><p></p><p><em>E.164 Format:</em> </p><p>[+] [country code] [subscriber number including area code] (max. 15 digits)</p></td></tr><tr><td><code>groupIds</code></td><td><code>number[]</code></td><td>List of group ids of the groups the subscriber belongs to.</td></tr><tr><td><code>subscriberFields</code></td><td><code>dictionary</code>: <code>subscriberFieldIds:string</code> as the keys and <code>data: string</code> corresponding values</td><td><p>A dictionary of key value pairs of additional <a href="assign-custom-subscriber-attributes">custom subscriber attributes</a> for the subscriber.</p><p></p><p><em>Example:</em> </p><pre class="language-curl"><code class="lang-curl">"subscriberFields": {
<strong>    "2000": "January 1st, 2000",
</strong><strong>    "2001": "Custom Field Data"
</strong>}
</code></pre></td></tr></tbody></table>

## Bulk Update Subscribers

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkUpdateSubscribers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"totalRecordCount":{"type":"number"},"updatedRecordCount":{"type":"number"},"errorRecordCount":{"type":"number"},"updatedRecords":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseResponseDataType"},{"type":"object","properties":{"id":{"type":"number"}},"required":["id"]}],"description":"BulkUpdateSubscribers.ResponseDataWithId"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseResponseDataType"},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}],"description":"BulkUpdateSubscribers.ResponseDataWithPhoneNumber"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseResponseDataType"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}],"description":"BulkUpdateSubscribers.ResponseDataWithEmail"}],"description":"BulkUpdateSubscribers.ResponseRecord"}},"errorRecords":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"BulkUpdateSubscribers.BaseErrorDataType"},{"type":"object","properties":{"id":{"type":"number"}},"required":["id"]}],"description":"BulkUpdateSubscribers.ErrorDataWithId"},{"allOf":[{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"BulkUpdateSubscribers.BaseErrorDataType"},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}],"description":"BulkUpdateSubscribers.ErrorDataWithPhoneNumber"},{"allOf":[{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"BulkUpdateSubscribers.BaseErrorDataType"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}],"description":"BulkUpdateSubscribers.ErrorDataWithEmail"}],"description":"BulkUpdateSubscribers.ErrorRecord"}}},"required":["totalRecordCount","updatedRecordCount","errorRecordCount","updatedRecords","errorRecords"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"BulkUpdateSubscribers.Request":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/UpdateSubscriber.Request"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseRequest"},{"type":"object","properties":{"id":{"type":"number"}},"required":["id"]}],"description":"BulkUpdateSubscribers.RequestWithId"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/UpdateSubscriber.Request"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseRequest"},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}],"description":"BulkUpdateSubscribers.RequestWithPhoneNumber"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/UpdateSubscriber.Request"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseRequest"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}],"description":"BulkUpdateSubscribers.RequestWithEmail"}],"description":"BulkUpdateSubscribers.RequestRecord"}},"UpdateSubscriber.Request":{"$ref":"#/components/schemas/CreateSubscriber.Request"},"CreateSubscriber.Request":{"$ref":"#/components/schemas/INewNumber"},"INewNumber":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"e164Number":{"type":"string"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/bulk":{"patch":{"tags":["Subscribers"],"summary":"Bulk Update Subscribers","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_bulk_update_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateSubscribers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateSubscribers.Request"}}},"required":true}}}}}
```


# Custom Subscriber Attributes

Learn how to create Custom Subscriber Attributes to store additional data fields for your subscribers.

Subscriber data is stored with predefined subscriber attributes such as First Name, Last Name, Email, etc. You can create your own fields to store any additional types of data for your subscribers. These Custom Subscriber Attributes can help you organize subscribers to create send lists, build groups, and more.

You can add/update/delete your account's Custom Subscriber Attributes in the [platform dashboard](https://platform.mobile-text-alerts.com/subscribers/attributes) or with the [Mobile Text Alerts API Custom Fields endpoints](https://developers.mobile-text-alerts.com/api-reference/custom-fields).

The image below shows how custom attributes appear in the platform dashboard. See [#manage-custom-subscriber-attributes-in-the-dashboard](https://developers.mobile-text-alerts.com/manage-subscribers/assign-custom-subscriber-attributes#manage-custom-subscriber-attributes-in-the-dashboard "mention") to learn more.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2FAEyxLl5F3dOH3uQanmGD%2FPlatformManageAttributes.png?alt=media&#x26;token=5154404a-4253-4b7b-aefa-755cb3d26df9" alt=""><figcaption></figcaption></figure>

## Manage Custom Subscriber Attributes with the API

In the Mobile Text Alerts API, all endpoints for Custom Subscriber Attributes are located under `/custom-fields`. Custom Fields is the previous name for what is now called Custom Subscriber Attributes.

**Available API actions:**

* [#create-a-new-custom-subscriber-attribute](#create-a-new-custom-subscriber-attribute "mention")
* [#list-all-custom-subscriber-attributes](#list-all-custom-subscriber-attributes "mention")
* [#update-a-custom-subscriber-attribute](#update-a-custom-subscriber-attribute "mention")
* [#delete-a-custom-subscriber-attribute](#delete-a-custom-subscriber-attribute "mention")
* [#get-a-custom-subscriber-attribute](#get-a-custom-subscriber-attribute "mention")

### Create a new Custom Subscriber Attribute

A new Custom Subscriber Attribute can be created for your account by calling the [#post-custom-fields](https://developers.mobile-text-alerts.com/api-reference/custom-fields#post-custom-fields "mention") endpoint.

**Request Body**

<table><thead><tr><th width="142">Name</th><th width="129.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code> </td><td><code>string</code></td><td>The name of the attribute.</td></tr><tr><td><code>type</code></td><td><code>string enum</code></td><td><p>The data type of the attribute, one of the following:</p><ul><li><code>string</code> </li><li><code>number</code></li><li><code>date</code> (the date format must be specified in the <code>format</code> field)</li><li><code>boolean</code> (used for check boxes)</li><li><code>select</code> (you will need to list the options in the <code>options[]</code> field)</li><li><code>address</code></li><li><code>multi-select</code> (you will need to list the options in the <code>options[]</code> field)</li></ul></td></tr><tr><td><code>options[]</code></td><td><code>string[]</code></td><td>For <code>select</code> or <code>multi-select</code> , the list of possible <code>string</code> values are listed here.</td></tr><tr><td><code>format</code></td><td><code>string enum</code></td><td><p>Determines the format of the <code>date</code> .</p><p>One of the following:</p><p><code>Month D, YYYY</code> , <code>MM/DD/YYYY</code>, <code>DD/MM/YYYY</code></p></td></tr></tbody></table>

### List all Custom Subscriber Attributes

See all Custom Subscriber Attributes that have been created on your account by calling the [#get-custom-fields](https://developers.mobile-text-alerts.com/api-reference/custom-fields#get-custom-fields "mention") endpoint.

{% hint style="info" %}
This endpoint returns an `id` field for each attribute. Use it as the `customFieldId` in other requests to `/custom-fields` endpoints.
{% endhint %}

**Rate Limit**

This endpoint overrides the [general rate limit](https://developers.mobile-text-alerts.com/api-basics/rate-limits#general-rate-limit) with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests per `15` seconds.

#### **Example Request**

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/custom-fields' \
  --header 'Authorization: Bearer 6078eebf-7661-5458-330e-74cd055a0b08'
```

### Update a Custom Subscriber Attribute

You can make changes to existing Custom Subscriber Attributes that have been created on your account by calling the [#patch-custom-fields-customfieldid](https://developers.mobile-text-alerts.com/api-reference/custom-fields#patch-custom-fields-customfieldid "mention") endpoint with the identifying `{customFieldId}` of the attribute to be updated as a path parameter.

**Request Body**

<table><thead><tr><th width="142">Name</th><th width="129.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code> </td><td><code>string</code></td><td>The name of the attribute.</td></tr><tr><td><code>type</code></td><td><code>string enum</code></td><td><p>The data type of the attribute, one of the following:</p><ul><li><code>string</code> </li><li><code>number</code></li><li><code>date</code> (the date format must be specified in the <code>format</code> field)</li><li><code>boolean</code> (used for check boxes)</li><li><code>select</code> (you will need to list the options in the <code>options[]</code> field)</li><li><code>address</code></li><li><code>multi-select</code> (you will need to list the options in the <code>options[]</code> field)</li></ul></td></tr><tr><td><code>options[]</code></td><td><code>string[]</code></td><td>For <code>select</code> or <code>multi-select</code> , the list of possible <code>string</code> values are listed here.</td></tr><tr><td><code>format</code></td><td><code>string enum</code></td><td><p>Determines the format of the <code>date</code> .</p><p>One of the following:</p><p><code>Month D, YYYY</code> , <code>MM/DD/YYYY</code>, <code>DD/MM/YYYY</code></p></td></tr></tbody></table>

#### Example Request

In the below example, update `customFieldId`: `7769` with a new name.

```bash
curl -L \
  --request PATCH \
  --url 'https://api.mobile-text-alerts.com/v3/custom-fields/7769' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "New Name"
  }'
```

### Delete a Custom Subscriber Attribute

Custom Subscriber Attributes can be deleted  by calling the [#delete-custom-fields-customfieldid](https://developers.mobile-text-alerts.com/api-reference/custom-fields#delete-custom-fields-customfieldid "mention") endpoint. This request does not require a request body. Simply include the `{customFieldId}` of the attribute to be deleted as a path parameter with your request.

#### Example Request

In the below example, deleting attribute with `id: 7769`:

```bash
curl --request DELETE --location 'https://api.mobile-text-alerts.com/v3/custom-fields/7769' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03'
```

### Get a Custom Subscriber Attribute

List data for a specific Custom Subscriber Attribute with the [#get-custom-fields-customfieldid](https://developers.mobile-text-alerts.com/api-reference/custom-fields#get-custom-fields-customfieldid "mention") endpoint. Include the `{customFieldId}` of the attribute to be retrieved as a path parameter.

#### Example Request

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/custom-fields/7769' \
  --header 'Authorization: Bearer 3098eebf-7661-5858-890e-65cd054a0b03'
```

**Example Response** (for a `date` type attribute)

{% code overflow="wrap" %}

```json
{
  "data": {
    "id": 7769,
    "accountId": 1195226,
    "name": "Birthday",
    "type": "date",
    "options": [],
    "format": "MM/DD/YYYY",
    "created": "2025-07-17T20:51:34.000Z"
  }
}
```

{% endcode %}

## Use Custom Subscriber Attributes

Once you have created Custom Subscriber Attributes on your account, you can start adding custom data to your subscribers. See [assign-custom-subscriber-attributes](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/assign-custom-subscriber-attributes "mention") to learn how to add and edit these attributes for your individual subscribers.

After you have these attributes assigned to your subscribers, you can use Custom Subscriber Attributes as a condition attribute for your [adaptive-groups](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers/adaptive-groups "mention").


# Webhooks

View the expected webhook event payloads to your custom-defined endpoints

Here you can see the data sent in notification requests to your customer-provided endpoints. The only requirement for a customer-defined endpoint is that it responds with a <mark style="color:green;">`200`</mark> HTTP status code.

Webhooks must first be registered, see [setting-up-your-first-webhook](https://developers.mobile-text-alerts.com/tutorials/webhooks/setting-up-your-first-webhook "mention") to learn more.

<a href="../api-reference/webhooks" class="button primary" data-icon="webhook">Webhooks API Reference</a>

## Webhooks Event Payloads

{% hint style="info" %}
**Optional Fields**

Some fields may not always be included in the webhook payload. These are indicated with: **\***. These fields may be missing from the payload or have a `NULL` value.

All other fields below are always expected in the webhook payload.
{% endhint %}

The payloads documented below describe the data sent to the endpoints you (as a Mobile Text Alerts customer) must implement to successfully receive notifications.

**Versions**

Our latest webhook version is V3. If you haven't specifically requested an earlier version, you will receive the V3 payloads. Previous versions (V1, V2) are also included below.

**Formats**\
Dynamic fields may also include the following format specifications:

* `phone_national` - A phone number in the national format. (*Ex:* `5555555555`)
* `phone_e164` - A phone number in E.164 format. (*Ex:* `[+] [country code] [subscriber number including area code]`, max 15 digits)
* `enum` - A field with a pre-defined list of values.
* `date` - A date string. The timezone and format are specified.

**Tags**

Many of the payloads below include an optional `tags` field. This is an object of tags provided by the customer when the message was sent.

*Example:*

```json
{
  "tags": {
    "key": "value"
  }
}
```

### Delivery Status

<details>

<summary>V1 Delivery Status Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>destinationNumber</code></td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>messageId</code></td><td><code>number</code></td><td>The MTA internal id of the outbound message.</td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The id provided by the customer when the message was sent.</td></tr><tr><td><code>status</code></td><td><code>MTADeliveryStatus</code></td><td>The delivery status. See <a href="#mta-delivery-status-codes">MTA Delivery Status Codes</a>.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer when the message was sent.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.DELIVERY_STATUS</code></td><td>The webhook event type, identifying it as delivery status.</td></tr></tbody></table>

</details>

<details>

<summary>V2 Delivery Status Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>destinationNumber</code></td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>messageId</code></td><td><code>number</code></td><td>The MTA internal id of the outbound message.</td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The id provided by the customer when the message was sent.</td></tr><tr><td><code>status</code></td><td><code>MTADeliveryStatus</code></td><td>The delivery status. See <a href="#mta-delivery-status-codes">MTA Delivery Status Codes</a>.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer when the message was sent.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.DELIVERY_STATUS</code></td><td>The webhook event type, identifying it as delivery status.</td></tr></tbody></table>

</details>

<details>

<summary>V3 Delivery Status Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>fromNumber</code> *</td><td><code>string</code> |<code>phone_e164</code></td><td>The number that the message was sent from.</td></tr><tr><td><code>toNumber</code></td><td><code>string</code> |<code>phone_e164</code></td><td>The number the message was sent to.</td></tr><tr><td><code>messageId</code></td><td><code>string</code></td><td>The MTA internal id of the outbound message.</td></tr><tr><td><code>externalId</code> *</td><td><code>string</code></td><td>The id provided by the customer when the message was sent.</td></tr><tr><td><code>timestamp</code></td><td><code>string</code> | <code>date:UTC:ISO-8601</code></td><td>A date string. The timezone and format are specified.</td></tr><tr><td><code>status</code></td><td><code>number</code> |<code>MTADeliveryStatus</code></td><td>The delivery status code. See <a href="#mta-delivery-status-codes">MTA Delivery Status Codes</a>.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer when the message was sent.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTADeliveryStatus</code></td><td>The webhook event type, identifying it as delivery status.</td></tr></tbody></table>

</details>

#### Mobile Text Alerts Delivery Status Codes

One of the fields in the delivery-status webhook is `status`. It returns a code associated with the following statuses:

{% code overflow="wrap" %}

```
QUEUED = 1,
SENDING = 2,
SENT = 3, // provider sent to carrier
DELIVERED = 4,
SENDING_FAILED = 5, // something failed on the provider end
DELIVERY_FAILED = 6, // sent to carrier, but failed to deliver
DELIVERY_UNCONFIRMED = 7, // no response from carrier
DELIVERY_REJECTED = 8, // blocked by carrier
UNDELIVERED = 9, // handset is turned off, out of coverage, or something else of that nature
INVALID_NUMBER = 10,
STOPPED_NUMBER = 11,
LANDLINE = 12,
SEND_REJECTED = 13, // blocked by provider
QUEUEING_FAILED = 14 // carrier failed to acknowledge message
```

{% endcode %}

### Message Reply

<details>

<summary>V1 Message Reply Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>originationNumber</code></td><td><code>string</code></td><td>The number that the inbound message was sent from.</td></tr><tr><td><code>destinationNumber</code></td><td><code>number</code></td><td>The number that the inbound message was sent to.</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the inbound message.</td></tr><tr><td><code>messageId</code></td><td><code>number</code></td><td>The internal MTA id for the inbound message.</td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The customer provided id from the last outbound message sent to the origination number.</td></tr><tr><td><code>previousMessageId</code></td><td><code>string</code></td><td>The internal MTA id for the last interaction with the outbound number. This could be an outbound id or an inbound id, whichever happened last.</td></tr><tr><td><code>isOptOutMessage</code></td><td><code>boolean</code></td><td>If <code>true</code>, indicates the inbound message is considered an opt-out request.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer from the last outbound message sent to the origination number.</td></tr><tr><td><code>url</code> *</td><td><code>string</code></td><td>The URL of the message, if it was an MMS and had an image attached.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.MESSAGE_REPLY</code></td><td>The webhook event type, identifying it as message reply.</td></tr></tbody></table>

</details>

<details>

<summary>V2 Message Reply Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>originationNumber</code></td><td><code>string</code></td><td>The number that the inbound message was sent from.</td></tr><tr><td><code>destinationNumber</code></td><td><code>string</code></td><td>The number that the inbound message was sent to.</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the inbound message.</td></tr><tr><td><code>messageId</code></td><td><code>number</code></td><td>The internal MTA id for the inbound message.</td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The customer provided id from the last outbound message sent to the origination number.</td></tr><tr><td><code>previousMessageId</code></td><td><code>string</code></td><td>The internal MTA id for the last interaction with the outbound number. This could be an outbound id or an inbound id, whichever happened last.</td></tr><tr><td><code>isOptOutMessage</code></td><td><code>boolean</code></td><td>If <code>true</code>, indicates the inbound message is considered an opt-out request.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer from the last outbound message sent to the origination number.</td></tr><tr><td><code>url</code> *</td><td><code>string</code></td><td>The URL of the message, if it was an MMS and had an image attached.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.MESSAGE_REPLY</code></td><td>The webhook event type, identifying it as message reply.</td></tr></tbody></table>

</details>

<details>

<summary>V3 Message Reply Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>fromNumber</code></td><td><code>string</code> |<code>phone_e164</code></td><td>The number that the inbound message was sent from.</td></tr><tr><td><code>toNumber</code> *</td><td><code>string</code> |<code>phone_e164</code></td><td>The number that the inbound message was sent to.</td></tr><tr><td><code>replyId</code></td><td><code>string</code></td><td>The MTA internal id of the message reply.</td></tr><tr><td><code>externalId</code> *</td><td><code>string</code></td><td>The customer provided id from the last outbound message sent to the origination number.</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the inbound message.</td></tr><tr><td><code>messageId</code> *</td><td><code>number</code></td><td>The internal MTA id for the inbound message.</td></tr><tr><td><code>url</code> *</td><td><code>string</code></td><td>The URL of the message, if it was an MMS and had an image attached.</td></tr><tr><td><code>timestamp</code></td><td><code>string</code> | <code>date:UTC:ISO-8601</code></td><td>A date string. The timezone and format are specified.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer from the last outbound message sent to the origination number.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr></tbody></table>

</details>

### Message Send

<details>

<summary>V1 Message Send Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="179.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>destinationNumber</code></td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>messageId</code></td><td><code>string</code> | <code>number</code></td><td>The MTA internal id of the outbound message.</td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The id provided by the customer when the message was sent.</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the outbound message.</td></tr><tr><td><code>url</code></td><td><code>string</code></td><td>The URL of the message, if it was an MMS and had an image attached.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer when the message was sent.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.MESSAGE_SEND</code></td><td>The webhook event type, identifying it as message send.</td></tr></tbody></table>

</details>

<details>

<summary>V2 Message Send Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>destinationNumber</code></td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>messageId</code></td><td><code>number</code></td><td>The MTA internal id of the outbound message.</td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The id provided by the customer when the message was sent.</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the outbound message.</td></tr><tr><td><code>url</code></td><td><code>string</code></td><td>The URL of the message, if it was an MMS and had an image attached.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer when the message was sent.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.MESSAGE_SEND</code></td><td>The webhook event type, identifying it as message send.</td></tr></tbody></table>

</details>

<details>

<summary>V3 Message Send Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>fromNumber</code> *</td><td><code>string</code> |<code>phone_e164</code></td><td>The number that the message was sent from.</td></tr><tr><td><code>toNumber</code></td><td><code>string</code> |<code>phone_e164</code></td><td>The number the message was sent to.</td></tr><tr><td><code>messageId</code></td><td><code>string</code></td><td>The MTA internal id of the outbound message.</td></tr><tr><td><code>externalId</code> *</td><td><code>string</code></td><td>The id provided by the customer when the message was sent.</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>The content of the outbound message.</td></tr><tr><td><code>url</code> *</td><td><code>string</code></td><td>The URL of the message, if it was an MMS and had an image attached.</td></tr><tr><td><code>timestamp</code></td><td><code>string</code> | <code>date:UTC:ISO-8601</code></td><td>A date string. The timezone and format are specified.</td></tr><tr><td><code>tags</code> *</td><td><code>&#x3C;string, string></code></td><td>An object of any tags provided by the customer when the message was sent.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr></tbody></table>

</details>

### Number Opt-In

<details>

<summary>V1 Number Opt-In Payload</summary>

<table><thead><tr><th width="190">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>originationNumber</code></td><td><code>string</code></td><td>The number the message was sent from.</td></tr><tr><td><code>destinationNumber</code></td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>optInType</code></td><td><code>enum</code> <code>NumberOptInType</code></td><td>Identifies how the method used to opt-in, see <a href="#number-opt-in-types">Number Opt-In Types</a>.</td></tr><tr><td><code>type</code></td><td><code>type: MTAWebhook.NUMBER_OPT_IN</code></td><td>The webhook event type, identifying it as number opt-in.</td></tr></tbody></table>

</details>

<details>

<summary>V2 Number Opt-In Payload</summary>

<table><thead><tr><th width="189.5">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>originationNumber</code></td><td><code>string</code></td><td>The number the message was sent from.</td></tr><tr><td><code>destinationNumber</code> *</td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>optInType</code></td><td><code>enum</code> <code>NumberOptInType</code></td><td>Identifies how the method used to opt-in, see <a href="#number-opt-in-types">Number Opt-In Types</a>.</td></tr><tr><td><code>type</code></td><td><code>MTAWebhook.NUMBER_OPT_IN</code></td><td>The webhook event type, identifying it as number opt-in.</td></tr></tbody></table>

</details>

<details>

<summary>V3 Number Opt-In Payload</summary>

<table><thead><tr><th width="189.5">Field</th><th width="180">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>fromNumber</code></td><td><code>string</code></td><td>The number the message was sent from.</td></tr><tr><td><code>toNumber</code> *</td><td><code>string</code></td><td>The number the message was sent to.</td></tr><tr><td><code>senderName</code> *</td><td><code>string</code></td><td>The sender name used to pre-populate the "To:" field for iMessages.</td></tr><tr><td><code>type</code></td><td><code>enum NumberOptInType</code></td><td>The webhook event type, identifying it as number opt-in.</td></tr><tr><td><code>timestamp</code></td><td><code>string</code> | <code>date:UTC:ISO-8601</code></td><td>A date string. The timezone and format are specified.</td></tr></tbody></table>

</details>

#### Number Opt-In Types

One of the fields in the number opt-in webhook is `optInType`. It returns one of the following values, which indicates the method used to opt in:

```
enum NumberOptInType {
    SMS = 'sms',
    EMAIL = 'email',
    IMessage = 'imessage',
    RCS = 'rcs',
}
```


# Setting up your first webhook

Learn how to set up a webhook endpoint on your server which will listen to events sent from Mobile Text Alerts

{% stepper %}
{% step %}

### Create your webhook endpoint

You will need to create an endpoint on your server to receive event notifications. Mobile Text Alerts will send HTTP `POST` requests to this endpoint and expects it to return a response with a <mark style="color:green;">`200`</mark> HTTP status code. If other status codes are returned, this is treated as a failed request. You can configure [email alerts when Mobile Text Alerts receives these failed requests](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks#webhook-failure-email-alerts) when registering your webhook.

Once configured and registered, this endpoint will receive event payloads from Mobile Text Alerts. Request bodies are JSON. You can view the [expected event payloads for each event type here](https://developers.mobile-text-alerts.com/tutorials/webhooks/..#webhooks-event-payloads).
{% endstep %}

{% step %}

### Get the URL of this endpoint

Mobile Text Alerts will send HTTP `POST` requests to the URL of your server endpoint.

A `url` must be specified for each webhook event type that you register. You can configure multiple event types to be sent to the same destination URL endpoint. This would require multiple calls to the [Register Webhook endpoint](https://developers.mobile-text-alerts.com/api-reference/webhooks#register-webhook) for each event type you want to receive, each with the same `url` field.

*Example URL:*

```
https://www.yoursite.com/app/hooks
```

{% endstep %}

{% step %}

### Create a secret value

When registering a webhook, you are required to provide a `secret` value to Mobile Text Alerts. This is typically a 128-character hexadecimal `string`. This is used to validate that the requests you receive are from Mobile Text Alerts.

Mobile Text Alerts will generate a [SHA-256 HMAC](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.hmacsha256) signature using the request body and the `secret`. The signature is set as an `X-Signature` header in the request Mobile Text Alerts sends to your endpoint.

Your webhook listener should validate that the request is from Mobile Text Alerts by generating the [SHA-256 HMAC](https://learn.microsoft.com/en-us/dotnet/api/system.security.cryptography.hmacsha256) signature of the request body and comparing it to the value of the `X-Signature` header.

{% hint style="info" %}
Mobile Text Alerts provides this signature as a robust validation mechanism for your security. This validation process is not mandatory or enforced by Mobile Text Alerts. You can still receive and act on webhook callbacks without signature verification.

This is a common security best practice. It helps ensure your webhook endpoints are secure and handle only valid requests from Mobile Text Alerts. But you can choose if and how you implement validation.
{% endhint %}
{% endstep %}

{% step %}

### Register your webhook

You will need to register your webhook endpoint for each event type you want to receive. To do this, call the [Register Webhook <mark style="color:blue;">`/webhooks`</mark> endpoint](https://developers.mobile-text-alerts.com/api-reference/webhooks#register-webhook) of the Mobile Text Alerts API.

**Required fields:**

* `event: string` - Choose which [event type](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks#event-types) you want to receive event notifications for. This can be one of the following: `message-reply`, `delivery-status`, `message-send`, or `number-opt-in`.
* `url: string` - This is your hosted URL endpoint (created in step 2 above) that Mobile Text Alerts will make a `POST` request to when events trigger.
* `secret: string` - This is a shared secret between your organization and Mobile Text Alerts (created in step 3 above).

[Click here to see all fields.](https://developers.mobile-text-alerts.com/api-reference/webhooks#register-webhook)

*Example request:*

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/webhooks' \
--header 'Authorization: Bearer 89fa747a-e01b-5940-99c2-4e96fa996258' \
--data-raw '{
    "event": "delivery-status",
    "url": "https://www.example.com/app/hooks",
    "secret": "abc123-abc2-cde1-1234-xyz123456",
    "alertEmail": "alert@example.com",
    "sendAlertEmail": true
}'
```

{% endtab %}

{% tab title="Node.js" %}
Requirements: Node.js `18+` (native `fetch`) and an `MTA_API_KEY` environment variable.

```js
async function main() {
  const response = await fetch('https://api.mobile-text-alerts.com/v3/webhooks', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      event: 'delivery-status',
      url: 'https://www.example.com/app/hooks',
      secret: 'abc123-abc2-cde1-1234-xyz123456',
      alertEmail: 'alert@example.com',
      sendAlertEmail: true
    })
  });

  const data = await response.json();
  console.log(data);
}

main().catch((err) => {
  console.error('Request failed:', err);
  process.exitCode = 1;
});
```

{% endtab %}

{% tab title="Python" %}
Requirements: `pip install requests` and an `MTA_API_KEY` environment variable.

```python
import requests
import os

response = requests.post(
    'https://api.mobile-text-alerts.com/v3/webhooks',
    headers={
        'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}',
        'Content-Type': 'application/json'
    },
    json={
        'event': 'delivery-status',
        'url': 'https://www.example.com/app/hooks',
        'secret': 'abc123-abc2-cde1-1234-xyz123456',
        'alertEmail': 'alert@example.com',
        'sendAlertEmail': True
    }
    )
print(response.json())
```

{% endtab %}
{% endtabs %}

*Example successful* <mark style="color:green;">`200`</mark> *response:*

*(Note: The response contains the `id` field which is the `webhookId` used in requests to update/delete this webhook.)*

```json
{
  "message": "Webhook 11 created successfully.",
  "data": {
    "id": 11,
    "event": "delivery-status",
    "url": "https://www.example.com/app/hooks",
    "alertEmail": "alert@example.com",
    "sendAlertEmail": true,
    "skipErrors": false,
    "skipErrorCodes": [],
    "retryOnError": true,
    "maxThroughputPerMinute": 600,
    "createdAt": "2022-04-18T05:00:00.000Z"
  }
}
```

{% endstep %}

{% step %}

### Receive event payloads to your URL

Once your webhook is registered, you will start receiving the [event payloads](https://developers.mobile-text-alerts.com/tutorials/webhooks/..#webhooks-event-payloads) when that event is triggered. Your server can parse this JSON and use this payload data however you configure your server.

Your webhook configuration can be updated or deleted after registration by calling the [Update Webhook endpoint](https://developers.mobile-text-alerts.com/api-reference/webhooks#update-a-webhook) or [Delete Webhook endpoint](https://developers.mobile-text-alerts.com/api-reference/webhooks#delete-a-webhook). For these requests use the `{webhookId}` returned when you first registered the webhook.
{% endstep %}
{% endstepper %}


# Phone Number Format Guide

Learn how to format phone numbers in E.164 for subscriber creation to avoid confusion with country codes and leading digits.

When creating a new subscriber the phone number is the most critical field of the request. It provides more than a unique identifier but also the delivery address for every message sent to that subscriber. Also, if a phone number is supplied that already belongs to an existing subscriber, this will trigger an update of that subscriber rather than create a duplicate.

A correctly formatted phone number matters beyond just avoiding a `400 Bad Request` error. Our [API response for subscriber creation](https://developers.mobile-text-alerts.com/getting-started/add-a-subscriber#example-response) includes an `e164Number` field — the standardized international format — separately from the raw `number` you submitted. This is the system normalizing numbers internally.&#x20;

It is important to have a clear strategy for handling phone number formatting before sending new subscriber requests to the API. Submitting numbers in one format helps prevent duplicate subscriber records.

## Recommended format: E.164

E.164 is the international standard for formatting phone numbers, defined by the International Telecommunication Union (ITU). The name refers to the ITU-T recommendation number that specifies the format. E.164 formatting is recognized by carriers and routing systems worldwide as unambiguous. A number like `8002223333` could theoretically belong to multiple countries, while `+18002223333` cannot. It uniquely identifies one phone line on the global network, which is exactly what a messaging system needs to route a message to the correct destination.

**So while the `number` field can be submitted as a `number`/`integer` type it is recommended to format the phone number as a `string` in E.164 format** to remove any confusion about the country codes and leading numbers.&#x20;

You can also explicitly include the `e164Number` field in your request which takes precedence over `number` when supplied. This is the safest way to store international numbers.

**Example:** If you create a subscriber with `"number": 18002223333` this would be stored as: `"number":8002223333`,`"e164Number":"+18002223333"` . This may or may not be your desired result depending on the country code.&#x20;

### E.164 numbering plan format

A number in E.164 format has three components, written together as a single string with **no spaces, dashes, or parentheses.**

**E.164 Format:** `+[country code][subscriber number]`

*Note: E.164 numbers can contain up to 15 digits, including the country code.* A typical US number is 11 digits (12 characters with the leading `+`).

1. A `+` prefix, which distinguishes a string-format number from an integer. **The `+` is literal, not a placeholder.** This must be included as part of the format, with the string starting with the `+` character.
2. The [country code](https://countrycode.org/), which varies in length from 1–3 digits. For example, US and Canada use one digit (`1`), the UK uses two digits (`44`), while some countries use three-digit codes ( `354` for Iceland). This means you cannot assume a fixed offset from the start of the number to where the local digits begin.
3. The subscriber number (the national number).

**Examples of E.164 formatted numbers:**

* US number:  `(800)222-3333` or `800-222-3333` becomes `+18002223333` in E.164.
* International: `+447911123456` (UK), `+61412345678` (AU)

### Common number format errors

* Numbers with a leading `0` when sent as an `number` will have all leading `0` digits removed. These numbers should be passed as a `string` in the `number` field or use the `e164Number` field.
* Omitting the country code and assuming it is a US/CAN number
* Mixing `integer` and `string` data types in the same subscribers array
* `subscriberIds` are **not** phone numbers, these are internal identifiers

See [add-a-subscriber](https://developers.mobile-text-alerts.com/getting-started/add-a-subscriber "mention") to learn more about the steps to creating subscribers with the API.


# Generate and validate 2FA / MFA codes via SMS

Learn how Mobile Text Alerts can generate and then validate verification codes via SMS for simplified two-factor authentication.

## SMS Verification Overview

SMS verification is a form of two-factor authentication (2FA) where a user receives a one-time code via SMS to verify access to an application. SMS verification ensures that even if a password is stolen, an attacker would also need access to the user's phone to complete a login request.

The [Mobile Text Alerts SMS Verification API](https://developers.mobile-text-alerts.com/api-reference/verify) provides an easy way to manage SMS multi-factor authentication workflows within your application. These endpoints provide verification code generation, SMS message delivery, and validation of user-supplied codes.

<figure><img src="https://879775583-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FM0P3gHFFZE4c6PMaPvHm%2Fuploads%2Foswm2ct00mh1ZEgZrKXN%2Fsms_verification_Image_01_1_34_82578adf73.webp?alt=media&#x26;token=e6db3d8b-cfaf-4919-bc80-bf64b4ab514a" alt=""><figcaption><p>Why use SMS verification?</p></figcaption></figure>

## Steps for SMS validation with the Mobile Text Alerts API

1. [Generate an SMS verification code](#generate-sms-verification-code) to send to your user’s phone number by calling the [/send-code endpoint](#post-verify-sms-send-code).
2. If the phone number is valid, the user receives a code and enters it into your application.
3. You then [send this code to Mobile Text Alerts to validate it](#validate-sms-code) via the [/check-code endpoint](#post-verify-sms-check-code).
4. Mobile Text Alerts returns the [Verification Status](#verification-status) for the request. You can use this status to allow or deny access to your application.

## Generate and send SMS verification code

One-time verification codes can be generated and sent to a user by calling the [send verification code endpoint](#post-verify-sms-send-code) detailed below.

The user will receive a message in this format:

<pre><code>Your ${<a data-footnote-ref href="#user-content-fn-1">serviceName</a>} verification code is: ${code}
</code></pre>

Optional request parameters allow you to customize the verification code, such as how long it will be valid and the code's length.

Successful responses include an identifying `verificationId` that can be used to check the validity of a user-supplied code after it has been sent.

### Send Verification Code endpoint [`verify/sms/send-code`](https://developers.mobile-text-alerts.com/api-reference/verify#post-verify-sms-send-code)

#### Duplicate Requests (Idempotency)

This endpoint is idempotent, which means it deduplicates requests when network retries or other issues leave the request state unclear.

When sending your request to the endpoint, include an `X-Request-Id` header with an alphanumeric value. If you're unsure whether the request succeeded, you can resend the request with the same `X-Request-Id`, and the send endpoint will detect whether it's a duplicate.

For duplicate requests, a `409 Conflict` error is returned.

#### Request Fields

<table><thead><tr><th width="175">Name</th><th width="114.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>to</code> - <em>required</em></td><td><code>string</code></td><td>The destination phone number to send the SMS verification code to. A <a href="../../tutorials/phone-number-format-guide#recommended-format-e.164">E.164 formatted</a> string is recommended.</td></tr><tr><td><code>serviceName</code> - <em>required</em></td><td><code>string</code></td><td>A customer-friendly name for your service that will be included in the verification message.</td></tr><tr><td><code>timeoutSeconds</code></td><td><code>number</code></td><td><p>The number of seconds the verification code will be considered valid. Mobile Text Alerts stores a timestamp for this timeout and returns an <code>EXPIRED</code> status if a code is checked after the timeout period has elapsed.</p><p>Default: <code>300</code></p></td></tr><tr><td><code>codeLength</code></td><td><code>number</code></td><td><p>Determines the length of the generated code. <code>codeLength</code> must be between 4 and 8 digits.</p><p>Default: <code>6</code></p></td></tr><tr><td><code>externalId</code></td><td><code>string</code></td><td>The <a href="../../tutorials/message-sending/receive-and-reply-to-messages#include-the-externalid-parameter"><code>externalId</code> parameter</a> is an optional field for creating your own identifier for each message request. The <code>externalId</code> will be included in webhook notifications.</td></tr><tr><td><code>realtime</code></td><td><code>boolean</code></td><td>Indicates the number should be validated using the number verification service.</td></tr><tr><td><code>bypass</code></td><td><code>boolean</code></td><td>Indicates if you want to bypass number validation. If <code>true</code>, a <a href="#risk-types">risk type</a> will be returned in the response.</td></tr><tr><td><code>longcodeId</code></td><td><code>number</code></td><td>The ID for a longcode to use when sending the verification code.</td></tr><tr><td><code>tags</code></td><td><code>object</code></td><td>A set of properties to attach to the outgoing message. These are for internal use only.</td></tr><tr><td><code>poolId</code></td><td><code>number</code></td><td>The ID for a pool of longcodes to use when sending the verification code.</td></tr></tbody></table>

#### Response Fields

<table><thead><tr><th width="174.5">Name</th><th width="114.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>to</code></td><td><code>string</code></td><td>The destination number supplied in the request.</td></tr><tr><td><code>timeoutSeconds</code></td><td><code>number</code></td><td>The number of seconds the verification code will be considered valid. This value is provided in the request.</td></tr><tr><td><code>type</code></td><td><code>string</code></td><td><p>The type of verification code.</p><p>For this response, this value will always be <code>sms</code>.</p></td></tr><tr><td><code>status</code></td><td><code>enum</code></td><td>An <code>enum</code> value representing the current status of this verification request. See <a href="#verification-status">Verification Status</a> for possible status codes.</td></tr><tr><td><code>verificationId</code></td><td><code>string</code></td><td>A unique identifier for this verification request. Use it to check code validity for the associated request.</td></tr><tr><td><code>messageId</code></td><td><code>string</code></td><td><p>An additional identifier you can use to correlate webhook events triggered by this verification message.</p><p>Webhook event payloads for <a href="../../tutorials/webhooks#message-send"><code>message-send</code></a> and <a href="../../tutorials/webhooks#delivery-status"><code>delivery-status</code></a> include this <code>messageId</code> in the <code>tags</code> array.</p></td></tr><tr><td><code>deliverable</code></td><td><code>boolean</code></td><td>Indicates whether the number is valid.</td></tr><tr><td><code>reason</code></td><td><code>string</code></td><td>If the number is invalid, this contains additional information from the verification service.</td></tr><tr><td><code>carrier</code></td><td><code>string</code></td><td>The carrier identified for the <code>to</code> number.</td></tr><tr><td><code>lineType</code></td><td><code>string</code></td><td><p>The phone number type identified for the <code>to</code> number.</p><p>Possible values: <code>landline</code>, <code>mobile</code>, <code>tollfree</code>, <code>satellite</code>, <code>voip</code>, <code>premium</code>, <code>pager</code>, <code>unknown</code></p></td></tr><tr><td><code>risk</code></td><td><code>string</code></td><td>Any validation issues with the number. Only present when <code>bypass</code> is <code>true</code>. See <a href="#risk-types">Risk Types</a> below.</td></tr></tbody></table>

#### Risk Types

This endpoint will return a risk type when the `bypass` field in the request is set to `true`.

**Possible values:**

* `invalid_format`
  * The phone number format itself is invalid.
* `deny_list`
  * On our internal deny list pulled from delivery reports.
* `unsubscribed`
  * Marked as unsubscribed for your account.
* `suspended`
  * The number has been temporarily suspended by the carrier.
* `deactivated`
  * The number has been deactivated by the carrier.
* `landline`
  * The number is a landline number.
* `voip`
  * The number is a VoIP (Voice-over-IP) number.
* `unknown`
  * The number is invalid, but the reason is unknown.

## POST /verify/sms/send-code

> Trigger SMS Verification Code

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"SendCode.Response":{"type":"object","properties":{"to":{"type":"string"},"timeoutSeconds":{"type":"number"},"type":{"type":"string","enum":["sms"]},"status":{"$ref":"#/components/schemas/VerifyCodeStatus"},"messageId":{"type":"string"},"verificationId":{"type":"string"},"deliverable":{"type":"boolean"},"reason":{"type":"string"},"carrier":{"type":"string"},"lineType":{"type":"string"},"risk":{"allOf":[{"$ref":"#/components/schemas/VerifyRisk"},{"$ref":"#/components/schemas/NullReference"}]}},"required":["to","timeoutSeconds","type","status","messageId","verificationId","deliverable","reason","carrier","lineType"]},"VerifyCodeStatus":{"type":"string","enum":["PENDING","APPROVED","EXPIRED","INVALID"]},"VerifyRisk":{"type":"string","enum":["invalid_format","deny_list","unsubscribed","suspended","deactivated","landline","voip","unknown"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"SendCode.Request":{"type":"object","properties":{"to":{"type":"string"},"serviceName":{"type":"string"},"timeoutSeconds":{"type":"number"},"codeLength":{"type":"number"},"realtime":{"type":"boolean"},"bypass":{"type":"boolean"},"externalId":{"type":"string"},"longcodeId":{"type":"number"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"poolId":{"type":"string"},"senderName":{"type":"string"},"gated":{"type":"boolean"}},"required":["to"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify/sms/send-code":{"post":{"tags":["Verify"],"summary":"Trigger SMS Verification Code","operationId":"verify_send_sms_verification_code","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCode.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCode.Request"}}},"required":true}}}}}
```

## Validate SMS code

After initiating an SMS verification request, the user receives a code via SMS to enter into your application. Once you receive the code, you can validate it using the check SMS code endpoint. You must retain one identifier for the request so you can validate the user-supplied code.

### Check SMS Code endpoint [`verify/sms/check-code`](https://developers.mobile-text-alerts.com/api-reference/verify#post-verify-sms-check-code)

#### Request Fields

<table><thead><tr><th width="174.5">Name</th><th width="114.5">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>to</code>*</td><td><code>string</code></td><td>The destination phone number this SMS verification code was sent to.</td></tr><tr><td><code>verificationId</code>*</td><td><code>string</code></td><td>The unique identifier returned by the send-code request for this verification attempt.</td></tr><tr><td><code>code</code> <em>- required</em></td><td><code>string</code></td><td>The code supplied by the user to validate for this verification request. Length must match the configured <code>codeLength</code> for this request.</td></tr></tbody></table>

{% hint style="warning" %}
\*Either the `to` or `verificationId` field is required to identify the request.
{% endhint %}

#### Response Fields

<table><thead><tr><th width="175">Name</th><th width="115">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>to</code></td><td><code>string</code></td><td>The destination number supplied in the request.</td></tr><tr><td><code>verificationId</code></td><td><code>string</code></td><td><p>The verification request ID supplied in the request.</p><p>If only <code>to</code> is supplied in the request, the response will still include this field for reporting purposes.</p></td></tr><tr><td><code>status</code></td><td><code>enum</code></td><td>An <code>enum</code> value representing the current status of this verification request. See <a href="#verification-status">Verification Status</a> to see possible status codes.</td></tr></tbody></table>

### Verification Status

This Verification Status is an `enum` value representing the current status of the SMS verification request. This is used to confirm the validity of the user-supplied code.

**Status codes:**

* `PENDING`
  * The verification request has been processed by Mobile Text Alerts and was sent to the user.
* `APPROVED`
  * The supplied verification code is valid and the request has not yet expired.
* `EXPIRED`
  * The verification request has expired. This does not indicate whether the supplied code was valid.
* `INVALID`
  * The verification request has not yet expired but the supplied code did not match the code sent to the user via SMS.

## POST /verify/sms/check-code

> Check SMS Verification Code

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CheckCode.Response":{"type":"object","properties":{"to":{"type":"string"},"verificationId":{"type":"string"},"status":{"$ref":"#/components/schemas/VerifyCodeStatus"}},"required":["to","verificationId","status"]},"VerifyCodeStatus":{"type":"string","enum":["PENDING","APPROVED","EXPIRED","INVALID"]},"CheckCode.Request":{"type":"object","properties":{"to":{"type":"string"},"verificationId":{"type":"string"},"code":{"type":"string"}},"required":["code"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify/sms/check-code":{"post":{"tags":["Verify"],"summary":"Check SMS Verification Code","operationId":"verify_check_sms_verification_code","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCode.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCode.Request"}}},"required":true}}}}}
```

[^1]: See serviceName request field.


# FAQ

Find answers to some frequently asked questions about using the MTA API.

{% hint style="info" %}
Ensure you are [authenticated](https://developers.mobile-text-alerts.com/getting-started/get-an-api-key) before making the below example requests to the Mobile Text Alerts API.
{% endhint %}

## How can I send a single “Hello World” message to myself?

You can send a message to your personal phone number for testing and verification. To do this, send a request to the <mark style="color:blue;">`/send`</mark> endpoint with the phone number in the `subscribers` field and the test message in the `message` field.

**Example request:**

{% code overflow="wrap" %}

```sh
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--data '{"subscribers": [1112223333],"message": "Hello World"}'
```

{% endcode %}

See [send-a-message](https://developers.mobile-text-alerts.com/getting-started/send-a-message "mention") to learn more.

{% hint style="warning" %}
Trial accounts and unverified phone numbers are restricted to only sending [templated message](https://developers.mobile-text-alerts.com/tutorials/message-sending/message-templates) content. [Click here](https://mobile-text-alerts.deskpro.com/kb/articles/phone-number-verification) to learn how to get a verified number and start sending your own content.
{% endhint %}

## Can the MTA API be used to send 2FA/MFA verification codes?

Yes, the Mobile Text Alerts SMS Verification API provides an easy way to manage SMS multi-factor authentication workflows within your application. There are endpoints for verification code generation, SMS message delivery, and validation of user-supplied codes. See [generate-and-validate-2fa-mfa-codes-via-sms](https://developers.mobile-text-alerts.com/use-cases/generate-and-validate-2fa-mfa-codes-via-sms "mention") to learn more.

## What information is available in response to an API call to send a message?

A successful request will provide the following information in the response:

* `messageId` - the unique ID of the message
* `totalSent` - the total number of message recipients
* `totalFailedInternationalRecipients` - the total number of failed recipients with non-US phone numbers
* `message` - a summary of request results

See [#how-to-build-a-sample-request-to-the-api](https://developers.mobile-text-alerts.com/getting-started/send-a-message#how-to-build-a-sample-request-to-the-api "mention") to learn more about the request and response data for the `/send` endpoint.

## How do I schedule a message to be sent in the future?

You can indicate when a message will be sent by including the `scheduledDate` request field when calling the <mark style="color:blue;">`/send`</mark> endpoint. This allows you to use [ISO 8601 format](https://www.iso.org/iso-8601-date-and-time-format.html) to specify the exact send date and time.

Enter the time to send the message in the `scheduledDate` field as part of the request.

#### Example request:

```bash
curl --location 'https://api.mobile-text-alerts.com/v3/send' \
--data '{"subscribers": [1112223333],"message": "Hello World", "scheduledDate": "20260302T173000-0500"}'
```

Visit [#schedule-message-sends](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-sms-message#schedule-message-sends "mention") to learn more.

## Can I refer to my subscribers by name in the message I send to them?

Yes, you can refer to subscribers by name in your message by using a Liquid template variable in the [`properties` field](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-sms-message#properties-field-for-custom-variables-in-messages). The `properties` field contains a map between individual subscribers and the values assigned to those variables.

In the example request below, the `firstName` variable references the recipient name. Each recipient name is defined in `properties` for each subscriber number.

#### Example request:

```json
{
  "subscribers": ["3175551111", "3175552222"],
  "message": "Hello {{firstName}}!",
  "properties": {
    "3175551111": {
      "firstName": "Bob"
    },
    "3175552222": {
      "firstName": "Tony"
    }
  }
}
```

Visit [#properties-field-for-custom-variables-in-messages](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-sms-message#properties-field-for-custom-variables-in-messages "mention") to learn more.

## How can I be notified when my subscribers reply to a message?

To receive message reply notifications, you must configure a [`message-reply`](https://developers.mobile-text-alerts.com/tutorials/webhooks#message-reply) webhook. Once configured, when MTA receives an inbound message from a provider, it will post the inbound message to this endpoint.

See [receive-and-reply-to-messages](https://developers.mobile-text-alerts.com/tutorials/message-sending/receive-and-reply-to-messages "mention") to learn more.

## How can I import all of my subscribers?

Subscribers can be added with the [#create-subscriber-api-endpoint](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers#create-subscriber-api-endpoint "mention"), but for large imports, the [Bulk Create Subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/bulk-create-update-subscribers#bulk-create-subscribers) endpoint is recommended. This reduces request round-trip time and API call volume, which helps avoid rate limits.

## How can I see the status of a sent message?

You can check the delivery status of your message sends with Mobile Text Alerts in two different ways:

* [Call the List Deliveries API endpoint](https://developers.mobile-text-alerts.com/check-delivery-status#call-the-list-deliveries-api-endpoint)
  * This is best for reporting/analytics of settled message data. This only includes the most recent status for a message.
* [Configure the delivery-status webhook](https://developers.mobile-text-alerts.com/check-delivery-status#configure-the-delivery-status-webhook)
  * This is best for real-time status updates. With this webhook, you can receive the full status history from the moment of send to the final result status (delivered, rejected, etc.).

## Can I send iMessages to my subscribers?

Yes, if you're interested in sending iMessages and want to participate in our beta program, please reach out to your account manager to notify them of your interest.

See [send-an-imessage](https://developers.mobile-text-alerts.com/tutorials/message-sending/send-an-imessage "mention") to learn more.


# Account Variables

* Create Account Variable [#post-account-variables](#post-account-variables "mention")&#x20;
* Get Account Variable  [#get-account-variables-idortitle](#get-account-variables-idortitle "mention")
* Update Account Variable [#patch-account-variables-idortitle](#patch-account-variables-idortitle "mention")
* Delete Account Variable [#delete-account-variables-idortitle](#delete-account-variables-idortitle "mention")
* List Account Variables [#get-account-variables](#get-account-variables "mention")

## Create Account Variable

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[],"paths":{"/account-variables":{"post":{"tags":["Account Variables"],"summary":"Create Account Variable","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"account_variables_create_account_variable","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountVariable.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountVariable.Request"}}},"required":true}}}},"components":{"schemas":{"CreateAccountVariable.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicAccountVariable"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicAccountVariable":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"value":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","title","value","createdAt","updatedAt"],"description":"IAccountVariable without accountId"},"CreateAccountVariable.Request":{"type":"object","properties":{"title":{"type":"string"},"value":{"type":"string"}},"required":["title","value"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}}}
```

## Get Account Variable

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[],"paths":{"/account-variables/{idOrTitle}":{"get":{"tags":["Account Variables"],"summary":"Get Account Variable","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"account_variables_get_account_variable","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAccountVariable.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"idOrTitle","in":"path","required":true,"schema":{"type":"string"}}]}}},"components":{"schemas":{"GetAccountVariable.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicAccountVariable"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicAccountVariable":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"value":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","title","value","createdAt","updatedAt"],"description":"IAccountVariable without accountId"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}}}
```

## Update Account Variable

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[],"paths":{"/account-variables/{idOrTitle}":{"patch":{"tags":["Account Variables"],"summary":"Update Account Variable","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"account_variables_update_account_variable","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountVariable.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountVariable.Request"}}},"required":true},"parameters":[{"name":"idOrTitle","in":"path","required":true,"schema":{"type":"string"}}]}}},"components":{"schemas":{"UpdateAccountVariable.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicAccountVariable"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicAccountVariable":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"value":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","title","value","createdAt","updatedAt"],"description":"IAccountVariable without accountId"},"UpdateAccountVariable.Request":{"type":"object","properties":{"title":{"type":"string"},"value":{"type":"string"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}}}
```

## Delete Account Variable

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[],"paths":{"/account-variables/{idOrTitle}":{"delete":{"tags":["Account Variables"],"summary":"Delete Account Variable","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"account_variables_delete_account_variable","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteAccountVariable.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"idOrTitle","in":"path","required":true,"schema":{"type":"string"}}]}}},"components":{"schemas":{"DeleteAccountVariable.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}}}
```

## List Account Variables

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[],"paths":{"/account-variables":{"get":{"tags":["Account Variables"],"summary":"List Account Variables","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"account_variables_list_account_variables","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAccountVariables.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[]}}},"components":{"schemas":{"ListAccountVariables.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicAccountVariable"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicAccountVariable":{"type":"object","properties":{"id":{"type":"number"},"title":{"type":"string"},"value":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","title","value","createdAt","updatedAt"],"description":"IAccountVariable without accountId"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}}}
```


# Automated Replies

* Get Default Reply [#get-automated-replies-default-reply](#get-automated-replies-default-reply "mention")
* Update Default Reply [#patch-automated-replies-default-reply](#patch-automated-replies-default-reply "mention")
* Get New Subscriber Reply [#get-automated-replies-new-subscriber-reply](#get-automated-replies-new-subscriber-reply "mention")
* Update New Subscriber Reply [#patch-automated-replies-new-subscriber-reply](#patch-automated-replies-new-subscriber-reply "mention")

## GET /automated-replies/default-reply

> Get Default Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetDefaultReply.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"autoReply":{"type":"boolean"},"autoReplyMessage":{"type":"string","nullable":true},"initialReply":{"type":"boolean"},"initialReplyMessage":{"type":"string","nullable":true},"autoReplyTimes":{"allOf":[{"$ref":"#/components/schemas/IAutoReplyTimes"},{"$ref":"#/components/schemas/NullReference"}]},"autoReplyDuringHours":{"type":"boolean"},"autoReplyAfterHours":{"type":"boolean"}},"required":["autoReply","autoReplyMessage","initialReply","initialReplyMessage","autoReplyTimes","autoReplyDuringHours","autoReplyAfterHours"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IAutoReplyTimes":{"type":"object","properties":{"monday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"tuesday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"wednesday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"thursday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"friday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"saturday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"sunday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"IAutoReplyTimeframe":{"type":"object","properties":{"startTime":{"type":"string"},"endTime":{"type":"string"}},"required":["startTime","endTime"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/automated-replies/default-reply":{"get":{"tags":["Automated Replies"],"summary":"Get Default Reply","operationId":"automated_replies_get_default_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDefaultReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## PATCH /automated-replies/default-reply

> Update Default Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateDefaultReply.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"UpdateDefaultReply.Request":{"type":"object","properties":{"autoReply":{"type":"boolean"},"autoReplyMessage":{"type":"string"},"initialReply":{"type":"boolean"},"initialReplyMessage":{"type":"string"},"autoReplyTimes":{"$ref":"#/components/schemas/IAutoReplyTimes"},"autoReplyDuringHours":{"type":"boolean"},"autoReplyAfterHours":{"type":"boolean"},"templateId":{"type":"number"}},"required":["autoReply"]},"IAutoReplyTimes":{"type":"object","properties":{"monday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"tuesday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"wednesday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"thursday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"friday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"saturday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"},"sunday":{"$ref":"#/components/schemas/IAutoReplyTimeframe"}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"IAutoReplyTimeframe":{"type":"object","properties":{"startTime":{"type":"string"},"endTime":{"type":"string"}},"required":["startTime","endTime"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/automated-replies/default-reply":{"patch":{"tags":["Automated Replies"],"summary":"Update Default Reply","operationId":"automated_replies_update_default_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefaultReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDefaultReply.Request"}}},"required":true}}}}}
```

## GET /automated-replies/new-subscriber-reply

> Get New Subscriber Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetNewSubscriberReply.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"newSubscriberMessage":{"type":"string"}},"required":["newSubscriberMessage"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/automated-replies/new-subscriber-reply":{"get":{"tags":["Automated Replies"],"summary":"Get New Subscriber Reply","operationId":"automated_replies_get_new_subscriber_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetNewSubscriberReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## PATCH /automated-replies/new-subscriber-reply

> Update New Subscriber Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateNewSubscriberReply.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"newSubscriberMessage":{"type":"string"}},"required":["newSubscriberMessage"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"UpdateNewSubscriberReply.Request":{"type":"object","properties":{"newSubscriberMessage":{"type":"string"},"templateId":{"type":"number"}},"required":["newSubscriberMessage"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/automated-replies/new-subscriber-reply":{"patch":{"tags":["Automated Replies"],"summary":"Update New Subscriber Reply","operationId":"automated_replies_update_new_subscriber_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNewSubscriberReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateNewSubscriberReply.Request"}}},"required":true}}}}}
```


# Campaigns

* Get Campaign [#get-campaigns-campaignid](#get-campaigns-campaignid "mention")
* List Campaigns [#get-campaigns](#get-campaigns "mention")
* Get Campaign Analytics [#get-campaigns-campaignid-analytics](#get-campaigns-campaignid-analytics "mention")
* List Campaign Options [#get-campaigns-options](#get-campaigns-options "mention")
* List Campaign Messages [#get-campaigns-campaignid-messages](#get-campaigns-campaignid-messages "mention")

## GET /campaigns/{campaignId}

> Get Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetCampaign.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicCampaign"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"lastMessageActivity":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"],"description":"ICampaign without accountId"},{"type":"object","properties":{"deliveredCount":{"type":"number"},"unsubscribeCount":{"type":"number"},"responseCount":{"type":"number"},"clickCount":{"type":"number"},"clickRate":{"type":"number"},"conversionCount":{"type":"number"},"conversionRevenue":{"type":"number"}},"required":[]}]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/campaigns/{campaignId}":{"get":{"tags":["Campaigns"],"summary":"Get Campaign","operationId":"campaigns_get_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /campaigns

> List Campaigns

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListCampaigns.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicCampaign"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"lastMessageActivity":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"],"description":"ICampaign without accountId"},{"type":"object","properties":{"deliveredCount":{"type":"number"},"unsubscribeCount":{"type":"number"},"responseCount":{"type":"number"},"clickCount":{"type":"number"},"clickRate":{"type":"number"},"conversionCount":{"type":"number"},"conversionRevenue":{"type":"number"}},"required":[]}]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/campaigns":{"get":{"tags":["Campaigns"],"summary":"List Campaigns","operationId":"campaigns_list_campaigns","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCampaigns.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"lastUpdated":{"type":"string"},"isArchived":{"type":"boolean"}},"required":[]}}]}}}}
```

## GET /campaigns/{campaignId}/analytics

> Get Campaign Analytics

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetCampaignAnalytics.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string"},"isArchived":{"type":"boolean"},"linkRecipientCount":{"type":"number"},"timespanAnalytics":{"type":"array","items":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ICampaignTimespanAnalyticsRecord"}}}},"required":["id","name","description","linkRecipientCount","timespanAnalytics"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ICampaignTimespanAnalyticsRecord":{"type":"object","properties":{"deliveredCount":{"type":"number"},"clickCount":{"type":"number"},"spend":{"type":"number"},"replyCount":{"type":"number"},"unsubscribeCount":{"type":"number"},"creditCount":{"type":"number"},"conversionCount":{"type":"number"}},"required":["deliveredCount","replyCount","unsubscribeCount","creditCount"]},"TimeInterval":{"type":"string","enum":["days","weeks","months","years"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/campaigns/{campaignId}/analytics":{"get":{"tags":["Campaigns"],"summary":"Get Campaign Analytics","operationId":"campaigns_get_campaign_analytics","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCampaignAnalytics.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"name":"startDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"endDate","in":"query","required":true,"schema":{"type":"string"}},{"name":"interval","in":"query","required":true,"schema":{"$ref":"#/components/schemas/TimeInterval"}}]}}}}
```

## GET /campaigns/options

> List Campaign Options

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListCampaignOptions.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/campaigns/options":{"get":{"tags":["Campaigns"],"summary":"List Campaign Options","operationId":"campaigns_list_campaign_options","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCampaignOptions.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"isArchived":{"type":"boolean"}},"required":[]}}]}}}}
```

## GET /campaigns/{campaignId}/messages

> List Campaign Messages

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListCampaignMessages.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/ICampaignMessage"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ICampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"isMMS":{"type":"boolean"},"message":{"type":"string"},"createdAt":{"type":"string"},"recipientCount":{"type":"number"},"processedCount":{"type":"number"},"emailRecipientCount":{"type":"number"},"deliveredCount":{"type":"number"},"unsubscribeCount":{"type":"number"},"responseCount":{"type":"number"},"clickCount":{"type":"number"},"clickRate":{"type":"number"},"conversionCount":{"type":"number"}},"required":["id","message","createdAt","recipientCount","processedCount","emailRecipientCount","deliveredCount","unsubscribeCount","responseCount"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/campaigns/{campaignId}/messages":{"get":{"tags":["Campaigns"],"summary":"List Campaign Messages","operationId":"campaigns_list_campaign_messages","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCampaignMessages.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"campaignId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":[]}}]}}}}
```


# Chatbots

* Create Chatbot [#post-chatbots](#post-chatbots "mention")
* Get Chatbot [#get-chatbots-chatbotid](#get-chatbots-chatbotid "mention")
* Update Chatbot  [#patch-chatbots-chatbotid](#patch-chatbots-chatbotid "mention")
* List Chatbots [#get-chatbots](#get-chatbots "mention")

## POST /chatbots

> Create Chatbot

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateChatbot.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicChatbot"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicChatbot":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string"},"longcodeId":{"type":"number"},"isEnabled":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","instructions","longcodeId","isEnabled","createdAt"],"description":"IChatbot without openaiAssistantId, accountId, openaiVectorStoreId"},{"type":"object","properties":{"conversationCount":{"type":"number"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IPublicChatbotFile"}}},"required":[]}]},"IPublicChatbotFile":{"type":"object","properties":{"id":{"type":"number"},"filePath":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["id","filePath"],"description":"IChatbotFile without accountId, openaiFileId, chatbotId, createdAt"},"CreateChatbot.Request":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string"},"longcodeId":{"type":"number"},"files":{"type":"array","items":{"type":"string"}},"isEnabled":{"type":"boolean"}},"required":["name","instructions","longcodeId"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/chatbots":{"post":{"tags":["Chatbots"],"summary":"Create Chatbot","operationId":"chatbots_create_chatbot","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatbot.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateChatbot.Request"}}},"required":true}}}}}
```

## GET /chatbots/{chatbotId}

> Get Chatbot

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetChatbot.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicChatbot"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicChatbot":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string"},"longcodeId":{"type":"number"},"isEnabled":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","instructions","longcodeId","isEnabled","createdAt"],"description":"IChatbot without openaiAssistantId, accountId, openaiVectorStoreId"},{"type":"object","properties":{"conversationCount":{"type":"number"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IPublicChatbotFile"}}},"required":[]}]},"IPublicChatbotFile":{"type":"object","properties":{"id":{"type":"number"},"filePath":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["id","filePath"],"description":"IChatbotFile without accountId, openaiFileId, chatbotId, createdAt"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/chatbots/{chatbotId}":{"get":{"tags":["Chatbots"],"summary":"Get Chatbot","operationId":"chatbots_get_chatbot","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetChatbot.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"chatbotId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /chatbots/{chatbotId}

> Update Chatbot

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateChatbot.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicChatbot"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicChatbot":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string"},"longcodeId":{"type":"number"},"isEnabled":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","instructions","longcodeId","isEnabled","createdAt"],"description":"IChatbot without openaiAssistantId, accountId, openaiVectorStoreId"},{"type":"object","properties":{"conversationCount":{"type":"number"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IPublicChatbotFile"}}},"required":[]}]},"IPublicChatbotFile":{"type":"object","properties":{"id":{"type":"number"},"filePath":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["id","filePath"],"description":"IChatbotFile without accountId, openaiFileId, chatbotId, createdAt"},"UpdateChatbot.Request":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string"},"files":{"type":"array","items":{"type":"string"}},"isEnabled":{"type":"boolean"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/chatbots/{chatbotId}":{"patch":{"tags":["Chatbots"],"summary":"Update Chatbot","operationId":"chatbots_update_chatbot","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatbot.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateChatbot.Request"}}},"required":true},"parameters":[{"name":"chatbotId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /chatbots

> List Chatbots

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListChatbots.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicChatbot"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicChatbot":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"instructions":{"type":"string"},"longcodeId":{"type":"number"},"isEnabled":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","instructions","longcodeId","isEnabled","createdAt"],"description":"IChatbot without openaiAssistantId, accountId, openaiVectorStoreId"},{"type":"object","properties":{"conversationCount":{"type":"number"},"files":{"type":"array","items":{"$ref":"#/components/schemas/IPublicChatbotFile"}}},"required":[]}]},"IPublicChatbotFile":{"type":"object","properties":{"id":{"type":"number"},"filePath":{"type":"string"},"url":{"type":"string","nullable":true}},"required":["id","filePath"],"description":"IChatbotFile without accountId, openaiFileId, chatbotId, createdAt"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/chatbots":{"get":{"tags":["Chatbots"],"summary":"List Chatbots","operationId":"chatbots_list_chatbots","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListChatbots.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```


# Controlled Templates

* Get Controlled Template [#get-controlled-templates-controlledtemplateid](#get-controlled-templates-controlledtemplateid "mention")
* List Controlled Templates [#get-controlled-templates](#get-controlled-templates "mention")

## GET /controlled-templates/{controlledTemplateId}

> Get Controlled Template

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetControlledTemplate.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IControlledTemplate"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IControlledTemplate":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"message":{"type":"string"},"requiresLink":{"type":"boolean"},"type":{"$ref":"#/components/schemas/ControlledTemplateType"},"isMMS":{"type":"boolean"},"isGlobal":{"type":"boolean","nullable":true},"url":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"assignedChildAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"accountName":{"type":"string"}},"required":["id","accountName"]}}},"required":["id","accountId","name","message","requiresLink","type","createdAt","updatedAt"]},"ControlledTemplateType":{"type":"string","enum":["dispensary","standard"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/controlled-templates/{controlledTemplateId}":{"get":{"tags":["Controlled Templates"],"summary":"Get Controlled Template","operationId":"controlled_templates_get_controlled_template","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetControlledTemplate.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"controlledTemplateId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /controlled-templates

> List Controlled Templates

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListControlledTemplates.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IControlledTemplate"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IControlledTemplate":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"message":{"type":"string"},"requiresLink":{"type":"boolean"},"type":{"$ref":"#/components/schemas/ControlledTemplateType"},"isMMS":{"type":"boolean"},"isGlobal":{"type":"boolean","nullable":true},"url":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"assignedChildAccounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"accountName":{"type":"string"}},"required":["id","accountName"]}}},"required":["id","accountId","name","message","requiresLink","type","createdAt","updatedAt"]},"ControlledTemplateType":{"type":"string","enum":["dispensary","standard"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/controlled-templates":{"get":{"tags":["Controlled Templates"],"summary":"List Controlled Templates","operationId":"controlled_templates_list_controlled_templates","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListControlledTemplates.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[]}}}}
```


# Custom Fields

* Create Custom Field [#post-custom-fields](#post-custom-fields "mention")
* Get Custom Field [#get-custom-fields-customfieldid](#get-custom-fields-customfieldid "mention")
* Update Custom Field [#patch-custom-fields-customfieldid](#patch-custom-fields-customfieldid "mention")
* Delete Custom Field [#delete-custom-fields-customfieldid](#delete-custom-fields-customfieldid "mention")
* List Custom Fields [#get-custom-fields](#get-custom-fields "mention")
* Bulk Create Custom Fields [#post-custom-fields-bulk-create](#post-custom-fields-bulk-create "mention")

## POST /custom-fields

> Create Custom Field

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateCustomField.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicSubscriberField"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSubscriberField":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"$ref":"#/components/schemas/NullReference"}]},"hidden":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"type":"string"}},"format":{"allOf":[{"$ref":"#/components/schemas/DateFormat"},{"$ref":"#/components/schemas/NullReference"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","created"],"description":"ISubscriberField without accountId"},"CustomFieldType":{"type":"string","enum":["string","number","date","boolean","select","address","multi-select"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"DateFormat":{"type":"string","enum":["MMM D, YYYY","MM/DD/YYYY","DD/MM/YYYY"]},"CreateCustomField.Request":{"type":"object","properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomFieldType"},"hidden":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"format":{"$ref":"#/components/schemas/DateFormat"}},"required":["name"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/custom-fields":{"post":{"tags":["Custom Fields"],"summary":"Create Custom Field","operationId":"custom_fields_create_custom_field","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomField.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCustomField.Request"}}},"required":true}}}}}
```

## GET /custom-fields/{customFieldId}

> Get Custom Field

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetCustomField.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicSubscriberField"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSubscriberField":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"$ref":"#/components/schemas/NullReference"}]},"hidden":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"type":"string"}},"format":{"allOf":[{"$ref":"#/components/schemas/DateFormat"},{"$ref":"#/components/schemas/NullReference"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","created"],"description":"ISubscriberField without accountId"},"CustomFieldType":{"type":"string","enum":["string","number","date","boolean","select","address","multi-select"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"DateFormat":{"type":"string","enum":["MMM D, YYYY","MM/DD/YYYY","DD/MM/YYYY"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/custom-fields/{customFieldId}":{"get":{"tags":["Custom Fields"],"summary":"Get Custom Field","operationId":"custom_fields_get_custom_field","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCustomField.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"customFieldId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /custom-fields/{customFieldId}

> Update Custom Field

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateCustomField.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicSubscriberField"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSubscriberField":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"$ref":"#/components/schemas/NullReference"}]},"hidden":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"type":"string"}},"format":{"allOf":[{"$ref":"#/components/schemas/DateFormat"},{"$ref":"#/components/schemas/NullReference"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","created"],"description":"ISubscriberField without accountId"},"CustomFieldType":{"type":"string","enum":["string","number","date","boolean","select","address","multi-select"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"DateFormat":{"type":"string","enum":["MMM D, YYYY","MM/DD/YYYY","DD/MM/YYYY"]},"UpdateCustomField.Request":{"type":"object","properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomFieldType"},"options":{"type":"array","items":{"type":"string"}},"format":{"$ref":"#/components/schemas/DateFormat"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/custom-fields/{customFieldId}":{"patch":{"tags":["Custom Fields"],"summary":"Update Custom Field","operationId":"custom_fields_update_custom_field","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomField.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomField.Request"}}},"required":true},"parameters":[{"name":"customFieldId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## DELETE /custom-fields/{customFieldId}

> Delete Custom Field

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteCustomField.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/custom-fields/{customFieldId}":{"delete":{"tags":["Custom Fields"],"summary":"Delete Custom Field","operationId":"custom_fields_delete_custom_field","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteCustomField.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"customFieldId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## List Custom Fields

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListCustomFields.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberField"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSubscriberField":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"type":{"allOf":[{"$ref":"#/components/schemas/CustomFieldType"},{"$ref":"#/components/schemas/NullReference"}]},"hidden":{"type":"boolean","nullable":true},"options":{"type":"array","items":{"type":"string"}},"format":{"allOf":[{"$ref":"#/components/schemas/DateFormat"},{"$ref":"#/components/schemas/NullReference"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","created"],"description":"ISubscriberField without accountId"},"CustomFieldType":{"type":"string","enum":["string","number","date","boolean","select","address","multi-select"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"DateFormat":{"type":"string","enum":["MMM D, YYYY","MM/DD/YYYY","DD/MM/YYYY"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/custom-fields":{"get":{"tags":["Custom Fields"],"summary":"List Custom Fields","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"custom_fields_list_custom_fields","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCustomFields.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"type":{"$ref":"#/components/schemas/CustomFieldType"},"types":{"type":"array","items":{"$ref":"#/components/schemas/CustomFieldType"}}},"required":[]}}]}}}}
```

## POST /custom-fields/bulk-create

> Bulk Create Custom Fields

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkCreateCustomFields.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"BulkCreateCustomFields.Request":{"type":"object","properties":{"customFields":{"type":"array","items":{"$ref":"#/components/schemas/CreateCustomField.Request"}}},"required":["customFields"]},"CreateCustomField.Request":{"type":"object","properties":{"name":{"type":"string"},"type":{"$ref":"#/components/schemas/CustomFieldType"},"hidden":{"type":"boolean"},"options":{"type":"array","items":{"type":"string"}},"format":{"$ref":"#/components/schemas/DateFormat"}},"required":["name"]},"CustomFieldType":{"type":"string","enum":["string","number","date","boolean","select","address","multi-select"]},"DateFormat":{"type":"string","enum":["MMM D, YYYY","MM/DD/YYYY","DD/MM/YYYY"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/custom-fields/bulk-create":{"post":{"tags":["Custom Fields"],"summary":"Bulk Create Custom Fields","operationId":"custom_fields_bulk_create_custom_fields","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateCustomFields.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateCustomFields.Request"}}},"required":true}}}}}
```


# Dedicated Numbers

* List Dedicated Numbers [#get-dedicated-numbers](#get-dedicated-numbers "mention")

## GET /dedicated-numbers

> List Dedicated Numbers

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDedicatedNumbers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IApiLongcodeJoin"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IApiLongcodeJoin":{"type":"object","properties":{"name":{"type":"string"},"created":{"type":"string"},"longcodeId":{"type":"number"},"number":{"type":"string"},"tollFree":{"type":"number"},"isShortcode":{"type":"number"},"branded":{"type":"number"},"pending":{"type":"number"},"verified":{"type":"number"},"countryCode":{"type":"string"},"users":{"type":"object","additionalProperties":{"type":"string"}},"type":{"type":"string"},"status":{"$ref":"#/components/schemas/DedicatedNumberStatus"},"deliveryRate":{"type":"number"},"tollFreeVerificationStatus":{"allOf":[{"$ref":"#/components/schemas/TollFreeVerificationStatus"},{"$ref":"#/components/schemas/NullReference"}]},"tollFreeVerificationSubmissionDate":{"type":"string","nullable":true}},"required":["name","created","longcodeId","number","tollFree","isShortcode","branded","pending","verified","countryCode","users"]},"DedicatedNumberStatus":{"type":"string","enum":["Basic","Pending Carrier Approval","Carrier Approved","Undefined"]},"TollFreeVerificationStatus":{"format":"int32","type":"number","enum":[1,2,3,4,5]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/dedicated-numbers":{"get":{"tags":["Dedicated Numbers"],"summary":"List Dedicated Numbers","operationId":"dedicated_numbers_list_dedicated_numbers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDedicatedNumbers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"isTollfree":{"type":"boolean"},"userId":{"type":"number"},"pending":{"type":"boolean"}},"required":[]}}]}}}}
```


# Deeplinks

* Create Deeplink [#post-deeplinks](#post-deeplinks "mention")
* Create iMessage Deeplink [#post-deeplinks-imessage](#post-deeplinks-imessage "mention")

## Create Deeplink

> \*\*This feature is currently in closed beta\*\*. Please contact your MTA account rep or MTA support for more information.\
> \
> \### Request Body\
> \
> \- \`androidURI\`: The deeplink URI for Android.\
> \
> \- \`iosURI\`: The deeplink URI for iOS.\
> \
> \- \`macURI\`: The deeplink URI for Mac.\
> \
> \- \`windowsURI\`: The deeplink URI for Windows.\
> \
> \- \`defaultURI\`: The default deeplink URI.\
> \
> \
> \### Response\
> \
> Upon successful creation, the response will include the \`deeplinkUrl\`\
> \
> \#### Example\
> \
> Request:\
> \
> \`\`\` json\
> {\
> &#x20; "androidURI": "sms:+15555555555?body=Example",\
> &#x20; "iosURI": "imessage://imessage\@example.com?body=Example",\
> &#x20; "macURI": "<https://mobile-text-alerts.com/example",\\>
> &#x20; "windowsURI": "<https://mobile-text-alerts.com/example",\\>
> &#x20; "defaultURI": "<https://mobile-text-alerts.com/example"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> Response:\
> \
> \`\`\` json\
> {\
> &#x20; "deeplinkUrl": "<https://platform.mobile-text-alerts.com/deeplinks/abc"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> \
> undefined

````json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateDeeplink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"deeplinkUrl":{"type":"string"}},"required":["deeplinkUrl"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateDeeplink.Request":{"type":"object","properties":{"androidURI":{"type":"string"},"iosURI":{"type":"string"},"macURI":{"type":"string"},"windowsURI":{"type":"string"},"defaultURI":{"type":"string"}},"required":["androidURI","iosURI","macURI","windowsURI","defaultURI"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deeplinks":{"post":{"tags":["Deeplinks"],"summary":"Create Deeplink","operationId":"deeplinks_create_deeplink","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeeplink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDeeplink.Request"}}},"required":true},"description":"**This feature is currently in closed beta**. Please contact your MTA account rep or MTA support for more information.\n\n### Request Body\n\n- `androidURI`: The deeplink URI for Android.\n\n- `iosURI`: The deeplink URI for iOS.\n\n- `macURI`: The deeplink URI for Mac.\n\n- `windowsURI`: The deeplink URI for Windows.\n\n- `defaultURI`: The default deeplink URI.\n\n\n### Response\n\nUpon successful creation, the response will include the `deeplinkUrl`\n\n#### Example\n\nRequest:\n\n``` json\n{\n  \"androidURI\": \"sms:+15555555555?body=Example\",\n  \"iosURI\": \"imessage://imessage@example.com?body=Example\",\n  \"macURI\": \"https://mobile-text-alerts.com/example\",\n  \"windowsURI\": \"https://mobile-text-alerts.com/example\",\n  \"defaultURI\": \"https://mobile-text-alerts.com/example\"\n}\n\n ```\n\nResponse:\n\n``` json\n{\n  \"deeplinkUrl\": \"https://platform.mobile-text-alerts.com/deeplinks/abc\"\n}\n\n ```\n\n\nundefined"}}}}
````

## Create IMessage Deeplink

> \*\*This feature is currently in closed beta\*\*. Please contact your MTA account rep or MTA support for more information.\
> \
> \### Request Body\
> \
> \- \`longcodeId\`: The id of the longcode.\
> \
> \- \`optInMessage\`: The opt-in message used to populate the deeplink urls.\
> \
> \- \`senderName\`: The sender name used to pre-populate the "To:" field for iMessage\
> &#x20;   \- If this field is empty, the sender name associated with the longcode will be used as the default.\
> \
> \
> \### Response\
> \
> Upon successful creation, the response will include the \`deeplinkUrl\`\
> \
> \#### Example\
> \
> Request:\
> \
> \`\`\` json\
> {\
> &#x20; "longcodeId": 1337,\
> &#x20; "optInMessage": "Example",\
> &#x20; "senderName": "<example@i-msg.co>"\
> }\
> \
> &#x20;\`\`\`\
> \
> Response:\
> \
> \`\`\` json\
> {\
> &#x20; "deeplinkUrl": "<https://platform.mobile-text-alerts.com/deeplinks/abc"\\>
> }\
> \
> &#x20;\`\`\`\
> \
> \
> undefined

````json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateIMessageDeeplink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"deeplinkUrl":{"type":"string"}},"required":["deeplinkUrl"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateIMessageDeeplink.Request":{"type":"object","properties":{"longcodeId":{"type":"number"},"optInMessage":{"type":"string"},"senderName":{"type":"string"}},"required":["optInMessage"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deeplinks/imessage":{"post":{"tags":["Deeplinks"],"summary":"Create IMessage Deeplink","operationId":"deeplinks_create_i_message_deeplink","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIMessageDeeplink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIMessageDeeplink.Request"}}},"required":true},"description":"**This feature is currently in closed beta**. Please contact your MTA account rep or MTA support for more information.\n\n### Request Body\n\n- `longcodeId`: The id of the longcode.\n\n- `optInMessage`: The opt-in message used to populate the deeplink urls.\n\n- `senderName`: The sender name used to pre-populate the \"To:\" field for iMessage\n    - If this field is empty, the sender name associated with the longcode will be used as the default.\n\n\n### Response\n\nUpon successful creation, the response will include the `deeplinkUrl`\n\n#### Example\n\nRequest:\n\n``` json\n{\n  \"longcodeId\": 1337,\n  \"optInMessage\": \"Example\",\n  \"senderName\": \"example@i-msg.co\"\n}\n\n ```\n\nResponse:\n\n``` json\n{\n  \"deeplinkUrl\": \"https://platform.mobile-text-alerts.com/deeplinks/abc\"\n}\n\n ```\n\n\nundefined"}}}}
````


# Deliveries

* List Deliveries [#get-deliveries](#get-deliveries "mention")

## List Deliveries

> List all subscribers and query for subscribers. Includes all subscribers with \`query\` value in either first name, last name, number, email, or custom subscriber fields and with \`filters\` values in respective categories.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDeliveries.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IDeliveryRecord"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IDeliveryRecord":{"type":"object","properties":{"messageId":{"type":"number"},"externalId":{"type":"string","nullable":true},"message":{"type":"string"},"attachment":{"type":"string"},"status":{"$ref":"#/components/schemas/MTADeliveryLabel"},"date":{"type":"string"},"carrier":{"type":"string","nullable":true},"to":{"type":"string"},"from":{"type":"string"},"type":{"$ref":"#/components/schemas/SentMessageType"}},"required":["messageId","externalId","status","date","carrier","to","from","type"]},"MTADeliveryLabel":{"type":"string","enum":["sent","delivered","undelivered","undeliverable","unknown","rejected"]},"SentMessageType":{"type":"string","enum":["sms","mms","tts","phone-call","email","survey"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/deliveries":{"get":{"tags":["Deliveries"],"summary":"List Deliveries","operationId":"deliveries_list_deliveries","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDeliveries.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"type":{"$ref":"#/components/schemas/SentMessageType"},"status":{"$ref":"#/components/schemas/MTADeliveryLabel"}},"required":[]}}],"description":"List all subscribers and query for subscribers. Includes all subscribers with `query` value in either first name, last name, number, email, or custom subscriber fields and with `filters` values in respective categories.\n\n\nundefined"}}}}
```


# Drip Campaigns

* Create Drip Campaign [#post-drip-campaigns](#post-drip-campaigns "mention")
* Get Drip Campaign [#get-drip-campaigns-dripcampaignid](#get-drip-campaigns-dripcampaignid "mention")
* Update Drip Campaign [#patch-drip-campaigns-dripcampaignid](#patch-drip-campaigns-dripcampaignid "mention")
* Delete Drip Campaign [#delete-drip-campaigns-dripcampaignid](#delete-drip-campaigns-dripcampaignid "mention")
* List Drip Campaigns [#get-drip-campaigns](#get-drip-campaigns "mention")

### Drip Campaign Controls

* Start Drip Campaign [#post-drip-campaigns-dripcampaignid-start](#post-drip-campaigns-dripcampaignid-start "mention")
* Stop Drip Campaign [#post-drip-campaigns-dripcampaignid-stop](#post-drip-campaigns-dripcampaignid-stop "mention")
* Clone Drip Campaign [#post-drip-campaigns-dripcampaignid-clone](#post-drip-campaigns-dripcampaignid-clone "mention")
* List Drip Campaign Numbers [#get-drip-campaigns-dripcampaignid-numbers-sequenceid](#get-drip-campaigns-dripcampaignid-numbers-sequenceid "mention")

### Drip Campaign Messages

* Create Drip Campaign Message [#post-drip-campaigns-dripcampaignid-messages](#post-drip-campaigns-dripcampaignid-messages "mention")
* Update Drip Campaign Message [#patch-drip-campaigns-dripcampaignid-messages-messageid](#patch-drip-campaigns-dripcampaignid-messages-messageid "mention")
* Delete Drip Campaign Message [#delete-drip-campaigns-dripcampaignid-messages-messageid](#delete-drip-campaigns-dripcampaignid-messages-messageid "mention")

## POST /drip-campaigns

> Create Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateDripCampaign.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicDripCampaign"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicDripCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","nullable":true},"endDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id"],"description":"IDripCampaign without accountId, deleted"},{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"number"}},"campaignMessages":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/IMmsDripCampaignMessage"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]}}},"required":["groupIds","campaignMessages"]}]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]},"CreateDripCampaign.Request":{"type":"object","properties":{"name":{"type":"string"},"endDate":{"type":"string"}},"required":["name"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns":{"post":{"tags":["Drip Campaign"],"summary":"Create Drip Campaign","operationId":"drip_campaign_create_drip_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDripCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDripCampaign.Request"}}},"required":true}}}}}
```

## GET /drip-campaigns/{dripCampaignId}

> Get Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetDripCampaign.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicDripCampaign"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicDripCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","nullable":true},"endDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id"],"description":"IDripCampaign without accountId, deleted"},{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"number"}},"campaignMessages":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/IMmsDripCampaignMessage"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]}}},"required":["groupIds","campaignMessages"]}]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}":{"get":{"tags":["Drip Campaign"],"summary":"Get Drip Campaign","operationId":"drip_campaign_get_drip_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetDripCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /drip-campaigns/{dripCampaignId}

> Update Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateDripCampaign.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicDripCampaign"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicDripCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","nullable":true},"endDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id"],"description":"IDripCampaign without accountId, deleted"},{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"number"}},"campaignMessages":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/IMmsDripCampaignMessage"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]}}},"required":["groupIds","campaignMessages"]}]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]},"UpdateDripCampaign.Request":{"type":"object","properties":{"name":{"type":"string"},"endDate":{"type":"string"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}":{"patch":{"tags":["Drip Campaign"],"summary":"Update Drip Campaign","operationId":"drip_campaign_update_drip_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDripCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDripCampaign.Request"}}},"required":true}}}}}
```

## DELETE /drip-campaigns/{dripCampaignId}

> Delete Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}":{"delete":{"tags":["Drip Campaign"],"summary":"Delete Drip Campaign","operationId":"drip_campaign_delete_drip_campaign","responses":{"204":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /drip-campaigns

> List Drip Campaigns

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDripCampaigns.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicDripCampaign"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicDripCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","nullable":true},"endDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id"],"description":"IDripCampaign without accountId, deleted"},{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"number"}},"campaignMessages":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/IMmsDripCampaignMessage"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]}}},"required":["groupIds","campaignMessages"]}]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]},"IDripCampaignsFilter":{"type":"object","properties":{"groupId":{"type":"number"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns":{"get":{"tags":["Drip Campaign"],"summary":"List Drip Campaigns","operationId":"drip_campaign_list_drip_campaigns","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDripCampaigns.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"$ref":"#/components/schemas/IDripCampaignsFilter"}}]}}}}
```

## POST /drip-campaigns/{dripCampaignId}/start

> Start Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"StartDripCampaign.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"StartDripCampaign.Request":{"type":"object","properties":{"groupId":{"type":"number"}},"required":["groupId"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/start":{"post":{"tags":["Drip Campaign"],"summary":"Start Drip Campaign","operationId":"drip_campaign_start_drip_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDripCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDripCampaign.Request"}}},"required":true}}}}}
```

## POST /drip-campaigns/{dripCampaignId}/stop

> Stop Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"StopDripCampaign.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"StopDripCampaign.Request":{"type":"object","properties":{"groupId":{"type":"number"}},"required":["groupId"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/stop":{"post":{"tags":["Drip Campaign"],"summary":"Stop Drip Campaign","operationId":"drip_campaign_stop_drip_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopDripCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StopDripCampaign.Request"}}},"required":true}}}}}
```

## POST /drip-campaigns/{dripCampaignId}/clone

> Clone Drip Campaign

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateDripCampaign.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicDripCampaign"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicDripCampaign":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string","nullable":true},"endDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id"],"description":"IDripCampaign without accountId, deleted"},{"type":"object","properties":{"groupIds":{"type":"array","items":{"type":"number"}},"campaignMessages":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/IMmsDripCampaignMessage"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]}}},"required":["groupIds","campaignMessages"]}]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/clone":{"post":{"tags":["Drip Campaign"],"summary":"Clone Drip Campaign","operationId":"drip_campaign_clone_drip_campaign","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDripCampaign.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /drip-campaigns/{dripCampaignId}/numbers/{sequenceId}

> List Drip Campaign Numbers

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListDripCampaignNumbers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicMmsDripCampaignNumber"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicMmsDripCampaignNumber":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"}},"required":["id","name"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/numbers/{sequenceId}":{"get":{"tags":["Drip Campaign"],"summary":"List Drip Campaign Numbers","operationId":"drip_campaign_list_drip_campaign_numbers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListDripCampaignNumbers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}},{"name":"sequenceId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## POST /drip-campaigns/{dripCampaignId}/messages

> Create Drip Campaign Message

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateDripCampaignMessage.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IMmsDripCampaignMessage"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]},"CreateDripCampaignMessage.Request":{"type":"object","properties":{"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"isMms":{"type":"number"},"previousId":{"type":"number"},"templateId":{"type":"number"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/messages":{"post":{"tags":["Drip Campaign"],"summary":"Create Drip Campaign Message","operationId":"drip_campaign_create_drip_campaign_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDripCampaignMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateDripCampaignMessage.Request"}}},"required":true}}}}}
```

## PATCH /drip-campaigns/{dripCampaignId}/messages/{messageId}

> Update Drip Campaign Message

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateDripCampaignMessage.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IMmsDripCampaignMessage"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IMmsDripCampaignMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number","nullable":true},"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"added":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"sequence":{"type":"number"},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"dripCampaignId":{"type":"number","nullable":true},"isMms":{"type":"number"}},"required":["id","added","sequence","delay","timeOfDay","isMms"]},"UpdateDripCampaignMessage.Request":{"type":"object","properties":{"title":{"type":"string","nullable":true},"content":{"type":"string","nullable":true},"attachment":{"type":"string","nullable":true},"delay":{"type":"number"},"timeOfDay":{"type":"string"},"isMms":{"type":"number"},"previousId":{"type":"number"},"templateId":{"type":"number"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/messages/{messageId}":{"patch":{"tags":["Drip Campaign"],"summary":"Update Drip Campaign Message","operationId":"drip_campaign_update_drip_campaign_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDripCampaignMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDripCampaignMessage.Request"}}},"required":true}}}}}
```

## DELETE /drip-campaigns/{dripCampaignId}/messages/{messageId}

> Delete Drip Campaign Message

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteDripCampaignMessage.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/drip-campaigns/{dripCampaignId}/messages/{messageId}":{"delete":{"tags":["Drip Campaign"],"summary":"Delete Drip Campaign Message","operationId":"drip_campaign_delete_drip_campaign_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteDripCampaignMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"dripCampaignId","in":"path","required":true,"schema":{"type":"string"}},{"name":"messageId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```


# Groups

For more information on how to use these endpoints see: [group-subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/group-subscribers "mention")

* Create Group  [#post-groups](#post-groups "mention")
* Get Group [#get-groups-groupid](#get-groups-groupid "mention")
* Update Group [#patch-groups-groupid](#patch-groups-groupid "mention")
* Delete Group [#delete-groups-groupid](#delete-groups-groupid "mention")
* List Groups [#get-groups](#get-groups "mention")

### Group Member Management

* Add Subscriber to Group [#post-groups-groupid-subscribers](#post-groups-groupid-subscribers "mention")
* Delete Subscriber from Group [#delete-groups-groupid-subscribers-subscriberid](#delete-groups-groupid-subscribers-subscriberid "mention")

### Group Member Counts

* List All Groups and Member Count [#get-groups-member-count-all](#get-groups-member-count-all "mention")
* Get Adaptive Group Member Count [#get-groups-groupid-member-count](#get-groups-groupid-member-count "mention")

See [bulk-group-actions](https://developers.mobile-text-alerts.com/api-reference/groups/bulk-group-actions "mention") for large group changes in a single request.

## POST /groups

> Create Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateGroup.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicGroup"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]},"CreateGroup.Request":{"$ref":"#/components/schemas/Partial-IGroup"},"Partial-IGroup":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"keyword":{"type":"string"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups":{"post":{"tags":["Groups"],"summary":"Create Group","operationId":"groups_create_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroup.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroup.Request"}}},"required":true}}}}}
```

## GET /groups/{groupId}

> Get Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}":{"get":{"tags":["Groups"],"summary":"Get Group","operationId":"groups_get_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IApiResponse"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /groups/{groupId}

> Update Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateGroup.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicGroup"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]},"UpdateGroup.Request":{"$ref":"#/components/schemas/Partial-IGroup"},"Partial-IGroup":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"keyword":{"type":"string"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}":{"patch":{"tags":["Groups"],"summary":"Update Group","operationId":"groups_update_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroup.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateGroup.Request"}}},"required":true},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## DELETE /groups/{groupId}

> Delete Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteGroup.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}":{"delete":{"tags":["Groups"],"summary":"Delete Group","operationId":"groups_delete_group","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGroup.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /groups

> List Groups

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListGroups.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroup"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups":{"get":{"tags":["Groups"],"summary":"List Groups","operationId":"groups_list_groups","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListGroups.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"includeAdaptive":{"type":"boolean"}},"required":[]}}]}}}}
```

## Add Subscriber to Group

> Required Fields: \`subscriberId\`\
> \
> Note: Field \`addToDripCampaigns\` is \`true\` by default.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateGroupMember.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateGroupMember.Request":{"type":"object","properties":{"subscriberId":{"type":"number"},"addToDripCampaigns":{"type":"boolean"}},"required":["subscriberId"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers":{"post":{"tags":["Groups"],"summary":"Add Subscriber to Group","operationId":"groups_create_group_member","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupMember.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateGroupMember.Request"}}},"required":true},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"description":"Required Fields: `subscriberId`\n\nNote: Field `addToDripCampaigns` is `true` by default.\n\n\nundefined"}}}}
```

## DELETE /groups/{groupId}/subscribers/{subscriberId}

> Remove Subscriber from Group

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteGroupMember.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers/{subscriberId}":{"delete":{"tags":["Groups"],"summary":"Remove Subscriber from Group","operationId":"groups_delete_group_member","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteGroupMember.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}},{"name":"subscriberId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /groups/member-count/all

> List All Groups and Member Count

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListAllGroupsAndMemberCount.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroup"}}},"required":["rows"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicGroup":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"hidden":{"type":"number"},"welcomeMessage":{"type":"string"},"description":{"type":"string"},"parentWebinarId":{"type":"string"},"displayName":{"type":"string","nullable":true},"sortOrder":{"type":"number","nullable":true},"type":{"$ref":"#/components/schemas/GroupType"},"settings":{"$ref":"#/components/schemas/IGroupSettings"},"isTemporary":{"type":"boolean"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","name","hidden","welcomeMessage"],"description":"IGroup without accountId, keyword"},{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}]},"GroupType":{"type":"string","enum":["static","adaptive"]},"IGroupSettings":{"type":"object","properties":{"match":{"type":"string","enum":["AND","OR"]},"conditions":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"conditionAttribute":{"type":"string"},"conditionOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionCategory":{"type":"string"},"conditionValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"conditionSubOperator":{"type":"string","enum":["equals","not equals","contains","starts with","ends with","greater than","less than","is empty","is not empty","between","not between","is checked","is not checked","is in","is not in"],"description":"GroupOperator"},"conditionSubValue":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"}]}},"shouldLoadDefaultValue":{"type":"boolean"}},"required":["type","conditionAttribute","conditionOperator","conditionValue"],"description":"IGroupCondition"}}},"required":["match","conditions"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/member-count/all":{"get":{"tags":["Groups"],"summary":"List All Groups and Member Count","operationId":"groups_list_all_groups_and_member_count","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListAllGroupsAndMemberCount.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"query":{"type":"string"},"shouldIncludeAdaptive":{"type":"boolean"}},"required":[]}}]}}}}
```

## GET /groups/{groupId}/member-count

> Get Adaptive Group Member Count

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetAdaptiveGroupMemberCount.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"memberCount":{"type":"number"}},"required":["memberCount"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/member-count":{"get":{"tags":["Groups"],"summary":"Get Adaptive Group Member Count","operationId":"groups_get_adaptive_group_member_count","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetAdaptiveGroupMemberCount.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```


# Bulk Group Actions

For more information on how to use these endpoints see: [bulk-group-actions](https://developers.mobile-text-alerts.com/api-reference/groups/bulk-group-actions "mention")

* Get Bulk Adaptive Group Member Count [#get-groups-member-count-bulk](#get-groups-member-count-bulk "mention")
* Bulk Add Subscribers to Group [#post-groups-groupid-subscribers-bulk-create](#post-groups-groupid-subscribers-bulk-create "mention")
* Bulk Remove Subscribers from Group [#post-groups-groupid-subscribers-bulk-delete](#post-groups-groupid-subscribers-bulk-delete "mention")

## GET /groups/member-count/bulk

> Get Bulk Adaptive Group Member Count

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkGetAdaptiveGroupMemberCount.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"memberCounts":{"type":"object","additionalProperties":{"type":"number"}}},"required":["memberCounts"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/member-count/bulk":{"get":{"tags":["Groups"],"summary":"Get Bulk Adaptive Group Member Count","operationId":"groups_bulk_get_adaptive_group_member_count","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGetAdaptiveGroupMemberCount.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupIds","in":"query","required":true,"schema":{"type":"string"}}]}}}}
```

## Bulk Add Subscribers To Group

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`5\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkCreateGroupMembers.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"BulkCreateGroupMembers.Request":{"type":"object","properties":{"subscriberIds":{"type":"array","items":{"type":"number"}}},"required":["subscriberIds"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers/bulk-create":{"post":{"tags":["Groups"],"summary":"Bulk Add Subscribers To Group","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `5` requests every `15` seconds","operationId":"groups_bulk_create_group_members","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateGroupMembers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateGroupMembers.Request"}}},"required":true}}}}}
```

## Bulk Remove Subscribers from Group

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`5\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkDeleteGroupMembers.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"BulkCreateGroupMembers.Request":{"type":"object","properties":{"subscriberIds":{"type":"array","items":{"type":"number"}}},"required":["subscriberIds"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/groups/{groupId}/subscribers/bulk-delete":{"post":{"tags":["Groups"],"summary":"Bulk Remove Subscribers from Group","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `5` requests every `15` seconds","operationId":"groups_bulk_delete_group_members","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkDeleteGroupMembers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"groupId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateGroupMembers.Request"}}},"required":true}}}}}
```


# Link Tags

* Create Tag [#post-link-tags](#post-link-tags "mention")
* Get Tag [#get-link-tags-linktagid](#get-link-tags-linktagid "mention")
* Update Tag [#patch-link-tags-linktagid](#patch-link-tags-linktagid "mention")
* Delete Tag [#delete-link-tags-linktagid](#delete-link-tags-linktagid "mention")
* List Tags [#get-link-tags](#get-link-tags "mention")

## POST /link-tags

> Create Tag

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateLinkTag.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicLinkTag"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]},"CreateLinkTag.Request":{"type":"object","properties":{"tag":{"type":"string"}},"required":["tag"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/link-tags":{"post":{"tags":["Link Tags"],"summary":"Create Tag","operationId":"link_tags_create_link_tag","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkTag.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkTag.Request"}}},"required":true}}}}}
```

## GET /link-tags/{linkTagId}

> Get Tag

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetLinkTag.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicLinkTag"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/link-tags/{linkTagId}":{"get":{"tags":["Link Tags"],"summary":"Get Tag","operationId":"link_tags_get_link_tag","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLinkTag.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkTagId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /link-tags/{linkTagId}

> Update Tag

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateLinkTag.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicLinkTag"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]},"CreateLinkTag.Request":{"type":"object","properties":{"tag":{"type":"string"}},"required":["tag"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/link-tags/{linkTagId}":{"patch":{"tags":["Link Tags"],"summary":"Update Tag","operationId":"link_tags_update_link_tag","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkTag.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkTagId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLinkTag.Request"}}},"required":true}}}}}
```

## DELETE /link-tags/{linkTagId}

> Delete Tag

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteLinkTag.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/link-tags/{linkTagId}":{"delete":{"tags":["Link Tags"],"summary":"Delete Tag","operationId":"link_tags_delete_link_tag","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteLinkTag.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkTagId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /link-tags

> List Tags

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListLinkTags.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicLinkTag"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/link-tags":{"get":{"tags":["Link Tags"],"summary":"List Tags","operationId":"link_tags_list_link_tags","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLinkTags.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkId","in":"query","required":false,"schema":{"type":"number"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```


# Links

* Create Link [#post-links-shortlinks](#post-links-shortlinks "mention")
* Get a tracked Link by ID [#get-links-linkid](#get-links-linkid "mention")
* Add Tags to a Link [#patch-links-linkid](#patch-links-linkid "mention")
* List and Search all tracked Links [#get-links](#get-links "mention")
* Get a tracked Link by ID [#get-links-linkid-clicks](#get-links-linkid-clicks "mention")

### Subdomains

* Validate Subdomain [#post-links-validate-subdomain](#post-links-validate-subdomain "mention")
* Update Subdomain [#post-links-subdomain](#post-links-subdomain "mention")

## POST /links/shortlinks

> Create Link

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateLink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicBitlyLink"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicBitlyLink":{"type":"object","properties":{"id":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"longUrl":{"type":"string"},"shortUrl":{"type":"string"},"finalUrl":{"type":"string","nullable":true},"trackingEnabled":{"type":"boolean"},"isMms":{"type":"boolean"},"clicks":{"type":"number"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/IPublicLinkTag"}}},"required":["id","created","longUrl","shortUrl","trackingEnabled","isMms","clicks","tags"]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]},"CreateLink.Request":{"type":"object","properties":{"longUrl":{"type":"string"},"trackingEnabled":{"type":"boolean"},"isMMS":{"type":"boolean"},"ageCheck":{"type":"boolean"},"tags":{"type":"array","items":{"type":"string"}},"isWebinar":{"type":"boolean"}},"required":["longUrl"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links/shortlinks":{"post":{"tags":["Links"],"summary":"Create Link","operationId":"links_create_short_link","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLink.Request"}}},"required":true}}}}}
```

## GET /links/{linkId}

> Get a tracked link by ID

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetLink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicBitlyLink"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicBitlyLink":{"type":"object","properties":{"id":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"longUrl":{"type":"string"},"shortUrl":{"type":"string"},"finalUrl":{"type":"string","nullable":true},"trackingEnabled":{"type":"boolean"},"isMms":{"type":"boolean"},"clicks":{"type":"number"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/IPublicLinkTag"}}},"required":["id","created","longUrl","shortUrl","trackingEnabled","isMms","clicks","tags"]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links/{linkId}":{"get":{"tags":["Links"],"summary":"Get a tracked link by ID","operationId":"links_get_link","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /links/{linkId}

> Add tags to a Link

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"AddTagsToLink.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicBitlyLink"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicBitlyLink":{"type":"object","properties":{"id":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"longUrl":{"type":"string"},"shortUrl":{"type":"string"},"finalUrl":{"type":"string","nullable":true},"trackingEnabled":{"type":"boolean"},"isMms":{"type":"boolean"},"clicks":{"type":"number"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/IPublicLinkTag"}}},"required":["id","created","longUrl","shortUrl","trackingEnabled","isMms","clicks","tags"]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]},"AddTagsToLink.Request":{"type":"object","properties":{"tags":{"type":"array","items":{"type":"string"}}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links/{linkId}":{"patch":{"tags":["Links"],"summary":"Add tags to a Link","operationId":"links_patch_link","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTagsToLink.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddTagsToLink.Request"}}},"required":true}}}}}
```

## GET /links

> List and Search all tracked links

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListLinks.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicBitlyLink"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicBitlyLink":{"type":"object","properties":{"id":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"longUrl":{"type":"string"},"shortUrl":{"type":"string"},"finalUrl":{"type":"string","nullable":true},"trackingEnabled":{"type":"boolean"},"isMms":{"type":"boolean"},"clicks":{"type":"number"},"tags":{"type":"array","items":{"$ref":"#/components/schemas/IPublicLinkTag"}}},"required":["id","created","longUrl","shortUrl","trackingEnabled","isMms","clicks","tags"]},"IPublicLinkTag":{"type":"object","properties":{"id":{"type":"number"},"tag":{"type":"string"}},"required":["id","tag"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links":{"get":{"tags":["Links"],"summary":"List and Search all tracked links","operationId":"links_get_links","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListLinks.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"linkIds":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":[]}},{"name":"tags","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```

## GET /links/{linkId}/clicks

> Get a tracked link by ID

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetLinkClicks.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicLinkClick"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicLinkClick":{"type":"object","properties":{"name":{"type":"string"},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"subscriberId":{"type":"number"},"dateClicked":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["name","number","subscriberId","dateClicked"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links/{linkId}/clicks":{"get":{"tags":["Links"],"summary":"Get a tracked link by ID","operationId":"links_get_link_clicks","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetLinkClicks.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"linkId","in":"path","required":true,"schema":{"type":"string"}},{"name":"excludeSimilarLinks","in":"query","required":false,"schema":{"type":"boolean"}}]}}}}
```

## POST /links/validate-subdomain

> Validate Subdomain

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ValidateSubdomain.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ValidateSubdomain.Request":{"type":"object","properties":{"subdomain":{"type":"string"}},"required":["subdomain"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links/validate-subdomain":{"post":{"tags":["Links"],"summary":"Validate Subdomain","operationId":"links_validate_subdomain","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSubdomain.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSubdomain.Request"}}},"required":true}}}}}
```

## POST /links/subdomain

> Update Subdomain

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ValidateSubdomain.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ValidateSubdomain.Request":{"type":"object","properties":{"subdomain":{"type":"string"}},"required":["subdomain"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/links/subdomain":{"post":{"tags":["Links"],"summary":"Update Subdomain","operationId":"links_update_subdomain","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSubdomain.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateSubdomain.Request"}}},"required":true}}}}}
```


# Scheduled Messages

* Get Scheduled Message [#get-scheduled-scheduledmessageid](#get-scheduled-scheduledmessageid "mention")
* Update Scheduled Message [#patch-scheduled-scheduledmessageid](#patch-scheduled-scheduledmessageid "mention")
* Delete Scheduled Message [#post-scheduled-scheduledmessageid](#post-scheduled-scheduledmessageid "mention")
* List Scheduled Messages [#get-scheduled](#get-scheduled "mention")

### Scheduled Messages Management

* Get Message Schedule Calendar [#get-scheduled-calendar-year-month](#get-scheduled-calendar-year-month "mention")
* Get Scheduled Message Recipients [#get-scheduled-scheduledmessageid-recipients](#get-scheduled-scheduledmessageid-recipients "mention")
* Delete Scheduled Messages for Number [#delete-scheduled-number-number](#delete-scheduled-number-number "mention")

## GET /scheduled/{scheduledMessageId}

> Get Scheduled Message

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetScheduledMessage.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicScheduledMessage"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicScheduledMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"numberIds":{"type":"array","items":{"type":"string","nullable":true}},"subscriberIds":{"type":"array","items":{"type":"number","nullable":true}},"groupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"allSubscribers":{"type":"number"},"message":{"type":"string"},"url":{"type":"string","nullable":true},"scheduledDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"repeatMessage":{"type":"number"},"repeatDays":{"type":"array","items":{"type":"number","nullable":true}},"repeatMonthType":{"type":"string","nullable":true},"excludedGroupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"header":{"type":"string"},"footer":{"type":"string"},"threadId":{"type":"number"},"filterClicks":{"type":"number"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"recipients":{"type":"string"},"isMMS":{"type":"boolean"},"longcodeId":{"type":"number","nullable":true},"longcode":{"type":"number"},"userId":{"type":"number","nullable":true},"userDescription":{"type":"string"},"customRepeatFrequencyType":{"type":"number","nullable":true},"customRepeatFrequency":{"type":"number","nullable":true},"customRepeatDays":{"type":"array","items":{"type":"number","nullable":true}},"customEndMessageType":{"type":"number","nullable":true},"customEndMessageDate":{"type":"string","nullable":true},"customEndMessageOccurrences":{"type":"number","nullable":true}},"required":["id","accountId","numberIds","groupIds","allSubscribers","message","scheduledDate","timestamp","repeatMessage","header","footer","threadId","filterClicks","isMMS"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled/{scheduledMessageId}":{"get":{"tags":["Scheduled Messages"],"summary":"Get Scheduled Message","operationId":"scheduled_messages_get_scheduled_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScheduledMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"scheduledMessageId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /scheduled/{scheduledMessageId}

> Update Scheduled Message

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateScheduledMessage.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicScheduledMessage"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicScheduledMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"numberIds":{"type":"array","items":{"type":"string","nullable":true}},"subscriberIds":{"type":"array","items":{"type":"number","nullable":true}},"groupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"allSubscribers":{"type":"number"},"message":{"type":"string"},"url":{"type":"string","nullable":true},"scheduledDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"repeatMessage":{"type":"number"},"repeatDays":{"type":"array","items":{"type":"number","nullable":true}},"repeatMonthType":{"type":"string","nullable":true},"excludedGroupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"header":{"type":"string"},"footer":{"type":"string"},"threadId":{"type":"number"},"filterClicks":{"type":"number"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"recipients":{"type":"string"},"isMMS":{"type":"boolean"},"longcodeId":{"type":"number","nullable":true},"longcode":{"type":"number"},"userId":{"type":"number","nullable":true},"userDescription":{"type":"string"},"customRepeatFrequencyType":{"type":"number","nullable":true},"customRepeatFrequency":{"type":"number","nullable":true},"customRepeatDays":{"type":"array","items":{"type":"number","nullable":true}},"customEndMessageType":{"type":"number","nullable":true},"customEndMessageDate":{"type":"string","nullable":true},"customEndMessageOccurrences":{"type":"number","nullable":true}},"required":["id","accountId","numberIds","groupIds","allSubscribers","message","scheduledDate","timestamp","repeatMessage","header","footer","threadId","filterClicks","isMMS"]},"UpdateScheduledMessage.Request":{"$ref":"#/components/schemas/Partial-IScheduledMessageRequest"},"Partial-IScheduledMessageRequest":{"type":"object","properties":{"message":{"type":"string"},"numberIds":{"type":"array","items":{"type":"number"}},"groupIds":{"type":"array","items":{"type":"number"}},"allSubscribers":{"type":"boolean"},"scheduledDate":{"type":"string"},"image":{"type":"string","nullable":true},"repeatMessage":{"type":"number"},"repeatDays":{"type":"array","items":{"type":"number","nullable":true}},"repeatMonthType":{"type":"string","nullable":true},"excludedGroupIds":{"type":"array","items":{"type":"number"}},"header":{"type":"string"},"footer":{"type":"string"},"isMMS":{"type":"boolean"},"repeat":{"$ref":"#/components/schemas/IMessageRepeat"},"templateId":{"type":"number"},"longcodeId":{"type":"number"},"customRepeatFrequencyType":{"type":"number","nullable":true},"customRepeatFrequency":{"type":"number","nullable":true},"customRepeatDays":{"type":"array","items":{"type":"number","nullable":true}},"customEndMessageType":{"type":"number","nullable":true},"customEndMessageDate":{"type":"string","nullable":true},"customEndMessageOccurrences":{"type":"number","nullable":true}}},"IMessageRepeat":{"allOf":[{"type":"object","properties":{"monday":{"type":"boolean"},"tuesday":{"type":"boolean"},"wednesday":{"type":"boolean"},"thursday":{"type":"boolean"},"friday":{"type":"boolean"},"saturday":{"type":"boolean"},"sunday":{"type":"boolean"},"type":{"$ref":"#/components/schemas/RepeatMonthType"},"frequency":{"$ref":"#/components/schemas/RepeatFrequency"}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday","type","frequency"]},{"type":"object","additionalProperties":{}}]},"RepeatMonthType":{"type":"string","enum":["week","month"]},"RepeatFrequency":{"format":"int32","type":"number","enum":[-1,1,2,3,4,5]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled/{scheduledMessageId}":{"patch":{"tags":["Scheduled Messages"],"summary":"Update Scheduled Message","operationId":"scheduled_messages_update_scheduled_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduledMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateScheduledMessage.Request"}}},"required":true},"parameters":[{"name":"scheduledMessageId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## POST /scheduled/{scheduledMessageId}

> Delete Scheduled Message

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteScheduledMessage.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"DeleteScheduledMessage.Request":{"type":"object","properties":{"isMMS":{"type":"boolean"},"skippedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled/{scheduledMessageId}":{"post":{"tags":["Scheduled Messages"],"summary":"Delete Scheduled Message","operationId":"scheduled_messages_delete_scheduled_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteScheduledMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteScheduledMessage.Request"}}},"required":true},"parameters":[{"name":"scheduledMessageId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /scheduled

> List Scheduled Messages

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListScheduledMessages.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicScheduledMessage"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicScheduledMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"numberIds":{"type":"array","items":{"type":"string","nullable":true}},"subscriberIds":{"type":"array","items":{"type":"number","nullable":true}},"groupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"allSubscribers":{"type":"number"},"message":{"type":"string"},"url":{"type":"string","nullable":true},"scheduledDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"repeatMessage":{"type":"number"},"repeatDays":{"type":"array","items":{"type":"number","nullable":true}},"repeatMonthType":{"type":"string","nullable":true},"excludedGroupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"header":{"type":"string"},"footer":{"type":"string"},"threadId":{"type":"number"},"filterClicks":{"type":"number"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"recipients":{"type":"string"},"isMMS":{"type":"boolean"},"longcodeId":{"type":"number","nullable":true},"longcode":{"type":"number"},"userId":{"type":"number","nullable":true},"userDescription":{"type":"string"},"customRepeatFrequencyType":{"type":"number","nullable":true},"customRepeatFrequency":{"type":"number","nullable":true},"customRepeatDays":{"type":"array","items":{"type":"number","nullable":true}},"customEndMessageType":{"type":"number","nullable":true},"customEndMessageDate":{"type":"string","nullable":true},"customEndMessageOccurrences":{"type":"number","nullable":true}},"required":["id","accountId","numberIds","groupIds","allSubscribers","message","scheduledDate","timestamp","repeatMessage","header","footer","threadId","filterClicks","isMMS"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled":{"get":{"tags":["Scheduled Messages"],"summary":"List Scheduled Messages","operationId":"scheduled_messages_list_scheduled_messages","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListScheduledMessages.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":[]}}]}}}}
```

## GET /scheduled/calendar/{year}/{month}

> Get Scheduled Message Calendar

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetScheduledMessageCalendar.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"day":{"type":"string"},"messages":{"type":"array","items":{"$ref":"#/components/schemas/IPublicScheduledMessage"}}},"required":["day","messages"],"description":"GetScheduledMessageCalendar.Entry"}}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicScheduledMessage":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"numberIds":{"type":"array","items":{"type":"string","nullable":true}},"subscriberIds":{"type":"array","items":{"type":"number","nullable":true}},"groupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"allSubscribers":{"type":"number"},"message":{"type":"string"},"url":{"type":"string","nullable":true},"scheduledDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"repeatMessage":{"type":"number"},"repeatDays":{"type":"array","items":{"type":"number","nullable":true}},"repeatMonthType":{"type":"string","nullable":true},"excludedGroupIds":{"oneOf":[{"type":"array","items":{"type":"string"}},{"type":"string"}]},"header":{"type":"string"},"footer":{"type":"string"},"threadId":{"type":"number"},"filterClicks":{"type":"number"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"recipients":{"type":"string"},"isMMS":{"type":"boolean"},"longcodeId":{"type":"number","nullable":true},"longcode":{"type":"number"},"userId":{"type":"number","nullable":true},"userDescription":{"type":"string"},"customRepeatFrequencyType":{"type":"number","nullable":true},"customRepeatFrequency":{"type":"number","nullable":true},"customRepeatDays":{"type":"array","items":{"type":"number","nullable":true}},"customEndMessageType":{"type":"number","nullable":true},"customEndMessageDate":{"type":"string","nullable":true},"customEndMessageOccurrences":{"type":"number","nullable":true}},"required":["id","accountId","numberIds","groupIds","allSubscribers","message","scheduledDate","timestamp","repeatMessage","header","footer","threadId","filterClicks","isMMS"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled/calendar/{year}/{month}":{"get":{"tags":["Scheduled Messages"],"summary":"Get Scheduled Message Calendar","operationId":"scheduled_messages_get_scheduled_message_calendar","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScheduledMessageCalendar.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"repeating":{"type":"string"}},"required":[]}},{"name":"year","in":"path","required":true,"schema":{"type":"string"}},{"name":"month","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /scheduled/{scheduledMessageId}/recipients

> Get Scheduled Message Recipients

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetScheduledMessageRecipients.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"number":{"oneOf":[{"type":"string"},{"type":"number"}]},"email":{"type":"string"},"groupName":{"type":"string"},"memberCount":{"type":"number"}},"required":["id"],"description":"GetScheduledMessageRecipients.IScheduledMessageRecipients"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled/{scheduledMessageId}/recipients":{"get":{"tags":["Scheduled Messages"],"summary":"Get Scheduled Message Recipients","operationId":"scheduled_messages_get_scheduled_message_recipients","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetScheduledMessageRecipients.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"scheduledMessageId","in":"path","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```

## DELETE /scheduled/number/{number}

> Delete Scheduled Messages for Number

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteScheduledMessagesForNumber.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/scheduled/number/{number}":{"delete":{"tags":["Scheduled Messages"],"summary":"Delete Scheduled Messages for Number","operationId":"scheduled_messages_delete_scheduled_messages_for_number","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteScheduledMessagesForNumber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```


# Send

* Send Message from API [#post-send](#post-send "mention")

### Sending Utilities

* Validate Recipients [#post-send-validate-recipients](#post-send-validate-recipients "mention")
* Shorten Message [#post-send-shorten-message](#post-send-shorten-message "mention")
* Get Message Cost [#post-send-cost](#post-send-cost "mention")
* Get Message Delivery Time [#post-send-messaging-speeds](#post-send-messaging-speeds "mention")

## Send Message from API

> \# Overview\
> \
> \## Request Fields\
> \
> \- \`message: string\`\
> \
> &#x20;   \- The body of the message.\
> \
> \- \`image: string\`\
> \
> &#x20;   \- An attachment for the message in the form of a URL.\
> \
> &#x20;   \- See \[Send as MMS]\(#send-as-mms) for more details.\
> \
> \- \`rehost: boolean\`\
> \
> &#x20;   \- An indicator to specify if the attached image should be rehosted by MTA before being sent.\
> \
> &#x20;   \- See \[Send as MMS]\(#send-as-mms) for more details.\
> \
> \- \`templateId: number\`\
> \
> &#x20;   \- A template id corresponding to the controlled template that should be used as the body of the message.\
> \
> \- \`linkId: number\`\
> \
> &#x20;   \- If the message content is specified using a \`templateId\` and the template includes a link, this field is used to find the correspinding link.\
> \
> \- \`subscriberIds: number\[]\`\
> \
> &#x20;   \- A list of subscriber ids to send the message to.\
> \
> \- \`subscribers: (number | string)\[]\`\
> \
> &#x20;   \- A list of phone numbers and/or emails to send the message to. Phone numbers can be provided in the number or string type.\
> \
> \- \`allSubscribers: boolean\`\
> \
> &#x20;   \- An indicator to send the message to all subscribers if true.\
> \
> &#x20;   \- Default: \`false\`.\
> \
> \- \`groups: number\[]\`\
> \
> &#x20;   \- A list of group ids to send the message to.\
> \
> \- \`threadId: number\`\
> \
> &#x20;   \- A thread id to send the message to.\
> \
> \- \`isMMS: boolean\`\
> \
> &#x20;   \- An indicator to send the message as MMS instead of SMS.\
> \
> &#x20;   \- Default behavior: False for messages without an attachment. True for messages with an attachment.\
> \
> &#x20;   \- See \[Send as MMS]\(#send-as-mms) for more details.\
> \
> \- \`header: string\`\
> \
> &#x20;   \- A message to include before the message body. A newline will be added between the header and message body.\
> \
> \- \`footer: string\`\
> \
> &#x20;   \- A message to include at the end of the message body. A space will be added between the message body and footer.\
> \
> \- \`longcodeId: number\`\
> \
> &#x20;   \- The longcode id corresponding to the dedicated number to send the message from.\
> \
> \- \`senderName: string\`\
> \
> &#x20;   \- If your account is enabled for iMessage sending, specify your desired sender name using this field.\
> \
> \- \`externalId: string\`\
> \
> &#x20;   \- An external id to include with the metadata of your message. The \`externalId\` will be included in webhook notifications.\
> \
> \- \`properties: { \[key: string]: string }\`\
> \
> &#x20;   \- Properties are used to populate the liquid template variables in your message.\
> \
> &#x20;   \- See \[Using Properties]\(#using-properties) for details.\
> \
> \- \`scheduledDate: string\`\
> \
> &#x20;   \- The date and time a message should be scheduled to send.\
> \
> &#x20;   \- Must be in ISO8601 format (eg. "20230302T173000-0500").\
> \
> \- \`repeat: IRepeat\`\
> \
> &#x20;   \- If a scheduled message should go out repeatedly, \`repeat\` indicates how.\
> \
> &#x20;   \- Default behavior: If \`repeat\` is not provided, the scheduled message will not repeat.\
> \
> &#x20;   \- \`\`\`typescript\
> &#x20;     interface IRepeat {\
> &#x20;         monday: boolean;\
> &#x20;         tuesday: boolean;\
> &#x20;         wednesday: boolean;\
> &#x20;         thursday: boolean;\
> &#x20;         friday: boolean;\
> &#x20;         saturday: boolean;\
> &#x20;         sunday: boolean;\
> &#x20;         type: "week" | "month";\
> &#x20;         frequency: RepeatFrequency;\
> &#x20;     }\
> &#x20;     \`\`\`\
> \
> &#x20;   \- \`\`\`typescript\
> &#x20;     enum RepeatFrequency {\
> &#x20;         NEVER = 0,\
> &#x20;         DAILY = 1,\
> &#x20;         WEEKLY = 2,\
> &#x20;         BIWEEKLY = 3,\
> &#x20;         MONTHLY = 4,\
> &#x20;         ANNUALLY = 5\
> &#x20;     }\
> &#x20;     \`\`\`\
> \
> \- \`tags\`\
> \
> &#x20;   \- Tags is a map of custom data to be included with your webhook notifications.\
> \
> \
> \## Required Fields\
> \
> \- Content to Send: One of the following\
> \
> &#x20;   \- \`message\`\
> \
> &#x20;   \- \`image\`\
> \
> &#x20;   \- \`templateId\`\
> \
> \- Recipients: One of the following\
> \
> &#x20;   \- \`subscriberIds\`\
> \
> &#x20;   \- \`subscribers\`\
> \
> &#x20;   \- \`allSubscribers\`\
> \
> &#x20;   \- \`groups\`\
> \
> &#x20;   \- \`threadId\`\
> \
> \- If \`templateId\` is used and corresponds to a template that requires a link, \`linkId\` is required.\
> \
> \
> \## Notes\
> \
> \- The \`subscribers\` field is a list of recipient phone numbers or email addresses. If a provided recipient is not already a subscriber on your account, one will be created.\
> \
> \- Messages will be sent to a subscriber's phone number if one is set, otherwise, the message will be sent to the subscriber via email.\
> \
> \
> \# Features\
> \
> \## Send to All Subscribers\
> \
> The \`allSubscribers\` request field can be set to \`true\` in order to send the message to all subscribers. When \`allSubscribers\` is set to \`true\`, no other recipient fields should be specified.\
> \
> \## Send as MMS\
> \
> A message with an attachment (\`image\`) will be sent as MMS by default. A messages without an attachment will be sent as SMS by default. A message without an attachment can be sent as MMS by setting the \`isMMS\` request field to \`true\`.\
> \
> If the \`rehost\` flag is provided and is set to \`true\`, the attachment will be rehosted on an MTA server before being sent to the recipients. You may prefer to do this in the event that the recipient isn't receiving your attachment or you simply don't want to host the attachment yourself.\
> \
> \### Credit Costs\
> \
> \- SMS messages cost 1 credit per 160 characters\
> \
> \- MMS messages cost 3 credits\
> \
> \
> \## Template-Only Sending\
> \
> \- Accounts configured for template-only sending should provide a \`templateId\` rather than a message.\
> \
> \- If the template corresponding to \`templateId\` requires a link, a \`linkId\` should also be provided.\
> \
> \- All available controlled templates can be queried via the \[Controlled Template]\(<https://docs.mobile-text-alerts.com/#8a6c8f75-ee31-4af1-8788-2b60353c3fdd>) endpoints.\
> \
> \- Links can be created using the \[Create Short Link]\(<https://docs.mobile-text-alerts.com/#07b764b8-59f7-4bdf-a18e-acf4af15a429>) endpoint.\
> \
> \
> \## Using Properties\
> \
> By inserting one or more Liquid Template variables into your message and using the \`properties\` field, you can send a unique message to each subscriber with a single API call.\
> \
> The \`properties\` field is a map between the individual subscribers you're sending your message to, and the values of the variables in your message.\
> \
> Example:\
> \
> \`\`\`json\
> {\
> &#x20;   "subscribers": \["3175551111", "3175552222"],\
> &#x20;   "message": "Hello {{firstName}}! Visit {{link}}",\
> &#x20;   "properties": {\
> &#x20;       "3175551111": {\
> &#x20;           "firstName": "Bob",\
> &#x20;           "link": "<https://example.com/abc"\\>
> &#x20;       },\
> &#x20;       "3175552222": {\
> &#x20;           "firstName": "Tony",\
> &#x20;           "link": "<https://example.com/def"\\>
> &#x20;       }\
> &#x20;   }\
> }\
> \`\`\`\
> \
> \## Duplicate Requests (Idempotency)\
> \
> The send endpoint is idempotent which means that it handles de-duplicating requests in the event of networking issues or other issues that might cause a request to be in an unknown state.\
> \
> When sending your request to the endpoint, simply include an \`X-Request-Id\` header with an alphanumeric value. If you're unsure if the request succeeded or not, you can simply re-send the request with the same \`X-Request-Id\` and the send endpoint will detect if it's a duplicate or not.\
> \
> If the request is a duplicate, you'll receive a \`409 Conflict\` error response.\
> \
> \# iMessage Sending\
> \
> \## Introduction\
> \
> \_Please Note: This feature is currently in\_ \_\*\*beta\*\*\_ \_and is not yet generally available. If you're interested in sending iMessages and want to participate in our beta program, please reach out to your account manager to notify them of your interest.\_\
> \
> \### What is iMessage?\
> \
> iMessage is an Apple designed and built messaging service available to users of iOS, iPadOS, macOS and watchOS devices. Users can send and receive messages with each other, much like they can via SMS, MMS or email and it is widely known for its "blue bubbles". Apple has designed iMessage to be a secure message ecosystem thus increasing user trust when they send and receive iMessages. It is estimated that there are over 1 billion iMessage users across the globe.\
> \
> \### Why send via iMessage?\
> \
> Due to the security features and ubiquity of iMessage, it has quickly become a highly trusted method of communication for users around the globe. As a result, you can expect to have broader reach and better engagement from those recipients that you contact via iMessage using an identity that is synonymous with your brand (see below). iMessage also has a much higher throughput in terms of media sizes for attachments, enabling higher resolution photos and even videos.\
> \
> \---\
> \
> \## Sender Identities\
> \
> When communicating with subscribers via iMessage, you'll use a unique, dedicated "Sender Identity" that helps identify your brand.\
> \
> \### What is a Sender Identity?\
> \
> A Sender Identity is the sequence of characters that appears at the top of an iMessage conversation when you send a message to any of your iMessage enabled recipients. In other words, it is the "contact" that your recipients will receive messages from and reply to when interacting with your brand via iMessage. Sender Identities look like an email address and consist of the sending name and a domain. When sending messages via Mobile Text Alerts, you can use one or more Sender Identities to send iMessages and can select which to use in the same way you select an outbound longcode for SMS messaging.\
> \
> \### Provisioning and Using Sender Identities\
> \
> Upon enrollment in the iMessage sending program, a Sender Identity will be provisioned for your account. You'll be able to supply a desired name for your Sender Identity but it will come with a preconfigured domain that we've configured and verified for iMessage sending. Mobile Text Alerts also provides support for Custom Domains for Sender Identities (more below). You can request additional Sender Identities be provisioned for your account. It may take up to 3 days to complete the provisioning process depending on the number of identities requested. Once provisioned, our team will attach each Sender Identity to an outbound longcode on your account. When sending messages, selection of a particular longcode will correspond to a particular Sender Identity. If Mobile Text Alerts detects that a recipient is iMessage enabled, it will use the Sender Identity associated with the outbound longcode and send via iMessage instead of SMS.\
> \
> \### Custom Domains\
> \
> Mobile Text Alerts is capable of supporting custom domains for your Sender Identities but it requires some additional configuration and set up before you can begin using them. When you submit a request for a Custom Domain to our team, we will discuss and identify the particular domain you'd like to use. Depending on your particular use case, Mobile Text Alerts will either purchase and maintain the domain on your behalf, or you can purchase one and provide it to us. We'll need to configure a few DNS entries to properly set up your custom domain. Once initial configuration is complete, you can provision all future Sender Identities using this domain.\
> \
> \---\
> \
> \## Subscriber Opt In\
> \
> As with SMS, capturing the proper consent and opt-ins from your recipients is critical to the successful usage of the iMessage capabilities offered by Mobile Text Alerts. Capturing opt-ins ensures that your recipients are expecting to hear from you via iMessage and it gives you an opportunity to identify yourself to the recipient. In doing so, you can be sure that your messages are safely delivered without being marked as spam by the recipient.\
> \
> \### iMessage Opt In\
> \
> In order to send iMessages to your recipients, you \*\*must\*\* receive an inbound opt-in message from them before you send your first outbound message. Regardless of whether an opt-in was collected for communications via SMS or email, an explicit iMessage opt-in is required. This can be as simple as sending in "Sign me up" to your Sender Identity one time. Mobile Text Alerts provides a useful feature for accomplishing this and automatically tracks iMessage opt-ins for you when using this system: deeplinks.\
> \
> \### Deeplinks\
> \
> A deeplink looks and works like any other website link but behaves differently depending on the user's browser, device or operating system. Mobile Text Alerts provides a powerful deeplinking technology that can both identify if a recipient is capable of sending iMessages and link to a prompt to send their first inbound opt-in message to your Sender Identity. A Mobile Text Alerts deeplink works like this:\
> \
> 1\. Generate your iMessage opt-in deeplink, which will look like this: \`<https://mobile-text-alerts.com/deeplink/abcd1234\\`\\>
> \
> 2\. Through a method of your choice, direct your subscribers to this deeplink. For example, you could send an SMS campaign from Mobile Text Alerts that announces your customers can now receive iMessages from you by clicking the link (which is your deeplink from Step 1)\
> \
> 3\. When a recipient clicks this link, Mobile Text Alerts with automatically detect whether they can send/receive iMessages.\
> \
> 4\. If they can send/receive iMessages, Mobile Text Alerts will redirect them to a special iMessage specific link (ex\`imessage://yoursenderidentity\@your-imsg-domain.com\&body=Signup\`) which launches iMessage and prefills their opt-in message. All they have to do is hit send.\
> \
> 5\. If they cannot send/receive iMessages (for example, the link was opened on an Android phone or the web), the deeplink will gracefully redirect them to a context-sensible location (launch the SMS app instead, show a web opt-in form etc.)\
> \
> \
> If you choose to prompt your recipients for iMessage opt-ins via another method, you can still use the special \`imessage://\` style URL to launch the iMessage app and prefill the message.\
> \
> \### Sending Outbound Messages First\
> \
> Mobile Text Alerts presently doesn't allow outbound messages to be sent to recipients before receiving an inbound opt-in message from them. As a result, messages can only be sent via iMessage to recipients that have explicitly completed the opt-in flow. This provides the best protection for your Sender Identities. Recipients are naturally wary of receiving unsolicited messages through iMessage since it is a peer to peer messaging system primarily. Apple may even prompt the user with a "Report Junk" warning for outbound messages received without an explicit inbound message from the recipient. These reports can result in your Sender Identity being blocked or disabled, which will directly impact your ability to deliver messages via iMessage. Our opt-in requirement provides the best possible protection for your Sender Identities.\
> \
> \#### Are there ways to send outbound messages first via iMessage?\
> \
> In certain uncommon cases, the restriction on requiring an inbound opt-in can be relaxed for individual Sender Identities, after careful review by our team. As described above, this significantly increases the risk of impact on delivery rates for that Sender Identity and in making a request to lift this restriction, you are accepting that increased risk. Our team will only consider these requests for pre-existing Sender Identities that have already been in use. Our evaluation will look at the age of the Sender Identity (min 3 months old), number of active conversations and overall inbound message reply rates and it is not guaranteed that a Sender Identity will be approved for outbound-first messaging.\
> \
> \---\
> \
> \## Message Sending\
> \
> Once your subscribers begin opting-in to receiving iMessages, you're ready to begin sending to them. As mentioned above, Mobile Text Alerts will automatically capture and record the inbound opt-in messages and internally flag your subscribers as iMessage enabled and opted-in. Remember, opt-ins are tied to a specific Sender Identity, so you must receive inbound consent from a subscriber on each Sender Identity you plan to use to send messages to them. When sending messages via API, you'll specify a Sender Identity (more on that below) and Mobile Text Alerts will handle routing messages intelligently based on current subscriber status. For those subscibers included in a \`/send\` call, the system will examine whether they are enabled for iMessage and will route messages through your Sender Identity if so. The system also handles graceful fallback to SMS (also more on that further below).\
> \
> \### Specifying a Sender Identity\
> \
> When making \`/send\` API calls, you won't need to adjust much in order to send messages via iMessage. If you've completed all the necessary configuration and set up steps, you should have a Sender Identity that is attached to one of your existing outbound longcodes used for SMS/MMS. Your API calls will continue to supply a \`longcodeId\` and when that longcode has an associated iMessage Sender Identity, Mobile Text Alerts will use that identity for iMessage enabled recipients. This structure enables minimial change necessary to start using the iMessage route and provides flexibility to manage Sender Identities like you currently manage longcodes.\
> \
> \### SMS Fallback\
> \
> The iMessage route also supports graceful fallback for a number of failure scenarios. An outbound iMessage may fail for any of the following reasons:\
> \
> \- The subscriber is not capable of receiving iMessages\
> \
> \- The subscriber has not opted-in via inbound message to the selected Sender Identity\
> \
> \- The Sender Identity has been disabled, blocked, or banned\
> \
> \- Our iMessage route is temporarily unavailable\
> \
> \
> If any of these failures occur, Mobile Text Alerts will fall back gracefully to SMS in order to deliver your message. In this way, you can have the confidence that your subscriber will always receive your message, even if there's an issue preventing us from using iMessage to deliver that particular message.\
> \
> \### Webhooks\
> \
> When sending messages via the iMessage route, you can expect to receive webhooks from Mobile Text Alerts consistent with other messaging routes such as SMS. For messages routed via iMessage, you will receive delivery status callbacks as the message's status changes through the process of sending. When inbound messages are sent in to your Sender Identities, Mobile Text Alerts will deliver message reply webhooks consistent with inbound SMS messages. For more information on configuring webhooks for your account, please see the \[Webhooks]\(<https://docs.mobile-text-alerts.com/#a87529ee-01b1-4ef8-a48e-d6234ad0517f>) section of our documentation.\
> \
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`25\` requests every \`15\` seconds

````json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"SendMessage.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"messageId":{"type":"string"},"totalSent":{"type":"number"},"totalFailedInternationalRecipients":{"type":"number"},"outboundIds":{"type":"array","items":{"type":"number"}}},"required":["totalSent","totalFailedInternationalRecipients"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"SendMessage.Request":{"type":"object","properties":{"groups":{"type":"array","items":{"type":"number"}},"subscribers":{"type":"array","items":{"oneOf":[{"type":"number"},{"type":"string"}]}},"subscriberIds":{"type":"array","items":{"type":"number"}},"allSubscribers":{"type":"boolean"},"excludedGroupIds":{"type":"array","items":{"type":"number"}},"threadId":{"type":"number"},"message":{"type":"string"},"image":{"type":"string"},"rehost":{"type":"boolean"},"externalId":{"type":"string"},"scheduledDate":{"type":"string"},"header":{"type":"string"},"footer":{"type":"string"},"properties":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}}},"isMMS":{"type":"boolean"},"repeat":{"$ref":"#/components/schemas/IMessageRepeat"},"linkClickDays":{"type":"number"},"templateId":{"type":"number"},"linkId":{"type":"number"},"longcodeId":{"type":"number"},"eventId":{"type":"string"},"skipHeaderFooter":{"type":"boolean"},"addPlaceholder":{"type":"boolean"},"source":{"$ref":"#/components/schemas/SendRequestSource"},"userSignature":{"type":"string"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"poolId":{"type":"string"},"userId":{"type":"number"},"senderName":{"type":"string"},"exactSender":{"type":"boolean"},"customRepeatFrequencyType":{"type":"number","nullable":true},"customRepeatFrequency":{"type":"number","nullable":true},"customRepeatDays":{"allOf":[{"$ref":"#/components/schemas/IRepeatDays"},{"$ref":"#/components/schemas/NullReference"}]},"customEndMessageType":{"type":"number","nullable":true},"customEndMessageDate":{"type":"string","nullable":true},"customEndMessageOccurrences":{"type":"number","nullable":true},"gated":{"type":"boolean"},"brandImage":{"type":"string"}},"required":["message"]},"IMessageRepeat":{"allOf":[{"type":"object","properties":{"monday":{"type":"boolean"},"tuesday":{"type":"boolean"},"wednesday":{"type":"boolean"},"thursday":{"type":"boolean"},"friday":{"type":"boolean"},"saturday":{"type":"boolean"},"sunday":{"type":"boolean"},"type":{"$ref":"#/components/schemas/RepeatMonthType"},"frequency":{"$ref":"#/components/schemas/RepeatFrequency"}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday","type","frequency"]},{"type":"object","additionalProperties":{}}]},"RepeatMonthType":{"type":"string","enum":["week","month"]},"RepeatFrequency":{"format":"int32","type":"number","enum":[-1,1,2,3,4,5]},"SendRequestSource":{"type":"string","enum":["control-panel","php-api","platform","node-api","ios-app","android-app","shopify-app","node-inbox","php-inbox","zipwhip-sync","scheduled","hooks","workflow","webinars","chatbot","hubspot-sync"]},"IRepeatDays":{"type":"object","properties":{"monday":{"type":"boolean"},"tuesday":{"type":"boolean"},"wednesday":{"type":"boolean"},"thursday":{"type":"boolean"},"friday":{"type":"boolean"},"saturday":{"type":"boolean"},"sunday":{"type":"boolean"}},"required":["monday","tuesday","wednesday","thursday","friday","saturday","sunday"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/send":{"post":{"tags":["Send"],"summary":"Send Message from API","description":"# Overview\n\n## Request Fields\n\n- `message: string`\n\n    - The body of the message.\n\n- `image: string`\n\n    - An attachment for the message in the form of a URL.\n\n    - See [Send as MMS](#send-as-mms) for more details.\n\n- `rehost: boolean`\n\n    - An indicator to specify if the attached image should be rehosted by MTA before being sent.\n\n    - See [Send as MMS](#send-as-mms) for more details.\n\n- `templateId: number`\n\n    - A template id corresponding to the controlled template that should be used as the body of the message.\n\n- `linkId: number`\n\n    - If the message content is specified using a `templateId` and the template includes a link, this field is used to find the correspinding link.\n\n- `subscriberIds: number[]`\n\n    - A list of subscriber ids to send the message to.\n\n- `subscribers: (number | string)[]`\n\n    - A list of phone numbers and/or emails to send the message to. Phone numbers can be provided in the number or string type.\n\n- `allSubscribers: boolean`\n\n    - An indicator to send the message to all subscribers if true.\n\n    - Default: `false`.\n\n- `groups: number[]`\n\n    - A list of group ids to send the message to.\n\n- `threadId: number`\n\n    - A thread id to send the message to.\n\n- `isMMS: boolean`\n\n    - An indicator to send the message as MMS instead of SMS.\n\n    - Default behavior: False for messages without an attachment. True for messages with an attachment.\n\n    - See [Send as MMS](#send-as-mms) for more details.\n\n- `header: string`\n\n    - A message to include before the message body. A newline will be added between the header and message body.\n\n- `footer: string`\n\n    - A message to include at the end of the message body. A space will be added between the message body and footer.\n\n- `longcodeId: number`\n\n    - The longcode id corresponding to the dedicated number to send the message from.\n\n- `senderName: string`\n\n    - If your account is enabled for iMessage sending, specify your desired sender name using this field.\n\n- `externalId: string`\n\n    - An external id to include with the metadata of your message. The `externalId` will be included in webhook notifications.\n\n- `properties: { [key: string]: string }`\n\n    - Properties are used to populate the liquid template variables in your message.\n\n    - See [Using Properties](#using-properties) for details.\n\n- `scheduledDate: string`\n\n    - The date and time a message should be scheduled to send.\n\n    - Must be in ISO8601 format (eg. \"20230302T173000-0500\").\n\n- `repeat: IRepeat`\n\n    - If a scheduled message should go out repeatedly, `repeat` indicates how.\n\n    - Default behavior: If `repeat` is not provided, the scheduled message will not repeat.\n\n    - ```typescript\n      interface IRepeat {\n          monday: boolean;\n          tuesday: boolean;\n          wednesday: boolean;\n          thursday: boolean;\n          friday: boolean;\n          saturday: boolean;\n          sunday: boolean;\n          type: \"week\" | \"month\";\n          frequency: RepeatFrequency;\n      }\n      ```\n\n    - ```typescript\n      enum RepeatFrequency {\n          NEVER = 0,\n          DAILY = 1,\n          WEEKLY = 2,\n          BIWEEKLY = 3,\n          MONTHLY = 4,\n          ANNUALLY = 5\n      }\n      ```\n\n- `tags`\n\n    - Tags is a map of custom data to be included with your webhook notifications.\n\n\n## Required Fields\n\n- Content to Send: One of the following\n\n    - `message`\n\n    - `image`\n\n    - `templateId`\n\n- Recipients: One of the following\n\n    - `subscriberIds`\n\n    - `subscribers`\n\n    - `allSubscribers`\n\n    - `groups`\n\n    - `threadId`\n\n- If `templateId` is used and corresponds to a template that requires a link, `linkId` is required.\n\n\n## Notes\n\n- The `subscribers` field is a list of recipient phone numbers or email addresses. If a provided recipient is not already a subscriber on your account, one will be created.\n\n- Messages will be sent to a subscriber's phone number if one is set, otherwise, the message will be sent to the subscriber via email.\n\n\n# Features\n\n## Send to All Subscribers\n\nThe `allSubscribers` request field can be set to `true` in order to send the message to all subscribers. When `allSubscribers` is set to `true`, no other recipient fields should be specified.\n\n## Send as MMS\n\nA message with an attachment (`image`) will be sent as MMS by default. A messages without an attachment will be sent as SMS by default. A message without an attachment can be sent as MMS by setting the `isMMS` request field to `true`.\n\nIf the `rehost` flag is provided and is set to `true`, the attachment will be rehosted on an MTA server before being sent to the recipients. You may prefer to do this in the event that the recipient isn't receiving your attachment or you simply don't want to host the attachment yourself.\n\n### Credit Costs\n\n- SMS messages cost 1 credit per 160 characters\n\n- MMS messages cost 3 credits\n\n\n## Template-Only Sending\n\n- Accounts configured for template-only sending should provide a `templateId` rather than a message.\n\n- If the template corresponding to `templateId` requires a link, a `linkId` should also be provided.\n\n- All available controlled templates can be queried via the [Controlled Template](https://docs.mobile-text-alerts.com/#8a6c8f75-ee31-4af1-8788-2b60353c3fdd) endpoints.\n\n- Links can be created using the [Create Short Link](https://docs.mobile-text-alerts.com/#07b764b8-59f7-4bdf-a18e-acf4af15a429) endpoint.\n\n\n## Using Properties\n\nBy inserting one or more Liquid Template variables into your message and using the `properties` field, you can send a unique message to each subscriber with a single API call.\n\nThe `properties` field is a map between the individual subscribers you're sending your message to, and the values of the variables in your message.\n\nExample:\n\n```json\n{\n    \"subscribers\": [\"3175551111\", \"3175552222\"],\n    \"message\": \"Hello {{firstName}}! Visit {{link}}\",\n    \"properties\": {\n        \"3175551111\": {\n            \"firstName\": \"Bob\",\n            \"link\": \"https://example.com/abc\"\n        },\n        \"3175552222\": {\n            \"firstName\": \"Tony\",\n            \"link\": \"https://example.com/def\"\n        }\n    }\n}\n```\n\n## Duplicate Requests (Idempotency)\n\nThe send endpoint is idempotent which means that it handles de-duplicating requests in the event of networking issues or other issues that might cause a request to be in an unknown state.\n\nWhen sending your request to the endpoint, simply include an `X-Request-Id` header with an alphanumeric value. If you're unsure if the request succeeded or not, you can simply re-send the request with the same `X-Request-Id` and the send endpoint will detect if it's a duplicate or not.\n\nIf the request is a duplicate, you'll receive a `409 Conflict` error response.\n\n# iMessage Sending\n\n## Introduction\n\n_Please Note: This feature is currently in_ _**beta**_ _and is not yet generally available. If you're interested in sending iMessages and want to participate in our beta program, please reach out to your account manager to notify them of your interest._\n\n### What is iMessage?\n\niMessage is an Apple designed and built messaging service available to users of iOS, iPadOS, macOS and watchOS devices. Users can send and receive messages with each other, much like they can via SMS, MMS or email and it is widely known for its \"blue bubbles\". Apple has designed iMessage to be a secure message ecosystem thus increasing user trust when they send and receive iMessages. It is estimated that there are over 1 billion iMessage users across the globe.\n\n### Why send via iMessage?\n\nDue to the security features and ubiquity of iMessage, it has quickly become a highly trusted method of communication for users around the globe. As a result, you can expect to have broader reach and better engagement from those recipients that you contact via iMessage using an identity that is synonymous with your brand (see below). iMessage also has a much higher throughput in terms of media sizes for attachments, enabling higher resolution photos and even videos.\n\n---\n\n## Sender Identities\n\nWhen communicating with subscribers via iMessage, you'll use a unique, dedicated \"Sender Identity\" that helps identify your brand.\n\n### What is a Sender Identity?\n\nA Sender Identity is the sequence of characters that appears at the top of an iMessage conversation when you send a message to any of your iMessage enabled recipients. In other words, it is the \"contact\" that your recipients will receive messages from and reply to when interacting with your brand via iMessage. Sender Identities look like an email address and consist of the sending name and a domain. When sending messages via Mobile Text Alerts, you can use one or more Sender Identities to send iMessages and can select which to use in the same way you select an outbound longcode for SMS messaging.\n\n### Provisioning and Using Sender Identities\n\nUpon enrollment in the iMessage sending program, a Sender Identity will be provisioned for your account. You'll be able to supply a desired name for your Sender Identity but it will come with a preconfigured domain that we've configured and verified for iMessage sending. Mobile Text Alerts also provides support for Custom Domains for Sender Identities (more below). You can request additional Sender Identities be provisioned for your account. It may take up to 3 days to complete the provisioning process depending on the number of identities requested. Once provisioned, our team will attach each Sender Identity to an outbound longcode on your account. When sending messages, selection of a particular longcode will correspond to a particular Sender Identity. If Mobile Text Alerts detects that a recipient is iMessage enabled, it will use the Sender Identity associated with the outbound longcode and send via iMessage instead of SMS.\n\n### Custom Domains\n\nMobile Text Alerts is capable of supporting custom domains for your Sender Identities but it requires some additional configuration and set up before you can begin using them. When you submit a request for a Custom Domain to our team, we will discuss and identify the particular domain you'd like to use. Depending on your particular use case, Mobile Text Alerts will either purchase and maintain the domain on your behalf, or you can purchase one and provide it to us. We'll need to configure a few DNS entries to properly set up your custom domain. Once initial configuration is complete, you can provision all future Sender Identities using this domain.\n\n---\n\n## Subscriber Opt In\n\nAs with SMS, capturing the proper consent and opt-ins from your recipients is critical to the successful usage of the iMessage capabilities offered by Mobile Text Alerts. Capturing opt-ins ensures that your recipients are expecting to hear from you via iMessage and it gives you an opportunity to identify yourself to the recipient. In doing so, you can be sure that your messages are safely delivered without being marked as spam by the recipient.\n\n### iMessage Opt In\n\nIn order to send iMessages to your recipients, you **must** receive an inbound opt-in message from them before you send your first outbound message. Regardless of whether an opt-in was collected for communications via SMS or email, an explicit iMessage opt-in is required. This can be as simple as sending in \"Sign me up\" to your Sender Identity one time. Mobile Text Alerts provides a useful feature for accomplishing this and automatically tracks iMessage opt-ins for you when using this system: deeplinks.\n\n### Deeplinks\n\nA deeplink looks and works like any other website link but behaves differently depending on the user's browser, device or operating system. Mobile Text Alerts provides a powerful deeplinking technology that can both identify if a recipient is capable of sending iMessages and link to a prompt to send their first inbound opt-in message to your Sender Identity. A Mobile Text Alerts deeplink works like this:\n\n1. Generate your iMessage opt-in deeplink, which will look like this: `https://mobile-text-alerts.com/deeplink/abcd1234`\n\n2. Through a method of your choice, direct your subscribers to this deeplink. For example, you could send an SMS campaign from Mobile Text Alerts that announces your customers can now receive iMessages from you by clicking the link (which is your deeplink from Step 1)\n\n3. When a recipient clicks this link, Mobile Text Alerts with automatically detect whether they can send/receive iMessages.\n\n4. If they can send/receive iMessages, Mobile Text Alerts will redirect them to a special iMessage specific link (ex`imessage://yoursenderidentity@your-imsg-domain.com&body=Signup`) which launches iMessage and prefills their opt-in message. All they have to do is hit send.\n\n5. If they cannot send/receive iMessages (for example, the link was opened on an Android phone or the web), the deeplink will gracefully redirect them to a context-sensible location (launch the SMS app instead, show a web opt-in form etc.)\n\n\nIf you choose to prompt your recipients for iMessage opt-ins via another method, you can still use the special `imessage://` style URL to launch the iMessage app and prefill the message.\n\n### Sending Outbound Messages First\n\nMobile Text Alerts presently doesn't allow outbound messages to be sent to recipients before receiving an inbound opt-in message from them. As a result, messages can only be sent via iMessage to recipients that have explicitly completed the opt-in flow. This provides the best protection for your Sender Identities. Recipients are naturally wary of receiving unsolicited messages through iMessage since it is a peer to peer messaging system primarily. Apple may even prompt the user with a \"Report Junk\" warning for outbound messages received without an explicit inbound message from the recipient. These reports can result in your Sender Identity being blocked or disabled, which will directly impact your ability to deliver messages via iMessage. Our opt-in requirement provides the best possible protection for your Sender Identities.\n\n#### Are there ways to send outbound messages first via iMessage?\n\nIn certain uncommon cases, the restriction on requiring an inbound opt-in can be relaxed for individual Sender Identities, after careful review by our team. As described above, this significantly increases the risk of impact on delivery rates for that Sender Identity and in making a request to lift this restriction, you are accepting that increased risk. Our team will only consider these requests for pre-existing Sender Identities that have already been in use. Our evaluation will look at the age of the Sender Identity (min 3 months old), number of active conversations and overall inbound message reply rates and it is not guaranteed that a Sender Identity will be approved for outbound-first messaging.\n\n---\n\n## Message Sending\n\nOnce your subscribers begin opting-in to receiving iMessages, you're ready to begin sending to them. As mentioned above, Mobile Text Alerts will automatically capture and record the inbound opt-in messages and internally flag your subscribers as iMessage enabled and opted-in. Remember, opt-ins are tied to a specific Sender Identity, so you must receive inbound consent from a subscriber on each Sender Identity you plan to use to send messages to them. When sending messages via API, you'll specify a Sender Identity (more on that below) and Mobile Text Alerts will handle routing messages intelligently based on current subscriber status. For those subscibers included in a `/send` call, the system will examine whether they are enabled for iMessage and will route messages through your Sender Identity if so. The system also handles graceful fallback to SMS (also more on that further below).\n\n### Specifying a Sender Identity\n\nWhen making `/send` API calls, you won't need to adjust much in order to send messages via iMessage. If you've completed all the necessary configuration and set up steps, you should have a Sender Identity that is attached to one of your existing outbound longcodes used for SMS/MMS. Your API calls will continue to supply a `longcodeId` and when that longcode has an associated iMessage Sender Identity, Mobile Text Alerts will use that identity for iMessage enabled recipients. This structure enables minimial change necessary to start using the iMessage route and provides flexibility to manage Sender Identities like you currently manage longcodes.\n\n### SMS Fallback\n\nThe iMessage route also supports graceful fallback for a number of failure scenarios. An outbound iMessage may fail for any of the following reasons:\n\n- The subscriber is not capable of receiving iMessages\n\n- The subscriber has not opted-in via inbound message to the selected Sender Identity\n\n- The Sender Identity has been disabled, blocked, or banned\n\n- Our iMessage route is temporarily unavailable\n\n\nIf any of these failures occur, Mobile Text Alerts will fall back gracefully to SMS in order to deliver your message. In this way, you can have the confidence that your subscriber will always receive your message, even if there's an issue preventing us from using iMessage to deliver that particular message.\n\n### Webhooks\n\nWhen sending messages via the iMessage route, you can expect to receive webhooks from Mobile Text Alerts consistent with other messaging routes such as SMS. For messages routed via iMessage, you will receive delivery status callbacks as the message's status changes through the process of sending. When inbound messages are sent in to your Sender Identities, Mobile Text Alerts will deliver message reply webhooks consistent with inbound SMS messages. For more information on configuring webhooks for your account, please see the [Webhooks](https://docs.mobile-text-alerts.com/#a87529ee-01b1-4ef8-a48e-d6234ad0517f) section of our documentation.\n\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `25` requests every `15` seconds","operationId":"send_send_message_from_api","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessage.Request"}}},"required":true}}}}}
````

## POST /send/validate-recipients

> Validate Recipients

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ValidateRecipients.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"validRecipients":{"type":"array","items":{"type":"object","properties":{"externalId":{"oneOf":[{"type":"number"},{"type":"string"}]},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"email":{"type":"string"}},"required":[],"description":"ValidateRecipients.IRecipient"}},"invalidRecipients":{"type":"array","items":{"allOf":[{"type":"object","properties":{"externalId":{"oneOf":[{"type":"number"},{"type":"string"}]},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"email":{"type":"string"}},"required":[],"description":"ValidateRecipients.IRecipient"},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}]}}},"required":["validRecipients","invalidRecipients"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ValidateRecipients.Request":{"type":"object","properties":{"recipients":{"type":"array","items":{"type":"object","properties":{"externalId":{"oneOf":[{"type":"number"},{"type":"string"}]},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"email":{"type":"string"}},"required":[],"description":"ValidateRecipients.IRecipient"}},"validateUnsubscribes":{"type":"boolean"}},"required":["recipients"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/send/validate-recipients":{"post":{"tags":["Send"],"summary":"Validate Recipients","operationId":"send_validate_recipients","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRecipients.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateRecipients.Request"}}},"required":true}}}}}
```

## Shorten Message

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`20\` requests every \`NaN\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ShortenMessage.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"shortenedMessage":{"type":"string"}},"required":["shortenedMessage"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ShortenMessage.Request":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/send/shorten-message":{"post":{"tags":["Send"],"summary":"Shorten Message","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `20` requests every `NaN` seconds","operationId":"send_shorten_message","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortenMessage.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShortenMessage.Request"}}},"required":true}}}}}
```

## Get Message Cost

> \# Overview\
> \
> \### Request Fields\
> \
> \- \`from: string\`\
> &#x20;   \- The phone number used to send the message\
> \
> \- \`to: string\`\
> &#x20;   \- The phone number the message is being sent to\
> \
> \- \`message: string\`\
> &#x20;   \- The contents of the message being sent\
> \
> \- \`isMMS: boolean\`\
> &#x20;   \- An indicator to that the message is an MMS instead of SMS.\
> \
> &#x20;   \- Default behavior: False\
> \
> \
> \### Response Fields\
> \
> \- \`fee: number\`\
> \
> &#x20;   \- The fee for sending the message\
> \
> \- \`carrierFee: number\`\
> \
> &#x20;   \- The carrier fee for sending the message, when applicable\
> \
> \- \`totalCost: number\`\
> \
> &#x20;   \- The total cost for sending the message\
> \
> \- \`messageCredits: number\`\
> \
> &#x20;   \- The number of message credits used for sending the message\
> \
> \- \`premiumCredits: number\`\
> \
> &#x20;   \- The number of premium credits used for sending the message\
> \
> \- \`messageCount: number\`\
> \
> &#x20;   \- The number of messages that would be sent\
> \
> \
> \### Notes\
> \
> \- The \`message\` field can be excluded or left blank to indicate that, when \`isMMS\` is true, that the message would be an attachment only.\
> \
> \- The \`isMMS\` field can be excluded and will default to \`false\`.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetCost.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IMessageCost"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IMessageCost":{"type":"object","properties":{"fee":{"type":"number"},"carrierFee":{"type":"number"},"totalCost":{"type":"number"},"messageCredits":{"type":"number"},"premiumCredits":{"type":"number"},"messageCount":{"type":"number"}},"required":["fee","carrierFee","totalCost","messageCredits","premiumCredits","messageCount"]},"GetCost.Request":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"message":{"type":"string"},"isMMS":{"type":"boolean"}},"required":["to"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/send/cost":{"post":{"tags":["Send"],"summary":"Get Message Cost","operationId":"send_get_cost","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCost.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetCost.Request"}}},"required":true},"description":"# Overview\n\n### Request Fields\n\n- `from: string`\n    - The phone number used to send the message\n\n- `to: string`\n    - The phone number the message is being sent to\n\n- `message: string`\n    - The contents of the message being sent\n\n- `isMMS: boolean`\n    - An indicator to that the message is an MMS instead of SMS.\n\n    - Default behavior: False\n\n\n### Response Fields\n\n- `fee: number`\n\n    - The fee for sending the message\n\n- `carrierFee: number`\n\n    - The carrier fee for sending the message, when applicable\n\n- `totalCost: number`\n\n    - The total cost for sending the message\n\n- `messageCredits: number`\n\n    - The number of message credits used for sending the message\n\n- `premiumCredits: number`\n\n    - The number of premium credits used for sending the message\n\n- `messageCount: number`\n\n    - The number of messages that would be sent\n\n\n### Notes\n\n- The `message` field can be excluded or left blank to indicate that, when `isMMS` is true, that the message would be an attachment only.\n\n- The `isMMS` field can be excluded and will default to `false`.\n\n\nundefined"}}}}
```

## POST /send/messaging-speeds

> Get Message Delivery Time

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetMessagingSpeeds.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IMessagingSpeeds"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IMessagingSpeeds":{"type":"object","properties":{"totalRecipients":{"type":"number"},"fromNumber":{"type":"number"},"longcodeStatus":{"$ref":"#/components/schemas/DedicatedNumberStatus"},"isLongcodeRegistered":{"type":"boolean"},"time":{"$ref":"#/components/schemas/IMessagingSpeedsTimeFormat"},"timeByCarrier":{"type":"array","items":{"type":"object","properties":{"carrier":{"type":"string"},"time":{"$ref":"#/components/schemas/IMessagingSpeedsTimeFormat"}},"required":["carrier","time"]}},"brandRegistration":{"$ref":"#/components/schemas/IMessagingSpeedsBrandRegistration"}},"required":["totalRecipients","fromNumber","longcodeStatus","isLongcodeRegistered","time","brandRegistration"]},"DedicatedNumberStatus":{"type":"string","enum":["Basic","Pending Carrier Approval","Carrier Approved","Undefined"]},"IMessagingSpeedsTimeFormat":{"type":"object","properties":{"hours":{"type":"number"},"minutes":{"type":"number"}},"required":["hours","minutes"]},"IMessagingSpeedsBrandRegistration":{"type":"object","properties":{"status":{"$ref":"#/components/schemas/MessagingSpeedsBrandRegistrationStatus"},"estimatedApprovalDate":{"type":"string"}},"required":["status"]},"MessagingSpeedsBrandRegistrationStatus":{"type":"string","enum":["Pending","Approved","Not Submitted","Delayed"]},"GetMessagingSpeeds.Request":{"type":"object","properties":{"longcodeId":{"type":"number"},"groups":{"type":"array","items":{"type":"number"}},"subscriberIds":{"type":"array","items":{"type":"number"}},"allSubscribers":{"type":"boolean"},"excludedGroupIds":{"type":"array","items":{"type":"number"}},"isMMS":{"type":"boolean"},"linkClickDays":{"type":"number"}},"required":["longcodeId"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/send/messaging-speeds":{"post":{"tags":["Send"],"summary":"Get Message Delivery Time","operationId":"send_get_messaging_speeds","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessagingSpeeds.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetMessagingSpeeds.Request"}}},"required":true}}}}}
```


# Shortcodes

* List Short Codes [#get-shortcodes](#get-shortcodes "mention")

## GET /shortcodes

> List Short Codes

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListShortcodes.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"shortcodes":{}},"required":["shortcodes"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/shortcodes":{"get":{"tags":["Shortcodes"],"summary":"List Short Codes","operationId":"shortcodes_list_shortcodes","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListShortcodes.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


# Smart Replies

* Create Smart Reply [#post-smart-replies](#post-smart-replies "mention")
* Get Smart Reply [#get-smart-replies-id](#get-smart-replies-id "mention")
* Update Smart Reply [#patch-smart-replies-id](#patch-smart-replies-id "mention")
* Delete Smart Reply [#delete-smart-replies-id](#delete-smart-replies-id "mention")
* List Smart Replies [#get-smart-replies](#get-smart-replies "mention")

## POST /smart-replies

> Create Smart Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateSmartReply.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicSmartReply"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSmartReply":{"type":"object","properties":{"id":{"type":"number"},"word":{"type":"string"},"message":{"type":"string","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"},"keyword":{"$ref":"#/components/schemas/IKeyword"}},"required":["id","word","message","created"],"description":"ISmartReply without accountId, keywordId"},"IAccount":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountName":{"type":"string"},"subdomain":{"type":"string","nullable":true},"contactName":{"type":"string"},"email":{"type":"string"},"emailClean":{"type":"string","nullable":true},"fbId":{"type":"string","nullable":true},"fbEmail":{"type":"string","nullable":true},"fromEmail":{"type":"string"},"password":{"type":"string"},"joinDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"trialStart":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"expirationDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"paidDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"unsubscribed":{"type":"number"},"resold":{"type":"number"},"disabled":{"type":"number"},"validationCode":{"type":"string"},"welcomeMessage":{"type":"string"},"extraKeyword":{"type":"string"},"validated":{"type":"number"},"token":{"type":"string"},"autoRenew":{"type":"number"},"autoRenewPhone":{"type":"number"},"members":{"type":"number"},"unsubscribeAuto":{"type":"number"},"track":{"type":"string"},"promo":{"type":"string"},"numberOfTexts":{"type":"number"},"messagesSentThisMonth":{"type":"number"},"messagesAllowedPerMonth":{"type":"number"},"smsRollover":{"type":"number","nullable":true},"extraPurchasedTexts":{"type":"number"},"expiringSms":{"type":"number"},"allowImports":{"type":"number"},"pricePerText":{"type":"number"},"apiKey":{"type":"string"},"reseller":{"type":"number"},"lastLoggedIn":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"lastViewedNotifications":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"phoneNumber":{"type":"string","nullable":true},"phoneCallsRemaining":{"type":"number"},"preferredNexmoNumbers":{"type":"string"},"surveyNexmoNumber":{"type":"string"},"phoneAlerts":{"type":"number"},"timezone":{"type":"number"},"disableDaylightSavingsTime":{"type":"number"},"confirmSending":{"type":"number"},"sendToEmailAndPhones":{"type":"number"},"shortcodeKeyword":{"type":"string"},"payByInvoice":{"type":"number"},"country":{"type":"number"},"ipAddress":{"type":"string"},"note":{"type":"string"},"newSignupForm":{"type":"number"},"useThirdpartyForAtt":{"type":"number"},"mmsEnabled":{"type":"number"},"textToSpeechEnabled":{"type":"number"},"replyInboxEnabled":{"type":"number"},"mmsSentThisMonth":{"type":"number"},"mmsRollover":{"type":"number","nullable":true},"mmsAllowed":{"type":"number"},"extraPurchasedMms":{"type":"number"},"pricePerMms":{"type":"number","nullable":true},"preferredMmsNumber":{"type":"string"},"checkCarriersRegularly":{"type":"number"},"sendTmobileViaLongcode":{"type":"number"},"useNewQueue":{"type":"number"},"stayLoggedInToken":{"type":"string"},"customSubscriberFields":{"type":"number"},"fromName":{"type":"string","nullable":true},"smsDripCampaignsEnabled":{"type":"number"},"emailDripCampaignsEnabled":{"type":"number"},"forwardReplies":{"type":"number"},"accountForwardNumbers":{"type":"array","items":{"$ref":"#/components/schemas/IAccountForwardNumber"}},"replyPhone":{"type":"string","nullable":true},"replyEmail":{"type":"string","nullable":true},"sendAllThroughTwilioNumber":{"type":"string"},"signupImg":{"type":"string","nullable":true},"signupPageCountry":{"type":"number"},"optout":{"type":"number","nullable":true},"optoutMessage":{"type":"string","nullable":true},"slowQueue":{"type":"number"},"isAffiliate":{"type":"number"},"sentNotificationAboutLowMmsMessages":{"type":"number","nullable":true},"mmsWelcome":{"type":"number","nullable":true},"sortBy":{"type":"string"},"sortAsc":{"type":"string"},"loyaltyProgramEnabled":{"type":"number"},"notifyUsersAfterPurchase":{"type":"number"},"noOfPurchasesForReward":{"type":"number"},"firstReplyHasNames":{"type":"number"},"facebookToken":{"type":"string","nullable":true},"newInvoice":{"type":"number","nullable":true},"phoneCallsPerMonth":{"type":"number","nullable":true},"phoneCallsRollover":{"type":"number","nullable":true},"ttsPerMonth":{"type":"number","nullable":true},"ttsSent":{"type":"number","nullable":true},"ttsRollover":{"type":"number","nullable":true},"replaceImportedNumbers":{"type":"number","nullable":true},"declinedCard":{"type":"number","nullable":true},"autoTopup":{"type":"number","nullable":true},"topupIncrement":{"type":"number","nullable":true},"disableOverage":{"type":"number"},"blessAuthKey":{"type":"string","nullable":true},"blessEmail":{"type":"string","nullable":true},"extraPhoneCalls":{"type":"number"},"blessAutoInviteCustomers":{"type":"number"},"blessInviteMessage":{"type":"string"},"capSubscribers":{"type":"number","nullable":true},"smsNotifyShortcode":{"type":"number","nullable":true},"smsNotifyKey":{"type":"string","nullable":true},"blessRewardsProgram":{"type":"number"},"unlimitedInternational":{"type":"number","nullable":true},"blessRewardsTime":{"type":"number"},"industry":{"type":"number","nullable":true},"facebookClaimWord":{"type":"string"},"mmsProvider":{"type":"number"},"noticeToUpgrade":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"appointmentReminders":{"type":"number"},"autoReply":{"type":"number"},"autoReplyMessage":{"type":"string","nullable":true},"omitMmsFrom":{"type":"number"},"mmsFromMessage":{"type":"string","nullable":true},"birthdayTexts":{"type":"number"},"birthdayMessage":{"type":"string","nullable":true},"llrOrderEmail":{"type":"string","nullable":true},"gcalToken":{"type":"string","nullable":true},"constantContactToken":{"type":"string"},"llrMerchantId":{"type":"string","nullable":true},"appointmentMessage":{"type":"string"},"moneyRewards":{"type":"number"},"facebookMessengerEnabled":{"type":"number"},"facebookMessengerPageId":{"type":"number","nullable":true},"facebookMessengerUserToken":{"type":"string","nullable":true},"facebookMessengerPageToken":{"type":"string","nullable":true},"skipDiscountItems":{"type":"number"},"messageLimit":{"type":"number","nullable":true},"useTwilio":{"type":"number"},"longcodeProvider":{"type":"number"},"smsProvider":{"type":"number"},"newSubscriberNotice":{"type":"number"},"internationalCredit":{"type":"number"},"paypalEmail":{"type":"string"},"disableMessageExtras":{"type":"number"},"appDownloadLink":{"type":"string","nullable":true},"lastCreditCardNotice":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"onesignalUserId":{"type":"string","nullable":true},"llrUsername":{"type":"string","nullable":true},"pageLength":{"type":"number"},"appPayment":{"type":"number"},"waveId":{"type":"number"},"telnyxProfileId":{"type":"string"},"throughputPerMinute":{"type":"number"},"appleId":{"type":"string","nullable":true},"googleId":{"type":"string","nullable":true},"shopifyId":{"type":"string","nullable":true},"shopifyShop":{"type":"string","nullable":true},"zoomId":{"type":"string","nullable":true},"gotoId":{"type":"string","nullable":true},"rbmAgentId":{"type":"number","nullable":true},"vsmsAgentId":{"type":"number","nullable":true},"twofactorBackup":{"type":"array","items":{"type":"string"}},"twofactorSecret":{"type":"string"},"twofactorPhone":{"type":"string"},"twofactorMethod":{"$ref":"#/components/schemas/TwoFactorMethod"},"appSumoId":{"type":"string","nullable":true},"shopifyStores":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyStore"}},"shopifySegments":{"type":"array","items":{"$ref":"#/components/schemas/IShopifySegment"}},"shopifyLists":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyList"}},"shopifyListMembers":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}},"hasPlatformAccess":{"type":"number"},"isUsingPlatform":{"type":"number"},"hasSeenPlatform":{"type":"number"},"recaptchaScore":{"type":"number","nullable":true},"emailVerified":{"type":"number"}},"required":["id","name","accountName","contactName","email","fromEmail","password","joinDate","trialStart","expirationDate","paidDate","unsubscribed","resold","disabled","validationCode","welcomeMessage","extraKeyword","validated","token","autoRenew","autoRenewPhone","members","unsubscribeAuto","track","promo","numberOfTexts","messagesSentThisMonth","messagesAllowedPerMonth","extraPurchasedTexts","expiringSms","allowImports","pricePerText","apiKey","reseller","lastLoggedIn","lastViewedNotifications","phoneCallsRemaining","preferredNexmoNumbers","surveyNexmoNumber","phoneAlerts","timezone","disableDaylightSavingsTime","confirmSending","sendToEmailAndPhones","shortcodeKeyword","payByInvoice","country","ipAddress","note","newSignupForm","useThirdpartyForAtt","mmsEnabled","textToSpeechEnabled","replyInboxEnabled","mmsSentThisMonth","mmsAllowed","extraPurchasedMms","preferredMmsNumber","checkCarriersRegularly","sendTmobileViaLongcode","useNewQueue","stayLoggedInToken","customSubscriberFields","smsDripCampaignsEnabled","emailDripCampaignsEnabled","forwardReplies","sendAllThroughTwilioNumber","signupPageCountry","slowQueue","isAffiliate","sortBy","sortAsc","loyaltyProgramEnabled","notifyUsersAfterPurchase","noOfPurchasesForReward","firstReplyHasNames","disableOverage","extraPhoneCalls","blessAutoInviteCustomers","blessInviteMessage","blessRewardsProgram","blessRewardsTime","facebookClaimWord","mmsProvider","appointmentReminders","autoReply","omitMmsFrom","birthdayTexts","constantContactToken","appointmentMessage","moneyRewards","facebookMessengerEnabled","skipDiscountItems","useTwilio","longcodeProvider","smsProvider","newSubscriberNotice","internationalCredit","paypalEmail","disableMessageExtras","lastCreditCardNotice","pageLength","appPayment","throughputPerMinute","emailVerified"]},"IAccountForwardNumber":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"number":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"}},"required":["id","accountId","name","number"]},"TwoFactorMethod":{"type":"string","enum":["sms","app"]},"IShopifyStore":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"string"},"accessToken":{"type":"string","nullable":true},"scopes":{"type":"string"},"credits":{"type":"number"},"settings":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","accountId","storeId","accessToken","scopes","credits","settings","createdAt","updatedAt","deletedAt"]},"IShopifySegment":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"name":{"type":"string"},"conditionals":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","accountId","storeId","name","conditionals"]},"IShopifyList":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountId":{"type":"number"},"storeId":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"members":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}}},"required":["name","accountId","storeId"]},"IShopifyListMember":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"listId":{"type":"number"},"customerId":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"list":{"$ref":"#/components/schemas/IShopifyList"}},"required":["accountId","storeId","listId","customerId"]},"IKeyword":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"keyword":{"type":"string"},"shortcode":{"type":"string"},"destinationGroupId":{"type":"number"},"deleted":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"nonavidWelcomeMessage":{"type":"string"},"longcode":{"type":"number","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"qrCodeTemplateId":{"type":"number","nullable":true},"description":{"type":"string"}},"required":["id","accountId","keyword","shortcode","destinationGroupId","deleted","created","nonavidWelcomeMessage","longcode","includeContactCard","includeSignupLink","qrCodeTemplateId","description"]},"CreateSmartReply.Request":{"type":"object","properties":{"word":{"type":"string"},"message":{"type":"string"},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"templateId":{"type":"number"}},"required":["word","message"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/smart-replies":{"post":{"tags":["Smart Replies"],"summary":"Create Smart Reply","operationId":"smart_replies_create_smart_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSmartReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSmartReply.Request"}}},"required":true}}}}}
```

## GET /smart-replies/{id}

> Get Smart Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetSmartReply.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicSmartReply"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSmartReply":{"type":"object","properties":{"id":{"type":"number"},"word":{"type":"string"},"message":{"type":"string","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"},"keyword":{"$ref":"#/components/schemas/IKeyword"}},"required":["id","word","message","created"],"description":"ISmartReply without accountId, keywordId"},"IAccount":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountName":{"type":"string"},"subdomain":{"type":"string","nullable":true},"contactName":{"type":"string"},"email":{"type":"string"},"emailClean":{"type":"string","nullable":true},"fbId":{"type":"string","nullable":true},"fbEmail":{"type":"string","nullable":true},"fromEmail":{"type":"string"},"password":{"type":"string"},"joinDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"trialStart":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"expirationDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"paidDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"unsubscribed":{"type":"number"},"resold":{"type":"number"},"disabled":{"type":"number"},"validationCode":{"type":"string"},"welcomeMessage":{"type":"string"},"extraKeyword":{"type":"string"},"validated":{"type":"number"},"token":{"type":"string"},"autoRenew":{"type":"number"},"autoRenewPhone":{"type":"number"},"members":{"type":"number"},"unsubscribeAuto":{"type":"number"},"track":{"type":"string"},"promo":{"type":"string"},"numberOfTexts":{"type":"number"},"messagesSentThisMonth":{"type":"number"},"messagesAllowedPerMonth":{"type":"number"},"smsRollover":{"type":"number","nullable":true},"extraPurchasedTexts":{"type":"number"},"expiringSms":{"type":"number"},"allowImports":{"type":"number"},"pricePerText":{"type":"number"},"apiKey":{"type":"string"},"reseller":{"type":"number"},"lastLoggedIn":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"lastViewedNotifications":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"phoneNumber":{"type":"string","nullable":true},"phoneCallsRemaining":{"type":"number"},"preferredNexmoNumbers":{"type":"string"},"surveyNexmoNumber":{"type":"string"},"phoneAlerts":{"type":"number"},"timezone":{"type":"number"},"disableDaylightSavingsTime":{"type":"number"},"confirmSending":{"type":"number"},"sendToEmailAndPhones":{"type":"number"},"shortcodeKeyword":{"type":"string"},"payByInvoice":{"type":"number"},"country":{"type":"number"},"ipAddress":{"type":"string"},"note":{"type":"string"},"newSignupForm":{"type":"number"},"useThirdpartyForAtt":{"type":"number"},"mmsEnabled":{"type":"number"},"textToSpeechEnabled":{"type":"number"},"replyInboxEnabled":{"type":"number"},"mmsSentThisMonth":{"type":"number"},"mmsRollover":{"type":"number","nullable":true},"mmsAllowed":{"type":"number"},"extraPurchasedMms":{"type":"number"},"pricePerMms":{"type":"number","nullable":true},"preferredMmsNumber":{"type":"string"},"checkCarriersRegularly":{"type":"number"},"sendTmobileViaLongcode":{"type":"number"},"useNewQueue":{"type":"number"},"stayLoggedInToken":{"type":"string"},"customSubscriberFields":{"type":"number"},"fromName":{"type":"string","nullable":true},"smsDripCampaignsEnabled":{"type":"number"},"emailDripCampaignsEnabled":{"type":"number"},"forwardReplies":{"type":"number"},"accountForwardNumbers":{"type":"array","items":{"$ref":"#/components/schemas/IAccountForwardNumber"}},"replyPhone":{"type":"string","nullable":true},"replyEmail":{"type":"string","nullable":true},"sendAllThroughTwilioNumber":{"type":"string"},"signupImg":{"type":"string","nullable":true},"signupPageCountry":{"type":"number"},"optout":{"type":"number","nullable":true},"optoutMessage":{"type":"string","nullable":true},"slowQueue":{"type":"number"},"isAffiliate":{"type":"number"},"sentNotificationAboutLowMmsMessages":{"type":"number","nullable":true},"mmsWelcome":{"type":"number","nullable":true},"sortBy":{"type":"string"},"sortAsc":{"type":"string"},"loyaltyProgramEnabled":{"type":"number"},"notifyUsersAfterPurchase":{"type":"number"},"noOfPurchasesForReward":{"type":"number"},"firstReplyHasNames":{"type":"number"},"facebookToken":{"type":"string","nullable":true},"newInvoice":{"type":"number","nullable":true},"phoneCallsPerMonth":{"type":"number","nullable":true},"phoneCallsRollover":{"type":"number","nullable":true},"ttsPerMonth":{"type":"number","nullable":true},"ttsSent":{"type":"number","nullable":true},"ttsRollover":{"type":"number","nullable":true},"replaceImportedNumbers":{"type":"number","nullable":true},"declinedCard":{"type":"number","nullable":true},"autoTopup":{"type":"number","nullable":true},"topupIncrement":{"type":"number","nullable":true},"disableOverage":{"type":"number"},"blessAuthKey":{"type":"string","nullable":true},"blessEmail":{"type":"string","nullable":true},"extraPhoneCalls":{"type":"number"},"blessAutoInviteCustomers":{"type":"number"},"blessInviteMessage":{"type":"string"},"capSubscribers":{"type":"number","nullable":true},"smsNotifyShortcode":{"type":"number","nullable":true},"smsNotifyKey":{"type":"string","nullable":true},"blessRewardsProgram":{"type":"number"},"unlimitedInternational":{"type":"number","nullable":true},"blessRewardsTime":{"type":"number"},"industry":{"type":"number","nullable":true},"facebookClaimWord":{"type":"string"},"mmsProvider":{"type":"number"},"noticeToUpgrade":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"appointmentReminders":{"type":"number"},"autoReply":{"type":"number"},"autoReplyMessage":{"type":"string","nullable":true},"omitMmsFrom":{"type":"number"},"mmsFromMessage":{"type":"string","nullable":true},"birthdayTexts":{"type":"number"},"birthdayMessage":{"type":"string","nullable":true},"llrOrderEmail":{"type":"string","nullable":true},"gcalToken":{"type":"string","nullable":true},"constantContactToken":{"type":"string"},"llrMerchantId":{"type":"string","nullable":true},"appointmentMessage":{"type":"string"},"moneyRewards":{"type":"number"},"facebookMessengerEnabled":{"type":"number"},"facebookMessengerPageId":{"type":"number","nullable":true},"facebookMessengerUserToken":{"type":"string","nullable":true},"facebookMessengerPageToken":{"type":"string","nullable":true},"skipDiscountItems":{"type":"number"},"messageLimit":{"type":"number","nullable":true},"useTwilio":{"type":"number"},"longcodeProvider":{"type":"number"},"smsProvider":{"type":"number"},"newSubscriberNotice":{"type":"number"},"internationalCredit":{"type":"number"},"paypalEmail":{"type":"string"},"disableMessageExtras":{"type":"number"},"appDownloadLink":{"type":"string","nullable":true},"lastCreditCardNotice":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"onesignalUserId":{"type":"string","nullable":true},"llrUsername":{"type":"string","nullable":true},"pageLength":{"type":"number"},"appPayment":{"type":"number"},"waveId":{"type":"number"},"telnyxProfileId":{"type":"string"},"throughputPerMinute":{"type":"number"},"appleId":{"type":"string","nullable":true},"googleId":{"type":"string","nullable":true},"shopifyId":{"type":"string","nullable":true},"shopifyShop":{"type":"string","nullable":true},"zoomId":{"type":"string","nullable":true},"gotoId":{"type":"string","nullable":true},"rbmAgentId":{"type":"number","nullable":true},"vsmsAgentId":{"type":"number","nullable":true},"twofactorBackup":{"type":"array","items":{"type":"string"}},"twofactorSecret":{"type":"string"},"twofactorPhone":{"type":"string"},"twofactorMethod":{"$ref":"#/components/schemas/TwoFactorMethod"},"appSumoId":{"type":"string","nullable":true},"shopifyStores":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyStore"}},"shopifySegments":{"type":"array","items":{"$ref":"#/components/schemas/IShopifySegment"}},"shopifyLists":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyList"}},"shopifyListMembers":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}},"hasPlatformAccess":{"type":"number"},"isUsingPlatform":{"type":"number"},"hasSeenPlatform":{"type":"number"},"recaptchaScore":{"type":"number","nullable":true},"emailVerified":{"type":"number"}},"required":["id","name","accountName","contactName","email","fromEmail","password","joinDate","trialStart","expirationDate","paidDate","unsubscribed","resold","disabled","validationCode","welcomeMessage","extraKeyword","validated","token","autoRenew","autoRenewPhone","members","unsubscribeAuto","track","promo","numberOfTexts","messagesSentThisMonth","messagesAllowedPerMonth","extraPurchasedTexts","expiringSms","allowImports","pricePerText","apiKey","reseller","lastLoggedIn","lastViewedNotifications","phoneCallsRemaining","preferredNexmoNumbers","surveyNexmoNumber","phoneAlerts","timezone","disableDaylightSavingsTime","confirmSending","sendToEmailAndPhones","shortcodeKeyword","payByInvoice","country","ipAddress","note","newSignupForm","useThirdpartyForAtt","mmsEnabled","textToSpeechEnabled","replyInboxEnabled","mmsSentThisMonth","mmsAllowed","extraPurchasedMms","preferredMmsNumber","checkCarriersRegularly","sendTmobileViaLongcode","useNewQueue","stayLoggedInToken","customSubscriberFields","smsDripCampaignsEnabled","emailDripCampaignsEnabled","forwardReplies","sendAllThroughTwilioNumber","signupPageCountry","slowQueue","isAffiliate","sortBy","sortAsc","loyaltyProgramEnabled","notifyUsersAfterPurchase","noOfPurchasesForReward","firstReplyHasNames","disableOverage","extraPhoneCalls","blessAutoInviteCustomers","blessInviteMessage","blessRewardsProgram","blessRewardsTime","facebookClaimWord","mmsProvider","appointmentReminders","autoReply","omitMmsFrom","birthdayTexts","constantContactToken","appointmentMessage","moneyRewards","facebookMessengerEnabled","skipDiscountItems","useTwilio","longcodeProvider","smsProvider","newSubscriberNotice","internationalCredit","paypalEmail","disableMessageExtras","lastCreditCardNotice","pageLength","appPayment","throughputPerMinute","emailVerified"]},"IAccountForwardNumber":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"number":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"}},"required":["id","accountId","name","number"]},"TwoFactorMethod":{"type":"string","enum":["sms","app"]},"IShopifyStore":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"string"},"accessToken":{"type":"string","nullable":true},"scopes":{"type":"string"},"credits":{"type":"number"},"settings":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","accountId","storeId","accessToken","scopes","credits","settings","createdAt","updatedAt","deletedAt"]},"IShopifySegment":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"name":{"type":"string"},"conditionals":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","accountId","storeId","name","conditionals"]},"IShopifyList":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountId":{"type":"number"},"storeId":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"members":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}}},"required":["name","accountId","storeId"]},"IShopifyListMember":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"listId":{"type":"number"},"customerId":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"list":{"$ref":"#/components/schemas/IShopifyList"}},"required":["accountId","storeId","listId","customerId"]},"IKeyword":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"keyword":{"type":"string"},"shortcode":{"type":"string"},"destinationGroupId":{"type":"number"},"deleted":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"nonavidWelcomeMessage":{"type":"string"},"longcode":{"type":"number","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"qrCodeTemplateId":{"type":"number","nullable":true},"description":{"type":"string"}},"required":["id","accountId","keyword","shortcode","destinationGroupId","deleted","created","nonavidWelcomeMessage","longcode","includeContactCard","includeSignupLink","qrCodeTemplateId","description"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/smart-replies/{id}":{"get":{"tags":["Smart Replies"],"summary":"Get Smart Reply","operationId":"smart_replies_get_smart_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSmartReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /smart-replies/{id}

> Update Smart Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateSmartReply.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicSmartReply"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSmartReply":{"type":"object","properties":{"id":{"type":"number"},"word":{"type":"string"},"message":{"type":"string","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"},"keyword":{"$ref":"#/components/schemas/IKeyword"}},"required":["id","word","message","created"],"description":"ISmartReply without accountId, keywordId"},"IAccount":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountName":{"type":"string"},"subdomain":{"type":"string","nullable":true},"contactName":{"type":"string"},"email":{"type":"string"},"emailClean":{"type":"string","nullable":true},"fbId":{"type":"string","nullable":true},"fbEmail":{"type":"string","nullable":true},"fromEmail":{"type":"string"},"password":{"type":"string"},"joinDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"trialStart":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"expirationDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"paidDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"unsubscribed":{"type":"number"},"resold":{"type":"number"},"disabled":{"type":"number"},"validationCode":{"type":"string"},"welcomeMessage":{"type":"string"},"extraKeyword":{"type":"string"},"validated":{"type":"number"},"token":{"type":"string"},"autoRenew":{"type":"number"},"autoRenewPhone":{"type":"number"},"members":{"type":"number"},"unsubscribeAuto":{"type":"number"},"track":{"type":"string"},"promo":{"type":"string"},"numberOfTexts":{"type":"number"},"messagesSentThisMonth":{"type":"number"},"messagesAllowedPerMonth":{"type":"number"},"smsRollover":{"type":"number","nullable":true},"extraPurchasedTexts":{"type":"number"},"expiringSms":{"type":"number"},"allowImports":{"type":"number"},"pricePerText":{"type":"number"},"apiKey":{"type":"string"},"reseller":{"type":"number"},"lastLoggedIn":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"lastViewedNotifications":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"phoneNumber":{"type":"string","nullable":true},"phoneCallsRemaining":{"type":"number"},"preferredNexmoNumbers":{"type":"string"},"surveyNexmoNumber":{"type":"string"},"phoneAlerts":{"type":"number"},"timezone":{"type":"number"},"disableDaylightSavingsTime":{"type":"number"},"confirmSending":{"type":"number"},"sendToEmailAndPhones":{"type":"number"},"shortcodeKeyword":{"type":"string"},"payByInvoice":{"type":"number"},"country":{"type":"number"},"ipAddress":{"type":"string"},"note":{"type":"string"},"newSignupForm":{"type":"number"},"useThirdpartyForAtt":{"type":"number"},"mmsEnabled":{"type":"number"},"textToSpeechEnabled":{"type":"number"},"replyInboxEnabled":{"type":"number"},"mmsSentThisMonth":{"type":"number"},"mmsRollover":{"type":"number","nullable":true},"mmsAllowed":{"type":"number"},"extraPurchasedMms":{"type":"number"},"pricePerMms":{"type":"number","nullable":true},"preferredMmsNumber":{"type":"string"},"checkCarriersRegularly":{"type":"number"},"sendTmobileViaLongcode":{"type":"number"},"useNewQueue":{"type":"number"},"stayLoggedInToken":{"type":"string"},"customSubscriberFields":{"type":"number"},"fromName":{"type":"string","nullable":true},"smsDripCampaignsEnabled":{"type":"number"},"emailDripCampaignsEnabled":{"type":"number"},"forwardReplies":{"type":"number"},"accountForwardNumbers":{"type":"array","items":{"$ref":"#/components/schemas/IAccountForwardNumber"}},"replyPhone":{"type":"string","nullable":true},"replyEmail":{"type":"string","nullable":true},"sendAllThroughTwilioNumber":{"type":"string"},"signupImg":{"type":"string","nullable":true},"signupPageCountry":{"type":"number"},"optout":{"type":"number","nullable":true},"optoutMessage":{"type":"string","nullable":true},"slowQueue":{"type":"number"},"isAffiliate":{"type":"number"},"sentNotificationAboutLowMmsMessages":{"type":"number","nullable":true},"mmsWelcome":{"type":"number","nullable":true},"sortBy":{"type":"string"},"sortAsc":{"type":"string"},"loyaltyProgramEnabled":{"type":"number"},"notifyUsersAfterPurchase":{"type":"number"},"noOfPurchasesForReward":{"type":"number"},"firstReplyHasNames":{"type":"number"},"facebookToken":{"type":"string","nullable":true},"newInvoice":{"type":"number","nullable":true},"phoneCallsPerMonth":{"type":"number","nullable":true},"phoneCallsRollover":{"type":"number","nullable":true},"ttsPerMonth":{"type":"number","nullable":true},"ttsSent":{"type":"number","nullable":true},"ttsRollover":{"type":"number","nullable":true},"replaceImportedNumbers":{"type":"number","nullable":true},"declinedCard":{"type":"number","nullable":true},"autoTopup":{"type":"number","nullable":true},"topupIncrement":{"type":"number","nullable":true},"disableOverage":{"type":"number"},"blessAuthKey":{"type":"string","nullable":true},"blessEmail":{"type":"string","nullable":true},"extraPhoneCalls":{"type":"number"},"blessAutoInviteCustomers":{"type":"number"},"blessInviteMessage":{"type":"string"},"capSubscribers":{"type":"number","nullable":true},"smsNotifyShortcode":{"type":"number","nullable":true},"smsNotifyKey":{"type":"string","nullable":true},"blessRewardsProgram":{"type":"number"},"unlimitedInternational":{"type":"number","nullable":true},"blessRewardsTime":{"type":"number"},"industry":{"type":"number","nullable":true},"facebookClaimWord":{"type":"string"},"mmsProvider":{"type":"number"},"noticeToUpgrade":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"appointmentReminders":{"type":"number"},"autoReply":{"type":"number"},"autoReplyMessage":{"type":"string","nullable":true},"omitMmsFrom":{"type":"number"},"mmsFromMessage":{"type":"string","nullable":true},"birthdayTexts":{"type":"number"},"birthdayMessage":{"type":"string","nullable":true},"llrOrderEmail":{"type":"string","nullable":true},"gcalToken":{"type":"string","nullable":true},"constantContactToken":{"type":"string"},"llrMerchantId":{"type":"string","nullable":true},"appointmentMessage":{"type":"string"},"moneyRewards":{"type":"number"},"facebookMessengerEnabled":{"type":"number"},"facebookMessengerPageId":{"type":"number","nullable":true},"facebookMessengerUserToken":{"type":"string","nullable":true},"facebookMessengerPageToken":{"type":"string","nullable":true},"skipDiscountItems":{"type":"number"},"messageLimit":{"type":"number","nullable":true},"useTwilio":{"type":"number"},"longcodeProvider":{"type":"number"},"smsProvider":{"type":"number"},"newSubscriberNotice":{"type":"number"},"internationalCredit":{"type":"number"},"paypalEmail":{"type":"string"},"disableMessageExtras":{"type":"number"},"appDownloadLink":{"type":"string","nullable":true},"lastCreditCardNotice":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"onesignalUserId":{"type":"string","nullable":true},"llrUsername":{"type":"string","nullable":true},"pageLength":{"type":"number"},"appPayment":{"type":"number"},"waveId":{"type":"number"},"telnyxProfileId":{"type":"string"},"throughputPerMinute":{"type":"number"},"appleId":{"type":"string","nullable":true},"googleId":{"type":"string","nullable":true},"shopifyId":{"type":"string","nullable":true},"shopifyShop":{"type":"string","nullable":true},"zoomId":{"type":"string","nullable":true},"gotoId":{"type":"string","nullable":true},"rbmAgentId":{"type":"number","nullable":true},"vsmsAgentId":{"type":"number","nullable":true},"twofactorBackup":{"type":"array","items":{"type":"string"}},"twofactorSecret":{"type":"string"},"twofactorPhone":{"type":"string"},"twofactorMethod":{"$ref":"#/components/schemas/TwoFactorMethod"},"appSumoId":{"type":"string","nullable":true},"shopifyStores":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyStore"}},"shopifySegments":{"type":"array","items":{"$ref":"#/components/schemas/IShopifySegment"}},"shopifyLists":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyList"}},"shopifyListMembers":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}},"hasPlatformAccess":{"type":"number"},"isUsingPlatform":{"type":"number"},"hasSeenPlatform":{"type":"number"},"recaptchaScore":{"type":"number","nullable":true},"emailVerified":{"type":"number"}},"required":["id","name","accountName","contactName","email","fromEmail","password","joinDate","trialStart","expirationDate","paidDate","unsubscribed","resold","disabled","validationCode","welcomeMessage","extraKeyword","validated","token","autoRenew","autoRenewPhone","members","unsubscribeAuto","track","promo","numberOfTexts","messagesSentThisMonth","messagesAllowedPerMonth","extraPurchasedTexts","expiringSms","allowImports","pricePerText","apiKey","reseller","lastLoggedIn","lastViewedNotifications","phoneCallsRemaining","preferredNexmoNumbers","surveyNexmoNumber","phoneAlerts","timezone","disableDaylightSavingsTime","confirmSending","sendToEmailAndPhones","shortcodeKeyword","payByInvoice","country","ipAddress","note","newSignupForm","useThirdpartyForAtt","mmsEnabled","textToSpeechEnabled","replyInboxEnabled","mmsSentThisMonth","mmsAllowed","extraPurchasedMms","preferredMmsNumber","checkCarriersRegularly","sendTmobileViaLongcode","useNewQueue","stayLoggedInToken","customSubscriberFields","smsDripCampaignsEnabled","emailDripCampaignsEnabled","forwardReplies","sendAllThroughTwilioNumber","signupPageCountry","slowQueue","isAffiliate","sortBy","sortAsc","loyaltyProgramEnabled","notifyUsersAfterPurchase","noOfPurchasesForReward","firstReplyHasNames","disableOverage","extraPhoneCalls","blessAutoInviteCustomers","blessInviteMessage","blessRewardsProgram","blessRewardsTime","facebookClaimWord","mmsProvider","appointmentReminders","autoReply","omitMmsFrom","birthdayTexts","constantContactToken","appointmentMessage","moneyRewards","facebookMessengerEnabled","skipDiscountItems","useTwilio","longcodeProvider","smsProvider","newSubscriberNotice","internationalCredit","paypalEmail","disableMessageExtras","lastCreditCardNotice","pageLength","appPayment","throughputPerMinute","emailVerified"]},"IAccountForwardNumber":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"number":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"}},"required":["id","accountId","name","number"]},"TwoFactorMethod":{"type":"string","enum":["sms","app"]},"IShopifyStore":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"string"},"accessToken":{"type":"string","nullable":true},"scopes":{"type":"string"},"credits":{"type":"number"},"settings":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","accountId","storeId","accessToken","scopes","credits","settings","createdAt","updatedAt","deletedAt"]},"IShopifySegment":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"name":{"type":"string"},"conditionals":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","accountId","storeId","name","conditionals"]},"IShopifyList":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountId":{"type":"number"},"storeId":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"members":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}}},"required":["name","accountId","storeId"]},"IShopifyListMember":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"listId":{"type":"number"},"customerId":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"list":{"$ref":"#/components/schemas/IShopifyList"}},"required":["accountId","storeId","listId","customerId"]},"IKeyword":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"keyword":{"type":"string"},"shortcode":{"type":"string"},"destinationGroupId":{"type":"number"},"deleted":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"nonavidWelcomeMessage":{"type":"string"},"longcode":{"type":"number","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"qrCodeTemplateId":{"type":"number","nullable":true},"description":{"type":"string"}},"required":["id","accountId","keyword","shortcode","destinationGroupId","deleted","created","nonavidWelcomeMessage","longcode","includeContactCard","includeSignupLink","qrCodeTemplateId","description"]},"UpdateSmartReply.Request":{"$ref":"#/components/schemas/Partial-CreateSmartReply.Request"},"Partial-CreateSmartReply.Request":{"type":"object","properties":{"word":{"type":"string"},"message":{"type":"string"},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"templateId":{"type":"number"}}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/smart-replies/{id}":{"patch":{"tags":["Smart Replies"],"summary":"Update Smart Reply","operationId":"smart_replies_update_smart_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSmartReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSmartReply.Request"}}},"required":true},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## DELETE /smart-replies/{id}

> Delete Smart Reply

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteSmartReply.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/smart-replies/{id}":{"delete":{"tags":["Smart Replies"],"summary":"Delete Smart Reply","operationId":"smart_replies_delete_smart_reply","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSmartReply.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /smart-replies

> List Smart Replies

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListSmartReplies.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSmartReply"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicSmartReply":{"type":"object","properties":{"id":{"type":"number"},"word":{"type":"string"},"message":{"type":"string","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"},"keyword":{"$ref":"#/components/schemas/IKeyword"}},"required":["id","word","message","created"],"description":"ISmartReply without accountId, keywordId"},"IAccount":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountName":{"type":"string"},"subdomain":{"type":"string","nullable":true},"contactName":{"type":"string"},"email":{"type":"string"},"emailClean":{"type":"string","nullable":true},"fbId":{"type":"string","nullable":true},"fbEmail":{"type":"string","nullable":true},"fromEmail":{"type":"string"},"password":{"type":"string"},"joinDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"trialStart":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"expirationDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"paidDate":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"unsubscribed":{"type":"number"},"resold":{"type":"number"},"disabled":{"type":"number"},"validationCode":{"type":"string"},"welcomeMessage":{"type":"string"},"extraKeyword":{"type":"string"},"validated":{"type":"number"},"token":{"type":"string"},"autoRenew":{"type":"number"},"autoRenewPhone":{"type":"number"},"members":{"type":"number"},"unsubscribeAuto":{"type":"number"},"track":{"type":"string"},"promo":{"type":"string"},"numberOfTexts":{"type":"number"},"messagesSentThisMonth":{"type":"number"},"messagesAllowedPerMonth":{"type":"number"},"smsRollover":{"type":"number","nullable":true},"extraPurchasedTexts":{"type":"number"},"expiringSms":{"type":"number"},"allowImports":{"type":"number"},"pricePerText":{"type":"number"},"apiKey":{"type":"string"},"reseller":{"type":"number"},"lastLoggedIn":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"lastViewedNotifications":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"phoneNumber":{"type":"string","nullable":true},"phoneCallsRemaining":{"type":"number"},"preferredNexmoNumbers":{"type":"string"},"surveyNexmoNumber":{"type":"string"},"phoneAlerts":{"type":"number"},"timezone":{"type":"number"},"disableDaylightSavingsTime":{"type":"number"},"confirmSending":{"type":"number"},"sendToEmailAndPhones":{"type":"number"},"shortcodeKeyword":{"type":"string"},"payByInvoice":{"type":"number"},"country":{"type":"number"},"ipAddress":{"type":"string"},"note":{"type":"string"},"newSignupForm":{"type":"number"},"useThirdpartyForAtt":{"type":"number"},"mmsEnabled":{"type":"number"},"textToSpeechEnabled":{"type":"number"},"replyInboxEnabled":{"type":"number"},"mmsSentThisMonth":{"type":"number"},"mmsRollover":{"type":"number","nullable":true},"mmsAllowed":{"type":"number"},"extraPurchasedMms":{"type":"number"},"pricePerMms":{"type":"number","nullable":true},"preferredMmsNumber":{"type":"string"},"checkCarriersRegularly":{"type":"number"},"sendTmobileViaLongcode":{"type":"number"},"useNewQueue":{"type":"number"},"stayLoggedInToken":{"type":"string"},"customSubscriberFields":{"type":"number"},"fromName":{"type":"string","nullable":true},"smsDripCampaignsEnabled":{"type":"number"},"emailDripCampaignsEnabled":{"type":"number"},"forwardReplies":{"type":"number"},"accountForwardNumbers":{"type":"array","items":{"$ref":"#/components/schemas/IAccountForwardNumber"}},"replyPhone":{"type":"string","nullable":true},"replyEmail":{"type":"string","nullable":true},"sendAllThroughTwilioNumber":{"type":"string"},"signupImg":{"type":"string","nullable":true},"signupPageCountry":{"type":"number"},"optout":{"type":"number","nullable":true},"optoutMessage":{"type":"string","nullable":true},"slowQueue":{"type":"number"},"isAffiliate":{"type":"number"},"sentNotificationAboutLowMmsMessages":{"type":"number","nullable":true},"mmsWelcome":{"type":"number","nullable":true},"sortBy":{"type":"string"},"sortAsc":{"type":"string"},"loyaltyProgramEnabled":{"type":"number"},"notifyUsersAfterPurchase":{"type":"number"},"noOfPurchasesForReward":{"type":"number"},"firstReplyHasNames":{"type":"number"},"facebookToken":{"type":"string","nullable":true},"newInvoice":{"type":"number","nullable":true},"phoneCallsPerMonth":{"type":"number","nullable":true},"phoneCallsRollover":{"type":"number","nullable":true},"ttsPerMonth":{"type":"number","nullable":true},"ttsSent":{"type":"number","nullable":true},"ttsRollover":{"type":"number","nullable":true},"replaceImportedNumbers":{"type":"number","nullable":true},"declinedCard":{"type":"number","nullable":true},"autoTopup":{"type":"number","nullable":true},"topupIncrement":{"type":"number","nullable":true},"disableOverage":{"type":"number"},"blessAuthKey":{"type":"string","nullable":true},"blessEmail":{"type":"string","nullable":true},"extraPhoneCalls":{"type":"number"},"blessAutoInviteCustomers":{"type":"number"},"blessInviteMessage":{"type":"string"},"capSubscribers":{"type":"number","nullable":true},"smsNotifyShortcode":{"type":"number","nullable":true},"smsNotifyKey":{"type":"string","nullable":true},"blessRewardsProgram":{"type":"number"},"unlimitedInternational":{"type":"number","nullable":true},"blessRewardsTime":{"type":"number"},"industry":{"type":"number","nullable":true},"facebookClaimWord":{"type":"string"},"mmsProvider":{"type":"number"},"noticeToUpgrade":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"appointmentReminders":{"type":"number"},"autoReply":{"type":"number"},"autoReplyMessage":{"type":"string","nullable":true},"omitMmsFrom":{"type":"number"},"mmsFromMessage":{"type":"string","nullable":true},"birthdayTexts":{"type":"number"},"birthdayMessage":{"type":"string","nullable":true},"llrOrderEmail":{"type":"string","nullable":true},"gcalToken":{"type":"string","nullable":true},"constantContactToken":{"type":"string"},"llrMerchantId":{"type":"string","nullable":true},"appointmentMessage":{"type":"string"},"moneyRewards":{"type":"number"},"facebookMessengerEnabled":{"type":"number"},"facebookMessengerPageId":{"type":"number","nullable":true},"facebookMessengerUserToken":{"type":"string","nullable":true},"facebookMessengerPageToken":{"type":"string","nullable":true},"skipDiscountItems":{"type":"number"},"messageLimit":{"type":"number","nullable":true},"useTwilio":{"type":"number"},"longcodeProvider":{"type":"number"},"smsProvider":{"type":"number"},"newSubscriberNotice":{"type":"number"},"internationalCredit":{"type":"number"},"paypalEmail":{"type":"string"},"disableMessageExtras":{"type":"number"},"appDownloadLink":{"type":"string","nullable":true},"lastCreditCardNotice":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"onesignalUserId":{"type":"string","nullable":true},"llrUsername":{"type":"string","nullable":true},"pageLength":{"type":"number"},"appPayment":{"type":"number"},"waveId":{"type":"number"},"telnyxProfileId":{"type":"string"},"throughputPerMinute":{"type":"number"},"appleId":{"type":"string","nullable":true},"googleId":{"type":"string","nullable":true},"shopifyId":{"type":"string","nullable":true},"shopifyShop":{"type":"string","nullable":true},"zoomId":{"type":"string","nullable":true},"gotoId":{"type":"string","nullable":true},"rbmAgentId":{"type":"number","nullable":true},"vsmsAgentId":{"type":"number","nullable":true},"twofactorBackup":{"type":"array","items":{"type":"string"}},"twofactorSecret":{"type":"string"},"twofactorPhone":{"type":"string"},"twofactorMethod":{"$ref":"#/components/schemas/TwoFactorMethod"},"appSumoId":{"type":"string","nullable":true},"shopifyStores":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyStore"}},"shopifySegments":{"type":"array","items":{"$ref":"#/components/schemas/IShopifySegment"}},"shopifyLists":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyList"}},"shopifyListMembers":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}},"hasPlatformAccess":{"type":"number"},"isUsingPlatform":{"type":"number"},"hasSeenPlatform":{"type":"number"},"recaptchaScore":{"type":"number","nullable":true},"emailVerified":{"type":"number"}},"required":["id","name","accountName","contactName","email","fromEmail","password","joinDate","trialStart","expirationDate","paidDate","unsubscribed","resold","disabled","validationCode","welcomeMessage","extraKeyword","validated","token","autoRenew","autoRenewPhone","members","unsubscribeAuto","track","promo","numberOfTexts","messagesSentThisMonth","messagesAllowedPerMonth","extraPurchasedTexts","expiringSms","allowImports","pricePerText","apiKey","reseller","lastLoggedIn","lastViewedNotifications","phoneCallsRemaining","preferredNexmoNumbers","surveyNexmoNumber","phoneAlerts","timezone","disableDaylightSavingsTime","confirmSending","sendToEmailAndPhones","shortcodeKeyword","payByInvoice","country","ipAddress","note","newSignupForm","useThirdpartyForAtt","mmsEnabled","textToSpeechEnabled","replyInboxEnabled","mmsSentThisMonth","mmsAllowed","extraPurchasedMms","preferredMmsNumber","checkCarriersRegularly","sendTmobileViaLongcode","useNewQueue","stayLoggedInToken","customSubscriberFields","smsDripCampaignsEnabled","emailDripCampaignsEnabled","forwardReplies","sendAllThroughTwilioNumber","signupPageCountry","slowQueue","isAffiliate","sortBy","sortAsc","loyaltyProgramEnabled","notifyUsersAfterPurchase","noOfPurchasesForReward","firstReplyHasNames","disableOverage","extraPhoneCalls","blessAutoInviteCustomers","blessInviteMessage","blessRewardsProgram","blessRewardsTime","facebookClaimWord","mmsProvider","appointmentReminders","autoReply","omitMmsFrom","birthdayTexts","constantContactToken","appointmentMessage","moneyRewards","facebookMessengerEnabled","skipDiscountItems","useTwilio","longcodeProvider","smsProvider","newSubscriberNotice","internationalCredit","paypalEmail","disableMessageExtras","lastCreditCardNotice","pageLength","appPayment","throughputPerMinute","emailVerified"]},"IAccountForwardNumber":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"name":{"type":"string"},"number":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"account":{"$ref":"#/components/schemas/IAccount"}},"required":["id","accountId","name","number"]},"TwoFactorMethod":{"type":"string","enum":["sms","app"]},"IShopifyStore":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"string"},"accessToken":{"type":"string","nullable":true},"scopes":{"type":"string"},"credits":{"type":"number"},"settings":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]}},"required":["id","accountId","storeId","accessToken","scopes","credits","settings","createdAt","updatedAt","deletedAt"]},"IShopifySegment":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"name":{"type":"string"},"conditionals":{},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","accountId","storeId","name","conditionals"]},"IShopifyList":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"accountId":{"type":"number"},"storeId":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"members":{"type":"array","items":{"$ref":"#/components/schemas/IShopifyListMember"}}},"required":["name","accountId","storeId"]},"IShopifyListMember":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"storeId":{"type":"number"},"listId":{"type":"number"},"customerId":{"type":"string"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"deletedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"},{"type":"string","nullable":true}]},"list":{"$ref":"#/components/schemas/IShopifyList"}},"required":["accountId","storeId","listId","customerId"]},"IKeyword":{"type":"object","properties":{"id":{"type":"number"},"accountId":{"type":"number"},"keyword":{"type":"string"},"shortcode":{"type":"string"},"destinationGroupId":{"type":"number"},"deleted":{"type":"number"},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"nonavidWelcomeMessage":{"type":"string"},"longcode":{"type":"number","nullable":true},"includeContactCard":{"type":"boolean"},"includeSignupLink":{"type":"boolean"},"qrCodeTemplateId":{"type":"number","nullable":true},"description":{"type":"string"}},"required":["id","accountId","keyword","shortcode","destinationGroupId","deleted","created","nonavidWelcomeMessage","longcode","includeContactCard","includeSignupLink","qrCodeTemplateId","description"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/smart-replies":{"get":{"tags":["Smart Replies"],"summary":"List Smart Replies","operationId":"smart_replies_list_smart_replies","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSmartReplies.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```


# Subscribers

For more information on how to use these endpoints see: [manage-subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers "mention")

* Create Subscriber [#post-subscribers](#post-subscribers "mention")
* Get Subscriber [#get-subscribers-idornumberoremail](#get-subscribers-idornumberoremail "mention")
* Update Subscriber [#patch-subscribers-idornumberoremail](#patch-subscribers-idornumberoremail "mention")
* Delete Subscriber [#delete-subscribers-idornumberoremail](#delete-subscribers-idornumberoremail "mention")
* List Subscribers [#get-subscribers](#get-subscribers "mention")
* Export Subscribers [#get-subscribers-export](#get-subscribers-export "mention")

See [bulk-subscriber-actions](https://developers.mobile-text-alerts.com/api-reference/subscribers/bulk-subscriber-actions "mention") for large scale subscriber updates.

## Create Subscriber

> Add a new subscriber. If given a phone number or email that already exists tied to the same account, updates the existing subscriber with new information\
> \
> \_Required Fields: email or number\_\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"CreateSubscriberRequest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":["firstName","lastName","email","number","groupIds","subscriberFields","employeeNumber","welcomeMessage"],"description":"SubscriberRequest"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers":{"post":{"tags":["Subscribers"],"summary":"Create Subscriber","description":"Add a new subscriber. If given a phone number or email that already exists tied to the same account, updates the existing subscriber with new information\n\n_Required Fields: email or number_\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_create_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubscriberRequest"}}},"required":true}}}}}
```

## Get Subscriber

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/{idOrNumberOrEmail}":{"get":{"tags":["Subscribers"],"summary":"Get Subscriber","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_get_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"idOrNumberOrEmail","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Update Subscriber

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateSubscriber.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"UpdateSubscriberRequest":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":["firstName","lastName","email","number","groupIds","subscriberFields","employeeNumber","welcomeMessage"],"description":"SubscriberRequest"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/{idOrNumberOrEmail}":{"patch":{"tags":["Subscribers"],"summary":"Update Subscriber","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_update_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubscriberRequest"}}},"required":true},"parameters":[{"name":"idOrNumberOrEmail","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## Delete Subscriber

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteSubscriber.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/{idOrNumberOrEmail}":{"delete":{"tags":["Subscribers"],"summary":"Delete Subscriber","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_delete_subscriber","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteSubscriber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"idOrNumberOrEmail","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## List Subscribers

> List all subscribers and query for subscribers. Includes all subscribers with \`query\` value in either first name, last name, number, email, or custom subscriber fields and with \`filters\` values in respective categories.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListSubscribers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicNumber"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"ISubscribersFilter":{"type":"object","properties":{"date":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"groupId":{"type":"string"},"countryId":{"type":"string"},"signupMethod":{"type":"string"},"subscriberIds":{"type":"string"},"isLandline":{"type":"boolean"},"areaCode":{"type":"string"},"attributeId":{"type":"string"},"attributeString":{"type":"string"},"attributeDate":{"type":"string"},"attributeBoolean":{"type":"boolean"},"attributeMultiSelect":{"type":"boolean"},"attributeIsEmpty":{"type":"boolean"},"attributeIsNotEmpty":{"type":"boolean"},"isNotAGroupMember":{"type":"boolean"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers":{"get":{"tags":["Subscribers"],"summary":"List Subscribers","description":"List all subscribers and query for subscribers. Includes all subscribers with `query` value in either first name, last name, number, email, or custom subscriber fields and with `filters` values in respective categories.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_list_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListSubscribers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ISubscribersFilter"}},{"name":"settings","in":"query","required":false,"schema":{"type":"object","properties":{"includeGroupMemberData":{"type":"boolean"}},"required":[]}},{"name":"allSubscribers","in":"query","required":false,"schema":{"type":"boolean"}}]}}}}
```

## Export Subscribers

> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"Redirect.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"ISubscribersFilter":{"type":"object","properties":{"date":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"},"groupId":{"type":"string"},"countryId":{"type":"string"},"signupMethod":{"type":"string"},"subscriberIds":{"type":"string"},"isLandline":{"type":"boolean"},"areaCode":{"type":"string"},"attributeId":{"type":"string"},"attributeString":{"type":"string"},"attributeDate":{"type":"string"},"attributeBoolean":{"type":"boolean"},"attributeMultiSelect":{"type":"boolean"},"attributeIsEmpty":{"type":"boolean"},"attributeIsNotEmpty":{"type":"boolean"},"isNotAGroupMember":{"type":"boolean"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/export":{"get":{"tags":["Subscribers"],"summary":"Export Subscribers","description":"# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_export_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Redirect.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"query","in":"query","required":false,"schema":{"type":"string"}},{"name":"filters","in":"query","required":false,"schema":{"$ref":"#/components/schemas/ISubscribersFilter"}}]}}}}
```


# Bulk Subscriber Actions

For more information on how to use these endpoints see: [bulk-create-update-subscribers](https://developers.mobile-text-alerts.com/tutorials/manage-subscribers/bulk-create-update-subscribers "mention")

* Bulk Create Subscribers [#post-subscribers-bulk](#post-subscribers-bulk "mention")
* Bulk Update Subscribers [#patch-subscribers-bulk](#patch-subscribers-bulk "mention")

## Bulk Create Subscribers

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request. Records of subscribers should be in an array. The \`createOnly\` field indicates if the action is creating new subscribers only (doesn't accept records of existing subscribers) or the action is creating or updating (accept records of existing subscribers and update info according to the records).\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkCreateSubscribers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"totalRecordCount":{"type":"number"},"createdRecordCount":{"type":"number"},"errorRecordCount":{"type":"number"},"createdRecords":{"type":"array","items":{"$ref":"#/components/schemas/IPublicNumber"}},"errorRecords":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CreateSubscriber.Request"},{"type":"object","properties":{"error":{"type":"string"}},"required":["error"]}],"description":"BulkCreateSubscribers.ErrorRecord"}}},"required":["totalRecordCount","createdRecordCount","errorRecordCount","createdRecords","errorRecords"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"CreateSubscriber.Request":{"$ref":"#/components/schemas/INewNumber"},"INewNumber":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"e164Number":{"type":"string"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":[]},"BulkCreateSubscribers.Request":{"type":"array","items":{"$ref":"#/components/schemas/CreateSubscriber.Request"}}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/bulk":{"post":{"tags":["Subscribers"],"summary":"Bulk Create Subscribers","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request. Records of subscribers should be in an array. The `createOnly` field indicates if the action is creating new subscribers only (doesn't accept records of existing subscribers) or the action is creating or updating (accept records of existing subscribers and update info according to the records).\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_bulk_create_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubscribers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateSubscribers.Request"}}},"required":true},"parameters":[{"name":"createOnly","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```

## Bulk Update Subscribers

> \# Record Limit\
> \
> This endpoint will accept a maximum of \`1,000\` records in a single request.\
> \
> \
> \# Rate Limiting\
> \
> This endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to \`15\` requests every \`15\` seconds

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkUpdateSubscribers.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"totalRecordCount":{"type":"number"},"updatedRecordCount":{"type":"number"},"errorRecordCount":{"type":"number"},"updatedRecords":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseResponseDataType"},{"type":"object","properties":{"id":{"type":"number"}},"required":["id"]}],"description":"BulkUpdateSubscribers.ResponseDataWithId"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseResponseDataType"},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}],"description":"BulkUpdateSubscribers.ResponseDataWithPhoneNumber"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/IPublicNumber"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseResponseDataType"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}],"description":"BulkUpdateSubscribers.ResponseDataWithEmail"}],"description":"BulkUpdateSubscribers.ResponseRecord"}},"errorRecords":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"BulkUpdateSubscribers.BaseErrorDataType"},{"type":"object","properties":{"id":{"type":"number"}},"required":["id"]}],"description":"BulkUpdateSubscribers.ErrorDataWithId"},{"allOf":[{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"BulkUpdateSubscribers.BaseErrorDataType"},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}],"description":"BulkUpdateSubscribers.ErrorDataWithPhoneNumber"},{"allOf":[{"type":"object","properties":{"error":{"type":"string"}},"required":["error"],"description":"BulkUpdateSubscribers.BaseErrorDataType"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}],"description":"BulkUpdateSubscribers.ErrorDataWithEmail"}],"description":"BulkUpdateSubscribers.ErrorRecord"}}},"required":["totalRecordCount","updatedRecordCount","errorRecordCount","updatedRecords","errorRecords"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"BulkUpdateSubscribers.Request":{"type":"array","items":{"oneOf":[{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/UpdateSubscriber.Request"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseRequest"},{"type":"object","properties":{"id":{"type":"number"}},"required":["id"]}],"description":"BulkUpdateSubscribers.RequestWithId"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/UpdateSubscriber.Request"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseRequest"},{"type":"object","properties":{"phoneNumber":{"type":"string"}},"required":["phoneNumber"]}],"description":"BulkUpdateSubscribers.RequestWithPhoneNumber"},{"allOf":[{"type":"object","properties":{"record":{"$ref":"#/components/schemas/UpdateSubscriber.Request"}},"required":["record"],"description":"BulkUpdateSubscribers.BaseRequest"},{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}],"description":"BulkUpdateSubscribers.RequestWithEmail"}],"description":"BulkUpdateSubscribers.RequestRecord"}},"UpdateSubscriber.Request":{"$ref":"#/components/schemas/CreateSubscriber.Request"},"CreateSubscriber.Request":{"$ref":"#/components/schemas/INewNumber"},"INewNumber":{"type":"object","properties":{"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"oneOf":[{"type":"number"},{"type":"string"}]},"e164Number":{"type":"string"},"groupIds":{"type":"array","items":{"type":"number"}},"subscriberFields":{"type":"object","additionalProperties":{"type":"string"}},"employeeNumber":{"type":"string"},"welcomeMessage":{"type":"string"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"RateLimitError":{"description":"RateLimitError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[429]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["rate_limit_error"]},"name":{"type":"string","enum":["MTARateLimitError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/subscribers/bulk":{"patch":{"tags":["Subscribers"],"summary":"Bulk Update Subscribers","description":"# Record Limit\n\nThis endpoint will accept a maximum of `1,000` records in a single request.\n\n\n# Rate Limiting\n\nThis endpoint overrides the general rate limit with an account rate limit. Requests are limited by the authenticated account instead of the IP address. This endpoint is limited to `15` requests every `15` seconds","operationId":"subscribers_bulk_update_subscribers","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateSubscribers.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"429":{"$ref":"#/components/responses/RateLimitError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateSubscribers.Request"}}},"required":true}}}}}
```


# Templates

* Create Template [#post-templates](#post-templates "mention")
* Get Template [#get-templates-id](#get-templates-id "mention")
* Update Template [#patch-templates-id](#patch-templates-id "mention")
* Delete Template [#post-templates-id](#post-templates-id "mention")
* List Templates [#get-templates](#get-templates "mention")

## Create Template

> Required Fields: \`message\`\
> \
> Defaults:  \
> \`isMMS\` will default to false and a regular sms template will be created unless an \`attachment\` is provided. If \`name\` is not provided, up to the first 32 characters of the message will be used as the name.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateTemplate.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicMessageTemplate"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicMessageTemplate":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"message":{"type":"string"},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","message","timestamp"],"description":"IMessageTemplate without accountId"},{"type":"object","properties":{"attachment":{"type":"string","nullable":true},"mms":{"type":"boolean"}},"required":["mms"]}]},"CreateTemplate.Request":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"attachment":{"type":"string"},"isMMS":{"type":"boolean"}},"required":["message"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/templates":{"post":{"tags":["Templates"],"summary":"Create Template","operationId":"templates_create_template","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplate.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTemplate.Request"}}},"required":true},"description":"Required Fields: `message`\n\nDefaults:  \n`isMMS` will default to false and a regular sms template will be created unless an `attachment` is provided. If `name` is not provided, up to the first 32 characters of the message will be used as the name.\n\n\nundefined"}}}}
```

## GET /templates/{id}

> Get Template

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetTemplate.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicMessageTemplate"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicMessageTemplate":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"message":{"type":"string"},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","message","timestamp"],"description":"IMessageTemplate without accountId"},{"type":"object","properties":{"attachment":{"type":"string","nullable":true},"mms":{"type":"boolean"}},"required":["mms"]}]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/templates/{id}":{"get":{"tags":["Templates"],"summary":"Get Template","operationId":"templates_get_template","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetTemplate.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"isMMS","in":"query","required":true,"schema":{"type":"string"}},{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## PATCH /templates/{id}

> Update Template

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateTemplate.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicMessageTemplate"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicMessageTemplate":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"message":{"type":"string"},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","message","timestamp"],"description":"IMessageTemplate without accountId"},{"type":"object","properties":{"attachment":{"type":"string","nullable":true},"mms":{"type":"boolean"}},"required":["mms"]}]},"UpdateTemplate.Request":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"attachment":{"type":"string"},"isMMS":{"type":"boolean"},"updateAsMMS":{"type":"boolean"}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/templates/{id}":{"patch":{"tags":["Templates"],"summary":"Update Template","operationId":"templates_update_template","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplate.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTemplate.Request"}}},"required":true},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## POST /templates/{id}

> Delete Template

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteTemplate.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"DeleteTemplate.Request":{"type":"object","properties":{"isMMS":{"type":"boolean"}},"required":["isMMS"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/templates/{id}":{"post":{"tags":["Templates"],"summary":"Delete Template","operationId":"templates_delete_template","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTemplate.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteTemplate.Request"}}},"required":true},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /templates

> List Templates

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListTemplates.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicMessageTemplate"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicMessageTemplate":{"allOf":[{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"message":{"type":"string"},"timestamp":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","message","timestamp"],"description":"IMessageTemplate without accountId"},{"type":"object","properties":{"attachment":{"type":"string","nullable":true},"mms":{"type":"boolean"}},"required":["mms"]}]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/templates":{"get":{"tags":["Templates"],"summary":"List Templates","operationId":"templates_list_templates","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTemplates.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```


# Threads

* Get Thread [#get-threads-threadid](#get-threads-threadid "mention")
* Delete Thread [#delete-threads-threadid](#delete-threads-threadid "mention")
* List Threads [#get-threads](#get-threads "mention")
* Mark Thread as Read [#patch-threads-threadid-read](#patch-threads-threadid-read "mention")

### Thread Items

* Get Thread Items [#get-threads-threadid-items](#get-threads-threadid-items "mention")
* Delete Thread Item [#delete-threads-threadid-items](#delete-threads-threadid-items "mention")

## GET /threads/{threadId}

> Get Thread

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetThread.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicThread"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicThread":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"allSubscribers":{"type":"boolean"},"groups":{"type":"array","items":{"oneOf":[{"type":"number"},{"type":"string"}]}},"subscribers":{"type":"array","items":{"oneOf":[{"type":"number"},{"type":"string"}]}}},"required":["id","name","allSubscribers","groups","subscribers"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/threads/{threadId}":{"get":{"tags":["Threads"],"summary":"Get Thread","operationId":"threads_get_thread","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetThread.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## DELETE /threads/{threadId}

> Delete Thread

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteThread.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/threads/{threadId}":{"delete":{"tags":["Threads"],"summary":"Delete Thread","operationId":"threads_delete_thread","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteThread.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /threads

> List Threads

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListThreads.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"unread":{"type":"boolean"},"latestMessage":{"type":"object","nullable":true,"properties":{"message":{"type":"string"},"timestamp":{"type":"string"}},"required":["message","timestamp"]},"multipleRecipients":{"type":"boolean"}},"required":["id","name","unread","latestMessage","multipleRecipients"],"description":"ThreadInfo"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/threads":{"get":{"tags":["Threads"],"summary":"List Threads","operationId":"threads_list_threads","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListThreads.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```

## PATCH /threads/{threadId}/read

> Mark Thread as Read

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"UpdateAsRead.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/threads/{threadId}/read":{"patch":{"tags":["Threads"],"summary":"Mark Thread as Read","operationId":"threads_read_thread","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAsRead.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /threads/{threadId}/items

> Get Thread Items

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetThreadItems.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"accountId":{"type":"number"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"timestamp":{"type":"string"},"message":{"type":"number"},"inbound":{"type":"number"},"table":{"type":"number"},"scheduled":{"type":"boolean"},"users":{"type":"number"},"replyFrom":{"type":"number"},"url":{"type":"number"}},"required":["id","timestamp","message","inbound","table","scheduled"],"description":"IThreadItem"}},"count":{"type":"number"},"multipleRecipients":{"type":"boolean"},"recentReply":{"type":"object","properties":{"name":{"type":"string"},"number":{"type":"string"}},"required":["name","number"]}},"required":["accountId","name","items","count","multipleRecipients"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/threads/{threadId}/items":{"get":{"tags":["Threads"],"summary":"Get Thread Items","operationId":"threads_get_thread_items","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetThreadItems.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":true,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":true,"schema":{"type":"number"}},{"name":"getScheduled","in":"query","required":true,"schema":{"type":"boolean"}},{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## DELETE /threads/{threadId}/items

> Delete Thread Item

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"DeleteThreadItem.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/threads/{threadId}/items":{"delete":{"tags":["Threads"],"summary":"Delete Thread Item","operationId":"threads_delete_thread_item","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteThreadItem.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"threadId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```


# Unsubscribes

* Create Unsubscribe [#post-unsubscribes](#post-unsubscribes "mention")
* Get Unsubscribe for Number [#get-unsubscribes-number](#get-unsubscribes-number "mention")
* List Unsubscribes [#get-unsubscribes](#get-unsubscribes "mention")
* Bulk Unsubscribes [#post-unsubscribes-bulk](#post-unsubscribes-bulk "mention")

## POST /unsubscribes

> Create Unsubscribe

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CreateUnsubscribe.Response":{"$ref":"#/components/schemas/IApiResponse"},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"CreateUnsubscribe.Request":{"type":"object","properties":{"number":{"type":"string"}},"required":["number"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/unsubscribes":{"post":{"tags":["Unsubscribes"],"summary":"Create Unsubscribe","operationId":"unsubscribes_create_unsubscribe","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUnsubscribe.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUnsubscribe.Request"}}},"required":true}}}}}
```

## GET /unsubscribes/{number}

> Get Unsubscribe for Number

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetUnsubscribedStatus.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"unsubscribed":{"type":"boolean"}},"required":["unsubscribed"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/unsubscribes/{number}":{"get":{"tags":["Unsubscribes"],"summary":"Get Unsubscribe for Number","operationId":"unsubscribes_get_unsubscribe_status","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUnsubscribedStatus.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"number","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /unsubscribes

> List Unsubscribes

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListUnsubscribes.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicUnsubscribe"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicUnsubscribe":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"number":{"type":"string"},"email":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name","number","email","date"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/unsubscribes":{"get":{"tags":["Unsubscribes"],"summary":"List Unsubscribes","operationId":"unsubscribes_list_unsubscribes","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListUnsubscribes.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"number"}},{"name":"pageSize","in":"query","required":false,"schema":{"type":"number"}},{"name":"sortBy","in":"query","required":false,"schema":{"type":"string"}},{"name":"sortDirection","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc","ASC","DESC"]}},{"name":"order","in":"query","required":false,"schema":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"string","enum":["asc","desc","ASC","DESC"]}]},"minItems":2,"maxItems":2,"description":"The first item in the array must be the first item type and the second must be the second item type."}},{"name":"query","in":"query","required":false,"schema":{"type":"string"}}]}}}}
```

## Bulk Unsubscribes

> This endpoint allows users to unsubscribe subscribers in bulk. The endpoint would accept array of objects with key "number", which is the phone number of the subscriber to unsubscribe and of type string.\
> \
> \
> undefined

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"BulkCreateUnsubscribes.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"totalRecordCount":{"type":"number"},"unsubscribedRecordCount":{"type":"number"},"errorRecordCount":{"type":"number"},"unsubscribedRecords":{"type":"array","items":{"$ref":"#/components/schemas/IPublicNumber"}},"errorRecords":{"type":"array","items":{"type":"object","properties":{"number":{"type":"string"},"error":{"type":"string"}},"required":["number","error"],"description":"BulkCreateUnsubscribes.ErrorRecord"}}},"required":["totalRecordCount","unsubscribedRecordCount","errorRecordCount","unsubscribedRecords","errorRecords"]}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicNumber":{"type":"object","properties":{"id":{"type":"number"},"firstName":{"type":"string"},"lastName":{"type":"string"},"email":{"type":"string"},"number":{"type":"number"},"e164Number":{"type":"string"},"date":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"countryId":{"type":"number"},"groups":{"type":"array","items":{"$ref":"#/components/schemas/IPublicGroupName"}},"subscriberFieldData":{"type":"array","items":{"$ref":"#/components/schemas/IPublicSubscriberFieldDatum"}},"signupMethod":{"type":"number","nullable":true},"longNumber":{"type":"number"},"carrierId":{"type":"number"}},"required":["id","firstName","lastName","email","number","date","countryId","groups","subscriberFieldData","signupMethod","longNumber","carrierId"]},"IPublicGroupName":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"addedToGroupAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","name"]},"IPublicSubscriberFieldDatum":{"type":"object","properties":{"id":{"type":"number"},"subscriberFieldId":{"type":"number"},"data":{"type":"string"}},"required":["id","subscriberFieldId","data"]},"BulkCreateUnsubscribes.Request":{"type":"array","items":{"$ref":"#/components/schemas/CreateUnsubscribe.Request"}},"CreateUnsubscribe.Request":{"type":"object","properties":{"number":{"type":"string"}},"required":["number"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/unsubscribes/bulk":{"post":{"tags":["Unsubscribes"],"summary":"Bulk Unsubscribes","operationId":"unsubscribes_bulk_unsubscribe","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateUnsubscribes.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkCreateUnsubscribes.Request"}}},"required":true},"description":"This endpoint allows users to unsubscribe subscribers in bulk. The endpoint would accept array of objects with key \"number\", which is the phone number of the subscriber to unsubscribe and of type string.\n\n\nundefined"}}}}
```


# Verify

* Trigger SMS Verification Code [#post-verify-sms-send-code](#post-verify-sms-send-code "mention")
* Check SMS Verification Code [#post-verify-sms-check-code](#post-verify-sms-check-code "mention")
* Get Verification [#get-verify-verificationid](#get-verify-verificationid "mention")
* List Verifications [#get-verify](#get-verify "mention")
* Verify Phone Number [#post-verify-number](#post-verify-number "mention")

## POST /verify/sms/send-code

> Trigger SMS Verification Code

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"SendCode.Response":{"type":"object","properties":{"to":{"type":"string"},"timeoutSeconds":{"type":"number"},"type":{"type":"string","enum":["sms"]},"status":{"$ref":"#/components/schemas/VerifyCodeStatus"},"messageId":{"type":"string"},"verificationId":{"type":"string"},"deliverable":{"type":"boolean"},"reason":{"type":"string"},"carrier":{"type":"string"},"lineType":{"type":"string"},"risk":{"allOf":[{"$ref":"#/components/schemas/VerifyRisk"},{"$ref":"#/components/schemas/NullReference"}]}},"required":["to","timeoutSeconds","type","status","messageId","verificationId","deliverable","reason","carrier","lineType"]},"VerifyCodeStatus":{"type":"string","enum":["PENDING","APPROVED","EXPIRED","INVALID"]},"VerifyRisk":{"type":"string","enum":["invalid_format","deny_list","unsubscribed","suspended","deactivated","landline","voip","unknown"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"SendCode.Request":{"type":"object","properties":{"to":{"type":"string"},"serviceName":{"type":"string"},"timeoutSeconds":{"type":"number"},"codeLength":{"type":"number"},"realtime":{"type":"boolean"},"bypass":{"type":"boolean"},"externalId":{"type":"string"},"longcodeId":{"type":"number"},"tags":{"type":"object","additionalProperties":{"type":"string"}},"poolId":{"type":"string"},"senderName":{"type":"string"},"gated":{"type":"boolean"}},"required":["to"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify/sms/send-code":{"post":{"tags":["Verify"],"summary":"Trigger SMS Verification Code","operationId":"verify_send_sms_verification_code","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCode.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendCode.Request"}}},"required":true}}}}}
```

## POST /verify/sms/check-code

> Check SMS Verification Code

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"CheckCode.Response":{"type":"object","properties":{"to":{"type":"string"},"verificationId":{"type":"string"},"status":{"$ref":"#/components/schemas/VerifyCodeStatus"}},"required":["to","verificationId","status"]},"VerifyCodeStatus":{"type":"string","enum":["PENDING","APPROVED","EXPIRED","INVALID"]},"CheckCode.Request":{"type":"object","properties":{"to":{"type":"string"},"verificationId":{"type":"string"},"code":{"type":"string"}},"required":["code"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify/sms/check-code":{"post":{"tags":["Verify"],"summary":"Check SMS Verification Code","operationId":"verify_check_sms_verification_code","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCode.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckCode.Request"}}},"required":true}}}}}
```

## GET /verify/{verificationId}

> Get Verification

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetVerification.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicVerifyRequest"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicVerifyRequest":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"serviceName":{"type":"string"},"timeoutSeconds":{"type":"number"},"codeLength":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"expiresAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","number","serviceName","timeoutSeconds","codeLength","createdAt","expiresAt"],"description":"IVerifyRequest without accountId, secret"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify/{verificationId}":{"get":{"tags":["Verify"],"summary":"Get Verification","operationId":"verify_get_verification","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetVerification.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"verificationId","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /verify

> List Verifications

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListVerifications.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicVerifyRequest"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicVerifyRequest":{"type":"object","properties":{"id":{"type":"string"},"number":{"type":"string"},"serviceName":{"type":"string"},"timeoutSeconds":{"type":"number"},"codeLength":{"type":"number"},"createdAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"expiresAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["id","number","serviceName","timeoutSeconds","codeLength","createdAt","expiresAt"],"description":"IVerifyRequest without accountId, secret"}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify":{"get":{"tags":["Verify"],"summary":"List Verifications","operationId":"verify_list_verifications","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListVerifications.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"codeLength":{"type":"number"},"timeoutSeconds":{"type":"number"},"date":{"type":"string"},"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":[]}}]}}}}
```

## POST /verify/number

> Verify Phone Number

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"VerifyNumber.Response":{"type":"object","properties":{"deliverable":{"type":"boolean"},"reason":{"type":"string"},"carrier":{"type":"string"},"lineType":{"type":"string"},"risk":{"allOf":[{"$ref":"#/components/schemas/VerifyRisk"},{"$ref":"#/components/schemas/NullReference"}]}},"required":["deliverable","reason","carrier","lineType"]},"VerifyRisk":{"type":"string","enum":["invalid_format","deny_list","unsubscribed","suspended","deactivated","landline","voip","unknown"]},"NullReference":{"title":"Null Reference","description":"Used when a reference can be null","enum":[null]},"VerifyNumber.Request":{"type":"object","properties":{"number":{"type":"string"},"bypass":{"type":"boolean"}},"required":["number"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/verify/number":{"post":{"tags":["Verify"],"summary":"Verify Phone Number","operationId":"verify_verify_number","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNumber.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyNumber.Request"}}},"required":true}}}}}
```


# Webhooks

For more information on how to use these endpoints see [setting-up-webhooks](https://developers.mobile-text-alerts.com/getting-started/setting-up-webhooks "mention") and [webhooks](https://developers.mobile-text-alerts.com/tutorials/webhooks "mention").

* Register Webhook [POST /webhooks](#register-webhook)
* List Webhooks [GET /webhooks](#list-webhooks)
* Update Webhook [PATCH /webhooks/{webhookId}](#update-a-webhook)
* Delete Webhook [DELETE /webhooks/{webhookId}](#delete-a-webhook)

{% hint style="info" %}
You will need the `{webhookId}` of the webhook you want to update/delete. The ids for all your registered webhooks can be found by calling the [List Webhooks endpoint](#list-webhooks).
{% endhint %}

## Register Webhook

<mark style="color:green;">`POST`</mark> <mark style="color:blue;">`/webhooks`</mark>

**Headers**

<table><thead><tr><th width="230">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td><a href="../../getting-started/get-an-api-key#bearer-token-authentication">Authorization</a></td><td><code>Bearer</code> <a href="../../getting-started/get-an-api-key#bearer-token-authentication"><code>&#x3C;APIKey></code></a></td></tr></tbody></table>

**Request Fields**

<table><thead><tr><th width="275">Name</th><th width="134">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>event</code><em>(required)</em></td><td><code>string</code></td><td>The <a href="#event-types">event type</a> to be registered: <code>message-reply</code>, <code>delivery-status</code>,<code>message-send</code> , or <code>number-opt-in</code>.</td></tr><tr><td><code>url</code><em>(required)</em></td><td><code>string</code></td><td><p>This is your hosted URL endpoint that Mobile Text Alerts will make a <code>POST</code> request to when events trigger. </p><p></p><p>The only requirement for this endpoint is that the response has a <mark style="color:green;"><code>200</code></mark> HTTP status code.</p></td></tr><tr><td><code>secret</code><em>(required)</em></td><td><code>string</code></td><td>This is shared secret between your organization and Mobile Text Alerts, used to authenticate webhook requests. Your webhook listener validates the value in the request with the shared secret. </td></tr><tr><td><code>alertEmail</code></td><td><code>string</code></td><td><p>The email address to be contacted for failure email alerts. </p><p></p><p>If an <code>alertEmail</code> is not configured but <code>sendAlertEmail</code>  is set to <code>true</code>, the account's main email will be used.</p></td></tr><tr><td><code>sendAlertEmail</code></td><td><code>boolean</code></td><td><p>Default value is <code>false</code> . </p><p></p><p> If <code>true</code>,  Mobile Text Alerts will send a <a href="#webhook-failure-email-alerts">failure alert email </a>to the configured <code>alertEmail</code> on the webhook. If<code>false</code> (or not supplied when registering the webhook) no failure email alerts will be sent.</p></td></tr><tr><td><code>skipErrors</code></td><td><code>boolean</code></td><td>If set to <code>true</code>, all error responses(non-<mark style="color:green;"><code>200</code></mark>) for requests to your configured URL will be ignored. If <a href="#webhook-failure-email-alerts">failure email alerts</a> are configured, they will not be triggered.</td></tr><tr><td><code>skipErrorCodes</code></td><td><code>string[]</code></td><td>This field can be used to indicate specific error codes to be ignored, failure email alerts will not be sent for these codes.</td></tr><tr><td><code>retryOnError</code></td><td><code>boolean</code></td><td><p>If set to <code>true</code>, a retry request will be made to your configured URL if the previous request resulted in an error response. Which responses are errors is determined by if <code>skipErrors</code> is enabled (all non-<mark style="color:green;"><code>200</code></mark> status codes ignored as errors) or <code>skipErrorCodes</code> (all specified error codes ignored as errors).</p><p></p><p>Mobile Text Alerts uses exponential backoff for retry calls, with up to <strong>2</strong> retry attempts.</p></td></tr><tr><td><code>maxThroughputPerMinute</code></td><td><code>number</code></td><td>Indicate the maximum number of requests that can be sent to the configured URL in a 60 second window.</td></tr></tbody></table>

**Example Request**

{% tabs %}
{% tab title="cURL" %}

```bash
curl --location --request POST 'https://api.mobile-text-alerts.com/v3/webhooks' \
  --header 'Authorization: Bearer <APIKey>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "event": "delivery-status",
    "url": "https://www.example.com/app/hooks",
    "secret": "abc123-abc2-cde1-1234-xyz123456",
    "alertEmail": "alert@example.com",
    "sendAlertEmail": true
}'
```

{% endtab %}

{% tab title="Node.js" %}
Requirements: Node.js `18+` (native `fetch`) and an `MTA_API_KEY` environment variable.

```js
async function main() {
  const response = await fetch('https://api.mobile-text-alerts.com/v3/webhooks', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      event: 'delivery-status',
      url: 'https://www.example.com/app/hooks',
      secret: 'abc123-abc2-cde1-1234-xyz123456',
      alertEmail: 'alert@example.com',
      sendAlertEmail: true
    })
  });

  const data = await response.json();
  console.log(data);
}

main().catch((err) => {
  console.error('Request failed:', err);
  process.exitCode = 1;
});
```

{% endtab %}

{% tab title="Python" %}
Requirements: `pip install requests` and an `MTA_API_KEY` environment variable.

```python
import requests
import os

response = requests.post(
    'https://api.mobile-text-alerts.com/v3/webhooks',
    headers={
        'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}',
        'Content-Type': 'application/json'
    },
    json={
        'event': 'delivery-status',
        'url': 'https://www.example.com/app/hooks',
        'secret': 'abc123-abc2-cde1-1234-xyz123456',
        'alertEmail': 'alert@example.com',
        'sendAlertEmail': True
    }
    )
print(response.json())
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "Webhook 11 created successfully.",
  "data": {
    "id": 11,
    "event": "delivery-status",
    "url": "https://www.example.com/app/hooks",
    "alertEmail": "alert@example.com",
    "sendAlertEmail": true,
    "skipErrors": false,
    "skipErrorCodes": [],
    "retryOnError": true,
    "maxThroughputPerMinute": 600,
    "createdAt": "2022-04-18T05:00:00.000Z"
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "httpCode": 400,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "bad_request_error",
  "name": "MTABadRequestError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "httpCode": 401,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "unauthorized_error",
  "name": "MTAUnauthorizedError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="403" %}

```json
{
  "httpCode": 403,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "forbidden_error",
  "name": "MTAForbiddenError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "reason": null
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "httpCode": 500,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "internal_server_error",
  "name": "MTAInternalServerError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}
{% endtabs %}

## List Webhooks

<mark style="color:green;">`GET`</mark> `/webhooks`&#x20;

You can view all the webhooks that have been configured for your account by calling the List Webhooks endpoint.

**Headers**

<table><thead><tr><th width="230">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td><a href="../../getting-started/get-an-api-key#bearer-token-authentication">Authorization</a></td><td><code>Bearer</code> <a href="../../getting-started/get-an-api-key#bearer-token-authentication"><code>&#x3C;APIKey></code></a></td></tr></tbody></table>

**Example Request**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -L \
  -H 'Authorization: Bearer <APIKEY>' \
  'https://api.mobile-text-alerts.com/v3/webhooks'
```

{% endtab %}

{% tab title="Node.js" %}

```js
const response = await fetch(
  'https://api.mobile-text-alerts.com/v3/webhooks',
  {
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`
    }
  }
);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.get(
    'https://api.mobile-text-alerts.com/v3/webhooks',
    headers={'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}'}
)

```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "data": {
    "rows": [
      {
        "id": 100,
        "event": "delivery-status",
        "url": "https://example.com/webhook/delivery",
        "alertEmail": "alert@example.com",
        "createdAt": "2021-01-01T00:00:00.000Z"
      },
      {
        "id": 101,
        "event": "message-reply",
        "url": "https://example.com/webhook/reply",
        "alertEmail": "alert@example.com",
        "createdAt": "2021-01-01T00:00:00.000Z"
      }
    ],
    "page": 0,
    "pageSize": 25,
    "total": 2
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "httpCode": 400,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "bad_request_error",
  "name": "MTABadRequestError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "httpCode": 401,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "unauthorized_error",
  "name": "MTAUnauthorizedError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="403" %}

```json
{
  "httpCode": 403,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "forbidden_error",
  "name": "MTAForbiddenError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "reason": null
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "httpCode": 500,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "internal_server_error",
  "name": "MTAInternalServerError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}
{% endtabs %}

## Update Webhook

<mark style="color:purple;background-color:purple;">`PATCH`</mark> <mark style="color:blue;background-color:purple;">`/webhooks/{webhookId}`</mark>

You can edit an existing webhook you have created on your account by calling this endpoint. The path includes the `{webhookId}` of the webhook to be updated.

**Headers**

<table><thead><tr><th width="230">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td><a href="../../getting-started/get-an-api-key#bearer-token-authentication">Authorization</a></td><td><code>Bearer</code> <a href="../../getting-started/get-an-api-key#bearer-token-authentication"><code>&#x3C;APIKey></code></a></td></tr></tbody></table>

**Request Fields**

* `event: string` - Event type. One of: `message-reply`, `delivery-status`, `message-send`, `number-opt-in`.
* `url: string` - Your hosted endpoint URL that receives webhook `POST` requests.
* `secret: string` - Shared secret used to sign webhook requests.
* `alertEmail: string` - Email address to receive failure alerts.
* `sendAlertEmail: boolean` - If `true`, send failure alert emails.
* `skipErrors: boolean` - If `true`, ignore all non-`200` responses from your endpoint.
* `skipErrorCodes: string[]` - Error codes to ignore.
* `retryOnError: boolean` - If `true`, retry failed webhook requests (exponential backoff, up to 2 attempts).
* `maxThroughputPerMinute: number` - Max requests per 60-second window.

**Example Request**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -L \
  --request PATCH \
  --url 'https://api.mobile-text-alerts.com/v3/webhooks/11' \
  --header 'Authorization: Bearer <APIKey>' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "url": "https://www.example.com/app/hooks",
    "secret": "abc123-abc2-cde1-1234-xyz123456",
    "alertEmail": "alert@example.com",
    "sendAlertEmail": true,
    "maxThroughputPerMinute": 1000
}'
```

{% endtab %}

{% tab title="Node.js" %}
Requirements: Node.js `18+` (native `fetch`) and an `MTA_API_KEY` environment variable.

```js
async function main() {
  const response = await fetch('https://api.mobile-text-alerts.com/v3/webhooks/11', {
    method: 'PATCH',
    headers: {
      'Authorization': `Bearer ${process.env.MTA_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      url: 'https://www.example.com/app/hooks',
      secret: 'abc123-abc2-cde1-1234-xyz123456',
      alertEmail: 'alert@example.com',
      sendAlertEmail: true,
      maxThroughputPerMinute: 1000
    })
  });

  const data = await response.json();
  console.log(data);
}

main().catch((err) => {
  console.error('Request failed:', err);
  process.exitCode = 1;
});
```

{% endtab %}

{% tab title="Python" %}
Requirements: `pip install requests` and an `MTA_API_KEY` environment variable.

```python
import requests
import os

response = requests.patch(
    'https://api.mobile-text-alerts.com/v3/webhooks/11',
    headers={
        'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}',
        'Content-Type': 'application/json'
    },
    json={
        'url': 'https://www.example.com/app/hooks',
        'secret': 'abc123-abc2-cde1-1234-xyz123456',
        'alertEmail': 'alert@example.com',
        'sendAlertEmail': True,
        'maxThroughputPerMinute': 1000
    }
    )
print(response.json())
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "Webhook 11 updated successfully.",
  "data": {
    "id": 11,
    "event": "delivery-status",
    "url": "https://www.example.com/app/hooks",
    "alertEmail": "alert@example.com",
    "sendAlertEmail": true,
    "skipErrors": false,
    "skipErrorCodes": [],
    "retryOnError": true,
    "maxThroughputPerMinute": 1000,
    "createdAt": "2022-04-18T05:00:00.000Z"
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "httpCode": 400,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "bad_request_error",
  "name": "MTABadRequestError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "httpCode": 401,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "unauthorized_error",
  "name": "MTAUnauthorizedError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="403" %}

```json
{
  "httpCode": 403,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "forbidden_error",
  "name": "MTAForbiddenError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "reason": null
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "httpCode": 500,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "internal_server_error",
  "name": "MTAInternalServerError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}
{% endtabs %}

## Delete Webhook

<mark style="color:red;background-color:red;">`DELETE`</mark> <mark style="color:blue;background-color:red;">`/webhooks/{webhookId}`</mark>

Webhooks can be deleted without needing to supply a request body. Simply include the `{webhookId}` of the webhook to be deleted as a path parameter.

**Headers**

<table><thead><tr><th width="230">Name</th><th>Value</th></tr></thead><tbody><tr><td>Content-Type</td><td><code>application/json</code></td></tr><tr><td><a href="../../getting-started/get-an-api-key#bearer-token-authentication">Authorization</a></td><td><code>Bearer</code> <a href="../../getting-started/get-an-api-key#bearer-token-authentication"><code>&#x3C;APIKey></code></a></td></tr></tbody></table>

**Example Request**

{% tabs %}
{% tab title="cURL" %}

```bash
curl -L \
  --request DELETE \
  --url 'https://api.mobile-text-alerts.com/v3/webhooks/11' \
  --header 'Authorization: Bearer <APIKey>'
```

{% endtab %}

{% tab title="Node.js" %}

```js
const response = await fetch('https://api.mobile-text-alerts.com/v3/webhooks/11', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.MTA_API_KEY}`
  }
});

const data = await response.json();
console.log(data);
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

response = requests.delete(
    'https://api.mobile-text-alerts.com/v3/webhooks/11',
    headers={'Authorization': f'Bearer {os.getenv("MTA_API_KEY")}'}
)

print(response.json())
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "message": "Webhook 11 deleted successfully."
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "httpCode": 400,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "bad_request_error",
  "name": "MTABadRequestError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "httpCode": 401,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "unauthorized_error",
  "name": "MTAUnauthorizedError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}

{% tab title="403" %}

```json
{
  "httpCode": 403,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "forbidden_error",
  "name": "MTAForbiddenError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000",
  "reason": null
}
```

{% endtab %}

{% tab title="500" %}

```json
{
  "httpCode": 500,
  "message": "text",
  "timestamp": "2026-02-10T03:37:28.425Z",
  "type": "internal_server_error",
  "name": "MTAInternalServerError",
  "requestId": "123e4567-e89b-12d3-a456-426614174000"
}
```

{% endtab %}
{% endtabs %}


# Webinars

* Get Webinar [#get-webinars-webinaridentifier](#get-webinars-webinaridentifier "mention")
* List Webinars [#get-webinars](#get-webinars "mention")
* List Webinar Events [#get-webinars-events](#get-webinars-events "mention")

## GET /webinars/{webinarIdentifier}

> Get Webinar

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"GetWebinar.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/IPublicWebinar"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicWebinar":{"allOf":[{"type":"object","properties":{"webinarId":{"type":"string"},"webinarHash":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string"},"recurring":{"type":"string","nullable":true},"eventType":{"type":"string"},"schedules":{"type":"string"},"eventDatetime":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timezone":{"type":"string"},"presenters":{"type":"string","nullable":true},"registrationUrl":{"type":"string","nullable":true},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"isWebinarjam":{"type":"number"},"organizerKey":{"type":"string"},"inactive":{"type":"boolean"},"zoomUUID":{"type":"string","nullable":true},"zoomWebinarId":{"type":"number"},"zoomOccurrenceId":{"type":"number","nullable":true},"zoomRecurrenceType":{"type":"number","nullable":true},"zoomRegistrationType":{"type":"number","nullable":true},"zoomType":{"type":"number","nullable":true},"gotoWebinarKey":{"type":"string","nullable":true},"gotoWebinarId":{"type":"string","nullable":true},"gotoAccountKey":{"type":"string","nullable":true},"gotoRecurrenceType":{"type":"string","nullable":true},"gotoExperienceType":{"type":"string","nullable":true},"duration":{"type":"number","nullable":true},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["webinarId","name","description","schedules","eventDatetime","timezone","created","organizerKey","inactive"],"description":"IWebinar without id, accountId"},{"type":"object","properties":{"id":{"type":"number"},"webinarSettingId":{"type":"number"},"registrants":{"type":"number"},"participants":{"type":"number"},"absentees":{"type":"number"},"groupId":{"type":"number"},"enableWelcome":{"type":"boolean"},"enableReminders":{"type":"boolean"},"enableAbsentees":{"type":"boolean"}},"required":[]}]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/webinars/{webinarIdentifier}":{"get":{"tags":["Webinars"],"summary":"Get Webinar","operationId":"webinars_get_webinar","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetWebinar.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"webinarIdentifier","in":"path","required":true,"schema":{"type":"string"}}]}}}}
```

## GET /webinars

> List Webinars

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListWebinars.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicWebinar"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicWebinar":{"allOf":[{"type":"object","properties":{"webinarId":{"type":"string"},"webinarHash":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string"},"recurring":{"type":"string","nullable":true},"eventType":{"type":"string"},"schedules":{"type":"string"},"eventDatetime":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timezone":{"type":"string"},"presenters":{"type":"string","nullable":true},"registrationUrl":{"type":"string","nullable":true},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"isWebinarjam":{"type":"number"},"organizerKey":{"type":"string"},"inactive":{"type":"boolean"},"zoomUUID":{"type":"string","nullable":true},"zoomWebinarId":{"type":"number"},"zoomOccurrenceId":{"type":"number","nullable":true},"zoomRecurrenceType":{"type":"number","nullable":true},"zoomRegistrationType":{"type":"number","nullable":true},"zoomType":{"type":"number","nullable":true},"gotoWebinarKey":{"type":"string","nullable":true},"gotoWebinarId":{"type":"string","nullable":true},"gotoAccountKey":{"type":"string","nullable":true},"gotoRecurrenceType":{"type":"string","nullable":true},"gotoExperienceType":{"type":"string","nullable":true},"duration":{"type":"number","nullable":true},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["webinarId","name","description","schedules","eventDatetime","timezone","created","organizerKey","inactive"],"description":"IWebinar without id, accountId"},{"type":"object","properties":{"id":{"type":"number"},"webinarSettingId":{"type":"number"},"registrants":{"type":"number"},"participants":{"type":"number"},"absentees":{"type":"number"},"groupId":{"type":"number"},"enableWelcome":{"type":"boolean"},"enableReminders":{"type":"boolean"},"enableAbsentees":{"type":"boolean"}},"required":[]}]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/webinars":{"get":{"tags":["Webinars"],"summary":"List Webinars","operationId":"webinars_list_webinars","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWebinars.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"}},"required":[]}}]}}}}
```

## GET /webinars/events

> List Webinar Events

```json
{"openapi":"3.0.0","info":{"title":"Mobile Text Alerts API","version":"8.0.0"},"servers":[{"url":"https://api.mobile-text-alerts.com/v3"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"apiKey"}},"schemas":{"ListWebinarEvents.Response":{"allOf":[{"$ref":"#/components/schemas/IApiResponsePaginated"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{"$ref":"#/components/schemas/IPublicWebinar"}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"]}},"required":["data"]}]},"IApiResponsePaginated":{"allOf":[{"$ref":"#/components/schemas/IApiResponse"},{"type":"object","properties":{"data":{"type":"object","properties":{"rows":{"type":"array","items":{}},"page":{"type":"number"},"pageSize":{"type":"number"},"total":{"type":"number"}},"required":["rows","page","pageSize","total"],"description":"PaginationData"}},"required":["data"]}]},"IApiResponse":{"type":"object","properties":{"success":{"type":"boolean"},"error":{"type":"string"},"message":{"type":"string"},"data":{}},"required":[]},"IPublicWebinar":{"allOf":[{"type":"object","properties":{"webinarId":{"type":"string"},"webinarHash":{"type":"string","nullable":true},"name":{"type":"string"},"description":{"type":"string"},"recurring":{"type":"string","nullable":true},"eventType":{"type":"string"},"schedules":{"type":"string"},"eventDatetime":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"timezone":{"type":"string"},"presenters":{"type":"string","nullable":true},"registrationUrl":{"type":"string","nullable":true},"created":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]},"isWebinarjam":{"type":"number"},"organizerKey":{"type":"string"},"inactive":{"type":"boolean"},"zoomUUID":{"type":"string","nullable":true},"zoomWebinarId":{"type":"number"},"zoomOccurrenceId":{"type":"number","nullable":true},"zoomRecurrenceType":{"type":"number","nullable":true},"zoomRegistrationType":{"type":"number","nullable":true},"zoomType":{"type":"number","nullable":true},"gotoWebinarKey":{"type":"string","nullable":true},"gotoWebinarId":{"type":"string","nullable":true},"gotoAccountKey":{"type":"string","nullable":true},"gotoRecurrenceType":{"type":"string","nullable":true},"gotoExperienceType":{"type":"string","nullable":true},"duration":{"type":"number","nullable":true},"updatedAt":{"oneOf":[{"format":"date-time","type":"string"},{"type":"string"}]}},"required":["webinarId","name","description","schedules","eventDatetime","timezone","created","organizerKey","inactive"],"description":"IWebinar without id, accountId"},{"type":"object","properties":{"id":{"type":"number"},"webinarSettingId":{"type":"number"},"registrants":{"type":"number"},"participants":{"type":"number"},"absentees":{"type":"number"},"groupId":{"type":"number"},"enableWelcome":{"type":"boolean"},"enableReminders":{"type":"boolean"},"enableAbsentees":{"type":"boolean"}},"required":[]}]},"WebinarEventType":{"type":"string","enum":["Webinar","Meeting"]},"WebinarRecurringPeriod":{"type":"string","enum":["One Time","Daily","Weekly","Monthly","No Fixed Time"]}},"responses":{"BadRequestError":{"description":"BadRequestError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[400]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["bad_request_error"]},"name":{"type":"string","enum":["MTABadRequestError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"UnauthorizedError":{"description":"UnauthorizedError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[401]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["unauthorized_error"]},"name":{"type":"string","enum":["MTAUnauthorizedError"]},"requestId":{"type":"string","format":"uuid"}}}}}},"ForbiddenError":{"description":"ForbiddenError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[403]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["forbidden_error"]},"name":{"type":"string","enum":["MTAForbiddenError"]},"requestId":{"type":"string","format":"uuid"},"reason":{}}}}}},"InternalServerError":{"description":"InternalServerError","content":{"application/json":{"schema":{"type":"object","properties":{"httpCode":{"type":"number","enum":[500]},"message":{"type":"string"},"timestamp":{"type":"string","format":"date-time"},"type":{"type":"string","enum":["internal_server_error"]},"name":{"type":"string","enum":["MTAInternalServerError"]},"requestId":{"type":"string","format":"uuid"}}}}}}}},"paths":{"/webinars/events":{"get":{"tags":["Webinars"],"summary":"List Webinar Events","operationId":"webinars_list_webinar_events","responses":{"200":{"description":"Success","headers":{"RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"Retry-After":{"description":"The number of seconds to wait before retrying the request","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"The maximum number of requests that the consumer is permitted to make per window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the current rate limit window","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"The remaining window before the rate limit resets in milliseconds","schema":{"type":"integer"}},"X-Request-ID":{"description":"A unique identifier for the request","schema":{"type":"string","format":"uuid"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListWebinarEvents.Response"}}}},"400":{"$ref":"#/components/responses/BadRequestError"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/ForbiddenError"},"500":{"$ref":"#/components/responses/InternalServerError"}},"parameters":[{"name":"filters","in":"query","required":false,"schema":{"type":"object","properties":{"startDate":{"type":"string"},"endDate":{"type":"string"},"eventType":{"$ref":"#/components/schemas/WebinarEventType"},"recurring":{"$ref":"#/components/schemas/WebinarRecurringPeriod"}},"required":[]}}]}}}}
```


