openapi: 3.1.0
info:
  title: A2P Campaign Management (10DLC)
  description: >
    *These APIs are available only to customers who have been onboarded for the
    10DLC Registration Center. They are not widely available to all customers
    yet. If you are interested in joining the Beta for the 10DLC Registration
    Center, please reach out to your Bandwidth support contact. Otherwise,
    please continue to reference the existing [Campaign Management
    APIs](https://dev.bandwidth.com/apis/numbers-apis/numbers/v1/#tag/10DLC).*


    APIs to register TCR brands and campaigns (or to import them if Bandwidth is
    not acting as a customers’s CSP), as well as APIs to register phone numbers
    to those campaigns in order to send A2P messages in the North American
    market.


    #### Account Types


    These beta APIs currently only support import customer accounts. They will
    eventually support both import and direct customer accounts. The behavior is
    always consistent for an account type, but reflects where the content of
    campaign management resides: with Bandwidth, or with The Campaign Registry.


    #### Bandwidth identifiers


    Some Bandwidth APIs return a `bandwidthId` for TCR resources that have a TCR
    identifier, such as `campaignId` and `brandId`. Because Bandwidth’s
    interaction with TCR is asynchronous, there are times when a resource exists
    in Bandwidth’s systems before it exists in TCR’s systems. In these
    situations we will return a `bandwidthId` which can be substituted for a
    `campaignId` or `brandId` where these would be included in an URL to
    reference that resource. Once a TCR identifier is available and being
    returned, you can switch to that identifier (though the Bandwidth ID will
    continue to work as an alternative).


    #### Rate Limiting


    API consumers may use these APIs at the rate of 3 requests per second, with
    unused requests “banked” (at the rate of 3 requests per second) up to 12
    requests, which can then be used to handle short periods of “bursty”
    traffic. This rate applies across the use of all v2 A2P APIs, not per API.
    If this limit is exceeded, the APIs will return HTTP 429 (Too Many
    Requests).


    Athena 10DLC returns the following headers on API requests to manage
    rate-limiting by clients:


    - `X-Rate-Limit-Limit` - the rate limit per second (currently 3)

    - `X-Rate-Limit-Remaining` - the number of remaining requests in this second
    (will be less than 3)

    - `X-Rate-Limit-Retry-After-Seconds` - the time to wait before further
    requests can be made (currently one second)


    In extraordinary circumstances, rate limits may need to change, so
    evaluating these headers is recommended.
  contact:
    name: Bandwidth Support
    email: support@bandwidth.com
    url: https://support.bandwidth.com
  termsOfService: https://www.bandwidth.com/legal/terms-of-use-bandwidthcom-web-sites/
  version: 0.0.1
security:
  - Basic: []
servers:
  - url: https://api.bandwidth.com/api/v2
paths:
  /accounts/{accountId}/tendlc/phoneNumbers:
    get:
      tags:
        - 10DLC
      summary: Get 10DLC phone numbers
      operationId: getTenDlcPhoneNumbers
      description: >
        **All customers.** Get all 10DLC phone numbers that have been registered
        for 10DLC A2P traffic under this account, across all campaigns. This is
        a paginated API that can be sorted and filtered by a number of the
        fields in the 10DLC records. For example, it accepts a customer profile
        ID to filter to those numbers that have been assigned to that customer
        profile.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/registrationStatusParam'
        - $ref: '#/components/parameters/phoneNumberParam'
        - $ref: '#/components/parameters/campaignIdParam'
        - $ref: '#/components/parameters/customerProfileIdParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/modifiedDateParam'
      responses:
        '200':
          $ref: '#/components/responses/registrationListResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '409':
          $ref: '#/components/responses/errorResponse409'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/phoneNumbers/{phoneNumber}:
    get:
      tags:
        - 10DLC
      operationId: getTenDlcPhoneNumber
      summary: Get 10DLC phone number details
      description: >
        **All customers.** Get 10DLC phone number details, including information
        on the registration status of the number with the different mobile
        network operators.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/phoneNumberPathParam'
      responses:
        '200':
          $ref: '#/components/responses/registrationResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '409':
          $ref: '#/components/responses/errorResponse409'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/phoneNumbers/{phoneNumber}/history:
    get:
      tags:
        - 10DLC
      operationId: getTenDlcPhoneNumberHistory
      summary: Get 10DLC number provisioning history
      description: >
        **All customers.** Get the audit history of this 10DLC number, within
        the scope of activity occurring for this account. This is a paginated
        API sorted in reverse chronological order by default, but this can be
        changed with the `createdDate` query parameter.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/phoneNumberPathParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/messageParam'
        - $ref: '#/components/parameters/userNameParam'
      responses:
        '200':
          $ref: '#/components/responses/historyListResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '409':
          $ref: '#/components/responses/errorResponse409'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/brands:
    get:
      tags:
        - Brands
      operationId: getBrands
      summary: Get all brands for this account
      description: >
        **All customers.** Get all brands that have been created for this
        account. This is a paginated API that can be sorted and filtered by a
        number of the fields in the brand record. For example, it accepts a
        customer profile ID to filter to the brand that has been assigned to
        that customer profile.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/customerProfileIdParam'
        - $ref: '#/components/parameters/bandwidthIdParam'
        - $ref: '#/components/parameters/brandIdParam'
        - $ref: '#/components/parameters/brandIdentityStatusParam'
        - $ref: '#/components/parameters/brandTypeParam'
        - $ref: '#/components/parameters/companyNameParam'
        - $ref: '#/components/parameters/displayNameParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/modifiedDateParam'
      responses:
        '200':
          $ref: '#/components/responses/brandListResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/brands/{brandId}:
    get:
      tags:
        - Brands
      operationId: getBrand
      summary: Get details about a brand
      description: >
        **All customers.** Get details for this TCR brand (the actual details
        available to Bandwidth will differ substantially between import and
        direct customers). The ID used for the brand can either be the TCR
        assigned brand ID, or the customer profile ID associated to this brand
        if the brand has yet to be saved to TCR.        
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/brandIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/brandResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/campaigns:
    get:
      tags:
        - Campaigns
      operationId: getCampaigns
      summary: Get campaigns
      description: >
        **All customers.** Get all campaigns that have been created for this
        account. This is a paginated API that can be sorted and filtered by a
        number of the fields in the campaign record. For example, it accepts a
        customer profile ID to filter to those campaigns that have been assigned
        to that customer profile.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/brandIdParam'
        - $ref: '#/components/parameters/campaignNameParam'
        - $ref: '#/components/parameters/customerProfileIdsParam'
        - $ref: '#/components/parameters/campaignIdParam'
        - $ref: '#/components/parameters/bandwidthIdParam'
        - $ref: '#/components/parameters/campaignStatusParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/modifiedDateParam'
        - $ref: '#/components/parameters/vettingStatusParam'
      responses:
        '200':
          $ref: '#/components/responses/campaignListResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
    post:
      tags:
        - Campaigns
      operationId: createCampaign
      summary: Create or import a new campaign
      description: >
        The manual import of a campaign only requires the `campaignId` field and
        optionally, the `campaignName` field. If a campaign name is not
        provided, the campaign’s ID will be used as the campaign’s name. All of
        the rest of the campaign will be retrieved from TCR. The `campaignName`
        is not stored in TCR’s system.


        The campaign will be associated to this account. A campaign cannot be
        imported into more than one account (though the brand it is associated
        to can span accounts). If the campaign has already been imported or is
        in the process of being imported (which can take some time), this
        endpoint will return a 409 (CONFLICT). If necessary, the campaign’s
        brand will be associated to this account (and it will be created if
        necessary). If the brand is created, it will be created with an
        accompanying customer profile to represent the brand (the profile can be
        edited after it is created). 


        If a campaign is changed outside of Bandwidth’s systems, we will receive
        notification and update the campaign, however, it is safe to re-import
        manually at any time.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/newCampaignRequest'
      responses:
        '202':
          $ref: '#/components/responses/campaignAcceptedResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '409':
          $ref: '#/components/responses/errorResponse409'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/campaigns/{campaignId}:
    get:
      tags:
        - Campaigns
      operationId: getCampaign
      summary: Get details about a campaign
      description: |
        **All customers.** Get details for this TCR campaign.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/campaignIdPathParam'
      responses:
        '200':
          $ref: '#/components/responses/campaignCustomerResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
    put:
      tags:
        - Campaigns
      operationId: updateCampaign
      summary: Update a campaign
      description: >-
        Import customers may submit a campaign to this endpoint to update the
        campaign name (if no `campaignName` is provided, or it is set to null,
        the campaign’s TCR ID will be used). All other fields can be left off as
        they will be ignored.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/campaignIdPathParam'
      requestBody:
        $ref: '#/components/requestBodies/updatedCampaignRequest'
      responses:
        '202':
          $ref: '#/components/responses/campaignAcceptedResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
    post:
      tags:
        - Campaigns
      operationId: refreshCampaign
      summary: Refresh a campaign from TCR’s system
      description: >
        Refresh the information in Bandwidth’s systems based on the records at
        TCR. This will not update the brand or 10DLC registrations associated
        with the campaign. This is useful if a state change occurs in the
        campaign that has not been detected by Bandwidth.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/campaignIdPathParam'
      responses:
        '204':
          $ref: '#/components/responses/noBodyResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '409':
          $ref: '#/components/responses/errorResponse409'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
    delete:
      tags:
        - Campaigns
      operationId: deactivateCampaign
      summary: Deactivate a campaign
      description: >
        Delete a campaign from Bandwidth's system, starting by deregistering any
        associated phone numbers on the campaign. If any phone number fails to
        deregister, we will not delete the campaign. 

        Review the history of the campaign to see the status of the
        deactivation.


        The campaign will be removed from Bandwidth’s system. Any associated
        brand is left alone, even if this was the last campaign on that brand.
        The campaign remains in the TCR system.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/campaignIdPathParam'
      responses:
        '202':
          $ref: '#/components/responses/campaignAcceptedResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/campaigns/{campaignId}/phoneNumbers:
    get:
      tags:
        - 10DLC
      operationId: getCampaignPhoneNumbers
      summary: Get 10DLC numbers on campaign
      description: >-
        **All customers.** Get all phone numbers associated with a campaign.
        This includes numbers that are correctly assigned and numbers that
        Bandwidth believes to be currently registered to the campaign in
        external systems due to provisioning errors.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/campaignIdPathParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/phoneNumberParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/modifiedDateParam'
        - $ref: '#/components/parameters/customerProfileIdParam'
      responses:
        '200':
          $ref: '#/components/responses/getCampaignPhoneNumbersResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/campaigns/{campaignId}/history:
    get:
      tags:
        - Campaigns
      operationId: getCampaignHistory
      summary: Get campaign provisioning history
      description: >
        **All customers.** Get the provisioning history for a campaign. This is
        a paginated API sorted in reverse chronological order, but this can be
        changed with the `createdDate` query parameter.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/campaignIdPathParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/messageParam'
        - $ref: '#/components/parameters/userNameParam'
      responses:
        '200':
          $ref: '#/components/responses/historyListResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
  /accounts/{accountId}/tendlc/brands/{brandId}/history:
    get:
      tags:
        - Brands
      operationId: getBrandHistory
      summary: Get brand provisioning history
      description: >
        **All customers.** Get the provisioning history for a TCR brand. By
        default these records are sorted in reverse chronological order, but
        they can be sorted and filtered using the `createdDate` query parameter.
        This is a paginated API.
      parameters:
        - $ref: '#/components/parameters/accountIdPathParam'
        - $ref: '#/components/parameters/brandIdPathParam'
        - $ref: '#/components/parameters/brandIdParam'
        - $ref: '#/components/parameters/offsetParam'
        - $ref: '#/components/parameters/limitParam'
        - $ref: '#/components/parameters/createdDateParam'
        - $ref: '#/components/parameters/messageParam'
        - $ref: '#/components/parameters/userNameParam'
      responses:
        '200':
          $ref: '#/components/responses/historyListResponse'
        '400':
          $ref: '#/components/responses/errorResponse400'
        '401':
          $ref: '#/components/responses/errorResponse401'
        '403':
          $ref: '#/components/responses/errorResponse403'
        '404':
          $ref: '#/components/responses/errorResponse404'
        '405':
          $ref: '#/components/responses/errorResponse405'
        '429':
          $ref: '#/components/responses/errorResponse429'
        '500':
          $ref: '#/components/responses/errorResponse500'
        '503':
          $ref: '#/components/responses/errorResponse503'
components:
  securitySchemes:
    Basic:
      type: http
      scheme: basic
      description: >-
        Basic authentication is a simple authentication scheme built into the
        HTTP protocol. To use it, send your  HTTP requests with an Authorization
        header that contains the word Basic followed by a space and a
        base64-encoded string `username:password`. Example: `Authorization:
        Basic ZGVtbZpwQDU1dzByZA==`.
  parameters:
    accountIdPathParam:
      name: accountId
      description: User's account ID.
      in: path
      required: true
      schema:
        type: string
        examples:
          - '1234567'
    displayNameParam:
      name: displayName
      in: query
      description: Filtering and sorting parameter for `displayName`
      style: deepObject
      explode: true
      required: false
      schema:
        title: String query parameter
        description: Scheme for string query parameter
        properties:
          contains:
            $ref: '#/components/schemas/displayName'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: Acme
          - sort: DESC
    companyNameParam:
      name: companyName
      in: query
      description: Filtering and sorting parameter for `companyName`
      style: deepObject
      explode: true
      required: false
      schema:
        title: String query parameter
        description: Scheme for string query parameter
        properties:
          contains:
            $ref: '#/components/schemas/companyName'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: Acme, Inc.
          - sort: DESC
    brandTypeParam:
      name: brandType
      in: query
      description: Filtering and sorting parameter for `brandType`
      style: deepObject
      explode: true
      required: false
      schema:
        title: String query parameter
        description: Scheme for string query parameter
        properties:
          contains:
            $ref: '#/components/schemas/enumBrandType'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: NON_PROFIT
          - sort: DESC
    brandIdentityStatusParam:
      name: brandIdentityStatus
      in: query
      description: Filtering and sorting parameter for `brandIdentityStatus`
      style: deepObject
      explode: true
      required: false
      schema:
        title: String query parameter
        description: Scheme for string query parameter
        properties:
          contains:
            $ref: '#/components/schemas/enumBrandIdentityStatus'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: VERIFIED
          - sort: DESC
    brandIdParam:
      name: brandId
      in: query
      description: >-
        Filtering and sorting parameter for `brandId`. This will be the
        TCR-assigned brand ID.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: string
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: BABC
          - sort: DESC
    brandIdPathParam:
      name: brandId
      description: >-
        This can be the TCR-assigned brand ID, the Bandwidth-assigned identifier
        for this brand, or the customer profile ID that is associated to the
        brand in the given account (the last two IDs can be used even before the
        brand is successfully submitted to TCR).
      in: path
      required: true
      schema:
        type: string
        examples:
          - B5DG4HH
    campaignIdParam:
      name: campaignId
      in: query
      description: >-
        Filtering and sorting parameter for `campaignId`. This will be the
        TCR-assigned identifier for the campaign.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: string
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: CAB
          - sort: DESC
    campaignIdPathParam:
      name: campaignId
      description: >-
        This ID can be the TCR-assigned identifier for the campaign, or the
        internally generated identifier used by Bandwidth to track the campaign
        before it is submitted to TCR. The latter is returned when a campaign is
        created.
      in: path
      required: true
      schema:
        type: string
        examples:
          - CABCDEF
    bandwidthIdParam:
      name: bandwidthId
      in: query
      description: >-
        Filtering parameter for `bandwidthId`, the internally generated
        identified used by Bandwidth.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String query parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: string
        examples:
          - contains: WEPTN2N2T5
    campaignNameParam:
      name: campaignName
      description: Sorting and filtering parameter for `campaignName`.
      in: query
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: string
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: Acme, Inc.
          - sort: DESC
    createdDateParam:
      name: createdDate
      in: query
      description: Sorting and filtering parameter for `createdDate`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: DateTime Query Parameter
        description: Scheme for date & time query parameter
        properties:
          lt:
            type: string
            format: date-time
          gt:
            type: string
            format: date-time
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - lt: '2024-01-24T00:00:00Z'
          - gt: '2024-01-24T23:59:59Z'
          - sort: DESC
    customerProfileIdParam:
      name: customerProfileId
      in: query
      description: Filtering parameter for `customerProfileId`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: string
        examples:
          - contains: Xa39
    customerProfileIdsParam:
      name: customerProfileIds
      in: query
      description: >-
        Filtering parameter for a list of `customerProfileId`. The API will
        return entities where the `customerProfileId` matches any of the values
        in the list.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: array
            items:
              type: string
        examples:
          - contains: '[a,b,c]'
    limitParam:
      name: limit
      in: query
      description: Limit (page size) for pagination
      required: false
      schema:
        type: number
        default: 50
        maximum: 250
        examples:
          - limit: 10
    messageParam:
      name: message
      in: query
      description: Filtering and sorting parameter for `message`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Scheme for string query parameter
        properties:
          contains:
            type: string
        examples:
          - contains: created
    modifiedDateParam:
      description: Sorting parameter for `modifiedDate`.
      explode: true
      in: query
      name: modifiedDate
      required: false
      schema:
        description: Scheme for date & time query parameter
        examples:
          - gt: '2024-01-24T23:59:59Z'
          - lt: '2024-01-24T00:00:00Z'
          - sort: DESC
        properties:
          gt:
            format: date-time
            type: string
          lt:
            format: date-time
            type: string
          sort:
            $ref: '#/components/schemas/sort'
        title: DateTime Query Parameter
      style: deepObject
    offsetParam:
      name: offset
      in: query
      description: Offset for pagination (from zero, the first returned record)
      required: false
      schema:
        type: number
        default: 0
        examples:
          - offset: 25
    phoneNumberParam:
      name: phoneNumber
      in: query
      description: Filtering and sorting parameter for `phoneNumber`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Schema for string query parameter
        properties:
          contains:
            type: string
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: '+1206'
          - sort: DESC
    phoneNumberPathParam:
      name: phoneNumber
      description: Phone number in full E.164 format
      in: path
      required: true
      schema:
        type: string
        examples:
          - '+12056349312'
    registrationStatusParam:
      name: status
      in: query
      description: Filtering and sorting parameter for `status`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Schema for string query parameter
        properties:
          contains:
            $ref: '#/components/schemas/enumRegistrationStatus'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - contains: Acme
          - sort: DESC
    campaignStatusParam:
      name: status
      in: query
      description: Filtering and sorting parameter for `status`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Schema for string query parameter
        properties:
          eq:
            $ref: '#/components/schemas/enumCampaignStatus'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - eq: REGISTERED
          - sort: DESC
    vettingStatusParam:
      name: vettingStatus
      in: query
      description: Filtering and sorting parameter for `vettingStatus`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Schema for string query parameter
        properties:
          eq:
            $ref: '#/components/schemas/enumCampaignVettingStatus'
          sort:
            $ref: '#/components/schemas/sort'
        examples:
          - eq: REJECTED
          - sort: DESC
    userNameParam:
      name: userName
      in: query
      description: Filtering and sorting parameter for `userName`.
      style: deepObject
      explode: true
      required: false
      schema:
        title: String Query Parameter
        description: Schema for string query parameter
        properties:
          contains:
            type: string
        examples:
          - contains: jdoe
  requestBodies:
    newCampaignRequest:
      description: Campaign request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/newCampaign'
      required: true
    updatedCampaignRequest:
      description: Campaign request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/updatedCampaign'
      required: true
  responses:
    brandResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brandResponse'
      description: An individual TCR brand in the standard response envelope.
    brandListResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/brandListResponse'
      description: A paged list of TCR brands in the standard response envelope.
    campaignCreatedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaignCreatedResponse'
      description: >-
        An accepted response containing the Bandwidth ID that can be used to
        track the campaign's creation.
    campaignAcceptedResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaignAcceptedResponseObject'
      description: An accepted response containing the campaign and Bandwidth IDs.
    campaignCustomerResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaignCustomerResponse'
      description: An individual TCR campaign in the customer response envelope.
    campaignListResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/campaignListResponse'
      description: A paged list of TCR campaigns in the standard response envelope.
    getCampaignPhoneNumbersResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/getCampaignPhoneNumbersResponse'
      description: Get a paged response of phone numbers associated with a campaign.
    errorResponse400:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse400'
      description: Bad request. Cannot process the request.
    errorResponse401:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse401'
      description: Client is providing incorrect or invalid credentials.
    errorResponse403:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse403'
      description: Client is not authorized for this action.
    errorResponse404:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse404'
      description: >-
        Not found (either the endpoint, or the resource; the ID of the resource
        will be the description field of this response).
    errorResponse405:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse405'
      description: Method not allowed.
    errorResponse409:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse409'
      description: Conflict. A resource has been changed or already exists.
    errorResponse429:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse429'
      description: Too Many Requests.
      headers:
        Retry-After:
          description: How long to wait before retrying in seconds.
          schema:
            type: integer
    errorResponse500:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse500'
      description: Internal Server Error.
    errorResponse503:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse503'
      description: Service Unavailable Error.
    noBodyResponse:
      description: >-
        Accepted with no body content returned. Status may be 202 (accepted),
        204 (no content), or 429 (client is being rate-limited).
    historyListResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/historyListResponse'
      description: A paged list of history records for this resource.
    registrationResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/registrationResponse'
      description: A 10DLC registration record.
    registrationListResponse:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/registrationListResponse'
      description: A 10DLC registration record.
  schemas:
    approval:
      description: >-
        The status of registering a campaign with a carrier or external
        connectivity partner.
      examples:
        - partnerId: ATT
          decision: APRROVED
          messageClass: T
          tpm: 300
          mmsTpm: 300
        - partnerId: TMOBILE
          decision: APRROVED
          brandTier: UPPER_MID
          brandDailyCap: 40000
      properties:
        partnerId:
          $ref: '#/components/schemas/enumPartnerId'
        decision:
          $ref: '#/components/schemas/enumApprovalDecision'
        reason:
          type: string
          maxLength: 2048
          description: >-
            If the campaign was declined, we expect to receive an explanation as
            to why the carrier rejected the campaign, and that will be provided
            here. If the reason is longer than 2,048 characters, it will be
            silently truncated.
        messageClass:
          description: AT&T message class qualified by brand for a desired use case.
          type: string
          examples:
            - T
        tpm:
          description: >-
            AT&T SMS message segment throughput per minute, qualified by the
            brand for a desired use case.
          type: integer
          examples:
            - 2400
        mmsTpm:
          description: >-
            AT&T MMS message segment throughput per minute, qualified by the
            brand for a desired use case.
          type: integer
          examples:
            - 50
        brandTier:
          $ref: '#/components/schemas/enumTmobileBrandTier'
        brandDailyCap:
          description: T-Mobile daily message quota, applying across campaigns and CSPs.
          type: integer
          examples:
            - 40000
    getCampaignPhoneNumbersResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/registration'
        page:
          $ref: '#/components/schemas/responsePage'
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
        links:
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
          type: array
    brand:
      description: The properties of a TCR brand.
      required:
        - bandwidthId
        - customerProfileId
        - entityType
        - displayName
        - phone
        - country
        - countryCodeA3
        - brandRelationship
      properties:
        brandId:
          description: >-
            The TCR-generated identifier for this brand. The TCR and Bandwidth
            identifiers are interchangeable in the Bandwidth APIs and either can
            be used to retrieve information about the brand.
          type: string
          examples:
            - B1DER2J
        bandwidthId:
          description: >-
            The Bandwidth-generated identifier for this brand. The TCR and
            Bandwidth identifiers are interchangeable in the Bandwidth APIs and
            either can be used to retrieve information about the brand. The
            bandwidthId will be available on the brand before the TCR ID is
            available.
          type: string
          examples:
            - WEPTN2N2T5
        accounts:
          description: The accounts associated to this brand.
          type: array
          items:
            $ref: '#/components/schemas/brandAccount'
          examples:
            - accountId: '5001923'
              customerProfileId: 3IIzIFnRRQBE3AMzPpMTNo
            - accountId: '5001925'
              customerProfileId: 1D3FEV9bOfq6sWLSlRDebp
        createdDate:
          format: date-time
          type: string
          description: The time the brand was created in the TCR system.
          examples:
            - '2024-01-24T23:59:59Z'
        modifiedDate:
          format: date-time
          type: string
          description: The time the brand was last modified in the Bandwidth system.
          examples:
            - '2024-01-24T23:59:59Z'
        imported:
          type: boolean
        brandIdentityStatus:
          $ref: '#/components/schemas/enumBrandIdentityStatus'
        brandType:
          $ref: '#/components/schemas/enumBrandType'
        brandRelationship:
          $ref: '#/components/schemas/enumBrandRelationship'
        city:
          type: string
          maxLength: 100
          examples:
            - New York
        companyName:
          description: Legal Company Name. Not required for Sole Proprietor.
          type: string
          maxLength: 100
          examples:
            - Acme Amalgamated, Inc.
        displayName:
          type: string
          maxLength: 100
          examples:
            - Acme
        ein:
          description: >-
            Government assigned corporate tax ID, EIN is 9-digits in U.S. Not
            required for Sole_Proprietor.
          type: string
          maxLength: 9
          examples:
            - 214573154
        einIssuingCountry:
          description: ISO 2 character country code of the country that issued the EIN.
          type: string
          minLength: 2
          maxLength: 2
          examples:
            - US
        einIssuingCountryCodeA3:
          description: ISO 3 character country code of the country that issued the EIN.
          type: string
          minLength: 3
          maxLength: 3
          examples:
            - USA
        email:
          description: Valid email address of brand support contact.
          type: string
          maxLength: 100
        evpVettingScore:
          description: External vetting provider's score for this brand.
          type: integer
          format: int32
          examples:
            - 200
        governmentEntity:
          description: >-
            Is this brand closely affiliated to a federal, state, local, or
            tribal government entity?
          type: boolean
        phone:
          description: Valid phone number in e.164 international format.
          type: string
          examples:
            - '+18009999999'
        politicalCommitteeLocale:
          $ref: '#/components/schemas/enumPoliticalCommitteeLocale'
        postalCode:
          description: Postal codes. Use 5 digit zipcode for United States.
          type: string
          maxLength: 5
          examples:
            - '12345'
        country:
          description: ISO 2 character country code.
          type: string
          minLength: 2
          maxLength: 2
          examples:
            - US
        countryCodeA3:
          description: ISO 3 character country code.
          type: string
          minLength: 3
          maxLength: 3
          examples:
            - USA
        russell3000:
          description: Is this a publicly-traded company in the Russell 3000 index?
          type: boolean
        section527:
          description: >-
            Is this company a tax-exempt organization organized under Section
            527 of the U.S. Internal Revenue Code?
          type: boolean
        state:
          description: State name. Must be 2 letters code for United States.
          type: string
          maxLength: 2
          examples:
            - NC
        street:
          type: string
          maxLength: 100
          examples:
            - 123 Sesame St.
        stockExchange:
          $ref: '#/components/schemas/enumStockExchangeSymbols'
        stockSymbol:
          type: string
          examples:
            - BANDW
        taxExemptStatus:
          type: string
          description: >
            Nonprofit organization tax-exempt status per section 501 of the US
            tax code. Example: “501c3.” Please refer to
            https://ballotpedia.org/IRS_code,_section_501 for more information.
        website:
          type: string
          examples:
            - acme.com
        vertical:
          $ref: '#/components/schemas/enumVertical'
        businessContactEmail:
          description: >-
            Valid business email address of brand. This is a *mandatory* field
            for PUBLIC_PROFIT brands. For other types, TCR will ignore this
            value. This *cannot* be group/support email ID, i.e.
            support@company.com
          maxLength: 100
          type: string
        businessContactEmailVerifiedDate:
          description: >-
            Date when business email address was verified. This will be after
            TCR sends a 2FA email verification to the business email provided in
            businessContactEmail field. This will only be populated for
            PUBLIC_PROFIT brands after the verification is completed.
          maxLength: 100
          type: string
    brandAccount:
      description: The accounts a brand is associated to.
      required:
        - accountId
        - customerProfileId
      properties:
        accountId:
          type: string
          examples:
            - '5001923'
        customerProfileId:
          description: The Bandwidth customer profile to associate to the brand.
          type: string
          examples:
            - 3IIzIFnRRQBE3AMzPpMTNo
    brandSummary:
      description: The properties needed to create or update a TCR brand.
      required:
        - bandwidthId
        - accounts
        - entityType
        - displayName
        - phone
        - country
        - brandRelationship
      properties:
        brandId:
          description: >-
            The TCR-generated identifier for this brand. The TCR and Bandwidth
            identifiers are interchangeable in the Bandwidth APIs and either can
            be used to retrieve information about the brand.
          type: string
          examples:
            - B1DER2J
        bandwidthId:
          description: >-
            The Bandwidth-generated identifier for this brand. The TCR and
            Bandwidth identifiers are interchangeable in the Bandwidth APIs and
            either can be used to retrieve information about the brand. The
            bandwidthId will be available on the brand before the TCR ID is
            available.
          type: string
          examples:
            - WEPTN2N2T5
        accounts:
          items:
            $ref: '#/components/schemas/brandAccount'
        brandType:
          $ref: '#/components/schemas/enumBrandType'
        brandIdentityStatus:
          $ref: '#/components/schemas/enumBrandIdentityStatus'
        companyName:
          description: Legal Company Name. Not required for Sole Proprietor.
          type: string
          maxLength: 100
          examples:
            - Acme Amalgamated, Inc.
        displayName:
          type: string
          maxLength: 100
          examples:
            - Acme
        website:
          type: string
          examples:
            - acme.com
        businessContactEmail:
          type: string
          maxLength: 100
          examples:
            - businessemail@mail.com
        createdDate:
          description: The time the brand was created in the TCR system.
          format: date-time
          type: string
        modifiedDate:
          format: date-time
          description: The time the brand was last modified in the Bandwidth system.
          type: string
    brandResponse:
      description: Response payload describing a brand.
      type: object
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/brand'
          readOnly: true
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
    brandListResponse:
      description: A list of brands
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/brandSummary'
          readOnly: true
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
        page:
          $ref: '#/components/schemas/responsePage'
    campaignCreatedResponse:
      description: Response payload for a created campaign.
      type: object
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
        data:
          $ref: '#/components/schemas/campaignCreatedObject'
          readOnly: true
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
    campaignCreatedObject:
      description: The properties needed to create or update a TCR campaign.
      properties:
        bandwidthId:
          description: >-
            The Bandwidth-generated identifier for this campaign. The TCR and
            Bandwidth identifiers are interchangeable in the Bandwidth APIs and
            either can be used to retrieve information about the campaign.
          type: string
          examples:
            - WEPTN2N2T5
      required:
        - bandwidthId
    campaignAcceptedResponseObject:
      description: An accepted response containing the campaign and Bandwidth IDs.
      type: object
      required:
        - links
        - data
        - errors
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
        data:
          $ref: '#/components/schemas/campaignAcceptedObject'
          readOnly: true
          nullable: true
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          nullable: true
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
    campaignAcceptedObject:
      description: >-
        The campaign and Bandwidth IDs. The campaignId is only present when the
        campaign has been registered with TCR (i.e. not present for newly
        created direct campaigns awaiting TCR registration).
      properties:
        campaignId:
          description: >-
            The TCR-generated identifier for the campaign. The TCR and Bandwidth
            identifiers are interchangeable in the Bandwidth APIs and either can
            be used to retrieve information about the campaign.
          type: string
          nullable: true
          examples:
            - CA9D2FS
        bandwidthId:
          description: >-
            The Bandwidth-generated identifier for this campaign. The TCR and
            Bandwidth identifiers are interchangeable in the Bandwidth APIs and
            either can be used to retrieve information about the campaign.
          type: string
          examples:
            - WEPTN2N2T5
      required:
        - bandwidthId
    campaignCustomerResponse:
      description: Response payload describing a campaign.
      type: object
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
          examples:
            - href: /accounts/5001923/tendlc/campaigns/2YekXSSvsbyC7cHWnbV2Qv
              rel: self
              method: GET
            - href: /accounts/5001923/tendlc/campaigns/2YekXSSvsbyC7cHWnbV2Qv
              rel: update
              method: PUT
            - href: /accounts/5001923/tendlc/campaigns/2YekXSSvsbyC7cHWnbV2Qv
              rel: delete
              method: DELETE
        data:
          $ref: '#/components/schemas/campaign'
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
    campaignListResponse:
      description: A list of campaigns
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
        data:
          type: array
          items:
            $ref: '#/components/schemas/campaignSummary'
          readOnly: true
        errors:
          description: The errors array will always be empty for successful responses.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
        page:
          $ref: '#/components/schemas/responsePage'
    campaign:
      description: The properties needed to create or update a TCR campaign.
      properties:
        campaignId:
          description: >-
            The TCR-generated identifier for campaign. The TCR and Bandwidth
            identifiers are interchangeable in the Bandwidth APIs and either can
            be used to retrieve information about the campaign.
          type: string
          examples:
            - CA9D2FS
        bandwidthId:
          description: >-
            The Bandwidth-generated identifier for this campaign. The TCR and
            Bandwidth identifiers are interchangeable in the Bandwidth APIs and
            either can be used to retrieve information about the campaign.
          type: string
          examples:
            - WEPTN2N2T5
        attMessageClass:
          type: string
          examples:
            - T
        cspId:
          type: string
          description: >-
            For import accounts, the CSP ID of their CSP account with TCR.
            Otherwise it's the Bandwidth CSP ID.
          examples:
            - S3TXDL4
        customerProfileId:
          description: The Bandwidth customer profile to associate to the brand.
          type: string
          examples:
            - 3IIzIFnRRQBE3AMzPpMTNo
        brandId:
          description: The TCR-generated identifier for the brand associated to this brand.
          type: string
          examples:
            - B1DER2J
        brandDisplayName:
          description: The display name of the brand associated with this campaign.
          type: string
          readOnly: true
          examples:
            - Acme, Inc.
        campaignName:
          description: >-
            A user-supplied name for this campaign. Because this name is not
            stored in TCR, imported campaigns will default to the campaign’s TCR
            ID, though this is editable via the Bandwidth APIs.
          type: string
          examples:
            - Acme, Inc.
        imported:
          description: Whether the campaign is imported from TCR
          type: boolean
        status:
          $ref: '#/components/schemas/enumCampaignStatus'
        createdDate:
          format: date-time
          description: The time the brand was created in the TCR system.
          type: string
        modifiedDate:
          format: date-time
          description: The time the brand was last modified in the Bandwidth system.
          type: string
        accountId:
          type: string
          description: The Bandwidth Account owning the campaign.
          examples:
            - '5001923'
        approvals:
          description: >-
            The status of the campaign’s acceptance by the external partners as
            well as the carriers. If a carrier suspends a campaign, this will
            also be reported here. The status of these approvals overall is
            reflected in the status of the campaign. For example, if any partner
            or carrier declines the campaign, the campaign’s status will be
            `DECLINED`.
          type: array
          items:
            $ref: '#/components/schemas/approval'
        usecase:
          $ref: '#/components/schemas/enumCampaignUsecases'
        subUsecases:
          type: array
          items:
            $ref: '#/components/schemas/enumCampaignUsecases'
        resellerId:
          description: >-
            Alphanumeric identifier of the reseller that you want to associate
            with this campaign.
          type: string
          examples:
            - R1D4SJK
        description:
          description: Summary description of this campaign.
          type: string
          minimum: 40
          maximum: 4096
          examples:
            - Effectively the name/label of the campaign
        embeddedLink:
          description: Does message generated by the campaign include URL link in SMS?
          default: false
          type: boolean
        embeddedPhone:
          description: Does message generated by the campaign include phone number in SMS?
          default: false
          type: boolean
        termsAndConditions:
          description: Does campaign include terms and conditions?
          default: false
          type: boolean
        numberPool:
          description: Does campaign utilize pool of phone numbers?
          default: false
          type: boolean
        ageGated:
          description: Age gated content in campaign?
          default: false
          type: boolean
        directLending:
          description: >-
            Will the campaign include content related to direct lending or other
            loan arrangements?
          default: false
          type: boolean
        subscriberOptIn:
          description: >-
            Does campaign require subscriber to opt-in before SMS is sent to
            subscriber?
          default: false
          type: boolean
        subscriberOptOut:
          description: Does campaign support subscriber opt-out keyword(s)?
          default: false
          type: boolean
        subscriberHelp:
          description: >-
            Have you implemented a response to the HELP keyword informing
            customers of how they can contact the message sender?
          default: false
          type: boolean
        sample1:
          description: >-
            Message sample. Some campaign tiers require 1 or more message
            samples.
          type: string
          minimum: 20
          maximum: 1024
        sample2:
          description: >-
            Message sample. Some campaign tiers require 2 or more message
            samples. Required for some usecases.
          type: string
          minimum: 20
          maximum: 1024
        sample3:
          description: >-
            Message sample. Some campaign tiers require 3 or more message
            samples. Required for some usecases.
          type: string
          minimum: 20
          maximum: 1024
        sample4:
          description: >-
            Message sample. Some campaign tiers require 4 or more message
            samples. Required for some usecases.
          type: string
          minimum: 20
          maximum: 1024
        sample5:
          description: >-
            Message sample. Some campaign tiers require 5 or more message
            samples. Required for some usecases.
          type: string
          minimum: 20
          maximum: 1024
        messageFlow:
          description: Message flow description.
          type: string
          minimum: 40
          maximum: 2048
        helpMessage:
          description: Help message of the campaign.
          type: string
          minimum: 20
          maximum: 1024
        helpKeywords:
          description: >-
            Help keywords of the campaign. TCR will default the value to HELP.
            Multiple keywords are comma separated without space.
          type: string
          maximum: 320
        optinMessage:
          description: Opt-In message of the campaign.
          type: string
          minimum: 20
          maximum: 1024
        optinKeywords:
          description: >-
            Opt-In keywords of the campaign. Multiple keywords are comma
            separated without space.
          type: string
          maximum: 320
        optoutMessage:
          description: Opt-Out message of the campaign.
          type: string
          minimum: 20
          maximum: 1024
        optoutKeywords:
          description: >-
            Opt-Out keywords of the campaign. TCR will default the value to
            STOP. Multiple keywords are comma separated without space.
          type: string
          maximum: 320
        privacyPolicyLink:
          description: Privacy policy link of the campaign.
          type: string
          maximum: 255
        termsAndConditionsLink:
          description: Terms and conditions link of the campaign.
          type: string
          maximum: 255
        embeddedLinkSample:
          description: Sample of an embedded link in messages.
          type: string
          maximum: 255
        vettingStatus:
          $ref: '#/components/schemas/enumCampaignVettingStatus'
      required:
        - brandId
        - usecase
        - description
        - sample1
        - messageFlow
        - helpMessage
        - optoutMessage
    newCampaign:
      description: The properties needed to create or update a TCR campaign.
      properties:
        campaignId:
          description: >-
            The TCR-generated identifier for campaign. The TCR and Bandwidth
            identifiers are interchangeable in the Bandwidth APIs and either can
            be used to retrieve information about the campaign.
          type: string
          examples:
            - CA9D2FS
        campaignName:
          description: >-
            A user-supplied name for this campaign. Because this name is not
            stored in TCR, imported campaigns will default to the campaign’s TCR
            ID, though this is editable via the Bandwidth APIs.
          type: string
          examples:
            - Acme, Inc.
      required:
        - campaignId
    updatedCampaign:
      description: The properties needed to create or update a TCR campaign.
      properties:
        campaignName:
          description: >-
            A user-supplied name for this campaign. Because this name is not
            stored in TCR, imported campaigns will default to the campaign’s TCR
            ID, though this is editable via the Bandwidth APIs.
          type: string
          examples:
            - Acme, Inc.
    campaignSummary:
      description: A summary description of a campaign.
      properties:
        campaignId:
          description: >-
            The TCR-generated identifier for campaign. The TCR and Bandwidth
            identifiers are interchangeable in the Bandwidth APIs and either can
            be used to retrieve information about the campaign.
          type: string
          examples:
            - CA9D2FS
        bandwidthId:
          description: >-
            The Bandwidth-generated identifier for this campaign. The TCR and
            Bandwidth identifiers are interchangeable in the Bandwidth APIs and
            either can be used to retrieve information about the campaign.
          type: string
          examples:
            - WEPTN2N2T5
        campaignName:
          description: >-
            A user-supplied name for this campaign. Because this name is not
            stored in TCR, imported campaigns will default to the campaign’s TCR
            ID, though this is editable via the Bandwidth APIs.
          type: string
          examples:
            - Acme, Inc.
        status:
          $ref: '#/components/schemas/enumCampaignStatus'
        customerProfileId:
          description: >-
            Alphanumeric identifier of the customer profile to associate with
            this campaign
          type: string
          examples:
            - 1TcAThKNW0B0Nwh0XwpdQT
        brandId:
          description: The TCR-generated identifier for this brand.
          type: string
          examples:
            - B1DER2J
        brandDisplayName:
          description: The display name of the brand associated with this campaign.
          type: string
          readOnly: true
          examples:
            - Acme, Inc.
        attMessageClass:
          type: string
          examples:
            - T
        usecase:
          $ref: '#/components/schemas/enumCampaignUsecases'
        description:
          description: Summary description of this campaign.
          type: string
          minimum: 40
          maximum: 4096
          examples:
            - Effectively the name/label of the campaign
        numberPool:
          description: Does campaign utilize pool of phone numbers?
          default: false
          type: boolean
        createdDate:
          format: date-time
          description: The time the brand was created in the TCR system.
          type: string
          examples:
            - 2024-09-24T21:52:03.876Z
        modifiedDate:
          format: date-time
          description: The time the brand was last modified in the Bandwidth system.
          type: string
          examples:
            - 2024-09-25T21:52:03.876Z
        vettingStatus:
          $ref: '#/components/schemas/enumCampaignVettingStatus'
      required:
        - brandId
        - usecase
        - description
    companyName:
      description: Legal Company Name of the brand.
      type: string
      maxLength: 255
      examples:
        - Acme, Inc.
    displayName:
      description: Display name of the brand.
      type: string
      maxLength: 255
      examples:
        - Acme
    enumApprovalDecision:
      type: string
      description: >-
        The approval status for a connectivity partner or carrier. **Note** that
        these values differ as they are communicated by TCR for connectivity
        partners or carriers. We are standardizing on the values expressed for
        the connectivity partners, plus suspended (only carriers can suspend a
        campaign).
      enum:
        - APPROVED
        - PENDING
        - REJECTED
        - UNKNOWN
        - SUSPENDED
    enumBrandType:
      description: >-
        Entity type behind the brand. This is the form of business
        establishment.
      type: string
      enum:
        - PRIVATE_PROFIT
        - PUBLIC_PROFIT
        - NON_PROFIT
        - GOVERNMENT
        - SOLE_PROPRIETOR
    enumBrandIdentityStatus:
      description: The identity status of the brand in TCR.
      type: string
      enum:
        - SELF-DECLARED
        - VERIFIED
        - VETTED_VERIFIED
        - UNVERIFIED
        - PENDING
    enumBrandRelationship:
      description: Enum value describing the relationship with your Account.
      type: string
      enum:
        - BASIC_ACCOUNT
        - SMALL_ACCOUNT
        - MEDIUM_ACCOUNT
        - LARGE_ACCOUNT
        - KEY_ACCOUNT
    enumCampaignStatus:
      type: string
      enum:
        - REGISTERING
        - REGISTERED
        - DECLINED
        - UNREGISTERING
        - EXPIRED
        - SUSPENDED
        - ERROR
    enumCampaignUsecases:
      description: Campaign usecase. Must be of defined valid types
      type: string
      enum:
        - 2FA
        - ACCOUNT_NOTIFICATION
        - CARRIER_EXEMPT
        - CHARITY
        - CONVERSATIONAL
        - CUSTOMER_CARE
        - DELIVERY_NOTIFICATION
        - EMERGENCY
        - FRAUD_ALERT
        - HIGHER_EDUCATION
        - K12_EDUCATION
        - LOW_VOLUME
        - MARKETING
        - MIXED
        - POLITICAL
        - POLLING_VOTING
        - PUBLIC_SERVICE_ANNOUNCEMENT
        - SECURITY_ALERT
        - SOCIAL
        - SWEEPSTAKE
        - TRIAL
        - AGENTS_FRANCHISES
        - PROXY
        - UCAAS_HIGH
        - UCAAS_LOW
        - M2M
    enumCampaignVettingStatus:
      type: string
      description: >-
        The overall vetting status of a campaign, based on `BANDWIDTH_DCA`,
        `DCA2_ACCEPTED`, `DCA2_READY`, and `PROXY` partner IDs in the
        `approvals` list.
      enum:
        - APPROVED
        - PENDING
        - REJECTED
        - UNKNOWN
        - SUSPENDED
    enumCarrierId:
      type: string
      description: The carrier
      enum:
        - ATT
        - TMOBILE
        - VERIZON
        - US_CELLULAR
        - INTEROP
        - CLEAR_SKY
        - LIBERTY
    enumHistorySourceType:
      description: The source of an audit record
      type: string
      enum:
        - WEBHOOK
        - WORKFLOW
    enumPartnerId:
      type: string
      description: >-
        The carrier or connectivity partner from whom we need an approval to
        send messages under a specific campaign.
      enum:
        - ATT
        - TMOBILE
        - VERIZON
        - US_CELLULAR
        - INTEROP
        - CLEAR_SKY
        - LIBERTY
        - DCA2_ACCEPTED
        - DCA2_READY
        - PROXY
        - BANDWIDTH_DCA
    enumPoliticalCommitteeLocale:
      type: string
      description: >-
        Political committee Locale. Possible values are federal, state, local
        and tribal.
      enum:
        - FEDERAL
        - STATE
        - LOCAL
        - TRIBAL
    enumRegistrationStatus:
      type: string
      description: The status of a 10DLC registration
      enum:
        - PROCESSING
        - SUCCESS
        - FAILURE
    enumStockExchangeSymbols:
      type: string
      enum:
        - NASDAQ
        - NYSE
        - AMEX
        - AMX
        - ASX
        - B3
        - BME
        - BSE
        - FRA
        - ICEX
        - JPX
        - JSE
        - KRX
        - LON
        - NSE
        - OMX
        - SEHK
        - SSE
        - STO
        - SWX
        - SZSE
        - TSX
        - TWSE
        - VSE
    enumTmobileBrandTier:
      type: string
      description: >-
        T-Mobile daily message volume is restricted based on brand tier,
        applying across campaigns and CSPs.
      enum:
        - LOW
        - LOWER_MID
        - UPPER_MID
        - TOP
        - UNCAPPED
      examples:
        - UPPER_MID
    enumVertical:
      description: >-
        Enum value describing vertical or industry segment of the brand.
        Disabled for Sole_Proprieto
      type: string
      enum:
        - REAL_ESTATE
        - ENERGY
        - HEALTHCARE
        - ENTERTAINMENT
        - RETAIL
        - AGRICULTURE
        - INSURANCE
        - EDUCATION
        - HOSPITALITY
        - FINANCIAL
        - GAMBLING
        - CONSTRUCTION
        - NGO
        - MANUFACTURING
        - GOVERNMENT
        - TECHNOLOGY
        - COMMUNICATION
    errorEntry:
      type: object
      properties:
        type:
          type: string
          description: >-
            A short, human-readable description of the type of error (e.g. "bad
            request").
          examples:
            - bad request
        description:
          type: string
          description: A full description of the error (e.g. "name cannot be blank").
          examples:
            - accountId is required
        source:
          type: object
          additionalProperties:
            type: string
          description: >
            A map from the type of source to a value for that type. The
            supported keys are: 1) POINTER (the value is a RFC6901 JSON pointer
            to a field in the request body); 2) PARAMETER (the value is a query
            parameter name); and 3) PATH (the value is a parameter name in the
            URI of the request). There will only be one entry in the source
            property, as each error is recorded separately in the errors array.
          examples:
            - POINTER: /accountId
    errorResponse400:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
    errorResponse401:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: unauthorized
                description: client is providing incorrect or invalid credentials
    errorResponse403:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: forbidden
                description: client does not have access rights to the content
    errorResponse404:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: not found
                description: CVW1111
    errorResponse405:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: method not allowed
                description: Request method 'PATCH' is not supported
    errorResponse409:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: conflict
                description: submitted entity already exists
    errorResponse429:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: too many requests
                description: too many requests
    errorResponse500:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: internal service error
                description: the server has encountered an internal error
    errorResponse503:
      properties:
        links:
          type: array
          items:
            $ref: '#/components/schemas/responseLink'
          examples:
            - []
          readOnly: true
        data:
          type: object
          nullable: true
          examples:
            - null
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - - type: service unavailable
                description: the server has encountered an internal error
    registration:
      description: A 10DLC registration.
      properties:
        phoneNumber:
          type: string
          examples:
            - '+12054443942'
        campaignId:
          type: string
          examples:
            - CA3XKE1
        status:
          $ref: '#/components/schemas/enumRegistrationStatus'
        customerProfileId:
          description: The customer profile ID associated with the TN.
          type: string
          examples:
            - 3IIzIFnRRQBE3AMzPpMTNo
        brandId:
          description: The TCR-generated identifier for the brand associated to this brand.
          type: string
          examples:
            - B1DER2J
        nnid:
          type: string
          description: >-
            The Net Number ID used to register the messaging provider in the
            Override Service Registry.
          examples:
            - '103775'
        createdDate:
          format: date-time
          description: The time the brand was created in the TCR system.
          type: string
        modifiedDate:
          format: date-time
          description: The time the brand was last modified in the Bandwidth system.
          type: string
    historyEntry:
      description: An audit record for this resource.
      properties:
        message:
          type: string
          examples:
            - Campaign CCB0URS for brand BDYTCLP was updated
        createdDate:
          format: date-time
          type: string
          description: The time the brand was created in the TCR system.
          examples:
            - 2024-09-24T21:52:03.876Z
        userName:
          type: string
          maxLength: 100
          description: >-
            The user who triggered this provisioning request. If longer than 100
            characters, it will be silently truncated.
          examples:
            - atest
    historyListResponse:
      description: The audit history for a resource.
      properties:
        data:
          items:
            $ref: '#/components/schemas/historyEntry'
          type: array
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          description: The errors array will always be empty for this response.
          examples:
            - []
        links:
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
          type: array
        page:
          $ref: '#/components/schemas/responsePage'
    registrationListResponse:
      description: A list of 10DLC registrations
      properties:
        data:
          items:
            $ref: '#/components/schemas/registration'
          type: array
        errors:
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          description: The errors array will always be empty for this response.
          examples:
            - []
        links:
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
          type: array
        page:
          $ref: '#/components/schemas/responsePage'
    registrationResponse:
      description: A 10DLC registration response
      properties:
        data:
          $ref: '#/components/schemas/registration'
        errors:
          description: The errors array will always be empty for this response.
          type: array
          items:
            $ref: '#/components/schemas/errorEntry'
          examples:
            - []
        links:
          items:
            $ref: '#/components/schemas/responseLink'
          readOnly: true
          type: array
    responseLink:
      description: Link to a resource
      properties:
        href:
          type: string
          readOnly: true
          examples:
            - /api/v2/tendlc/2YekXSSvsbyC7cHWnbV2Qv
        rel:
          type: string
          readOnly: true
          examples:
            - self
        method:
          type: string
          readOnly: true
          examples:
            - GET
    responsePage:
      description: Information about the current page
      properties:
        pageSize:
          type: integer
          format: int32
          readOnly: true
          examples:
            - 25
        totalElements:
          type: integer
          format: int32
          readOnly: true
          examples:
            - 434
        totalPages:
          type: integer
          format: int32
          readOnly: true
          examples:
            - 18
        pageNumber:
          type: integer
          format: int32
          readOnly: true
          examples:
            - 3
    sort:
      type: string
      enum:
        - ASC
        - DESC
tags:
  - name: 10DLC
    description: Registration of 10DLC phone numbers to campaigns
  - name: Campaigns
    description: TCR campaigns management
  - name: Brands
    description: TCR brands management
