components:
  securitySchemes:
    accountSid_authToken:
      scheme: basic
      type: http
  schemas:
    messaging.v2.channels_sender:
      type: object
      properties:
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^XE[0-9a-fA-F]{32}$
          nullable: true
          description: A 34 character string that uniquely identifies this Sender.
        status:
          $ref: '#/components/schemas/channels_sender_enum_status'
        sender_id:
          $ref: '#/components/schemas/messaging.v2.channels_sender.fields.sender_id'
        configuration:
          $ref: '#/components/schemas/messaging.v2.channels_sender.configuration'
        webhook:
          $ref: '#/components/schemas/messaging.v2.channels_sender.webhook'
        profile:
          $ref: '#/components/schemas/messaging.v2.channels_sender.profile-response'
        properties:
          $ref: '#/components/schemas/messaging.v2.channels_sender.properties'
        offline_reasons:
          $ref: '#/components/schemas/messaging.v2.channels_sender.offline_reasons'
        url:
          type: string
          format: uri
          nullable: true
          description: The URL of this resource, relative to `https://messaging.twilio.com`.
    channels_sender_enum_status:
      type: string
      enum:
      - CREATING
      - ONLINE
      - OFFLINE
      - PENDING_VERIFICATION
      - VERIFYING
      - ONLINE:UPDATING
      - STUBBED
      description: The Status of this Sender. One of `CREATING`, `ONLINE`, `OFFLINE`,
        `PENDING_VERIFICATION`, `VERIFYING` or `ONLINE:UPDATING`.
    messaging.v2.channels_sender.requests.create:
      type: object
      required:
      - sender_id
      properties:
        sender_id:
          x-field-extra-annotation: '@com.fasterxml.jackson.annotation.JsonProperty("sender_id")'
          $ref: '#/components/schemas/messaging.v2.channels_sender.fields.sender_id'
        configuration:
          $ref: '#/components/schemas/messaging.v2.channels_sender.configuration'
        webhook:
          $ref: '#/components/schemas/messaging.v2.channels_sender.webhook'
        profile:
          $ref: '#/components/schemas/messaging.v2.channels_sender.profile'
    messaging.v2.channels_sender.requests.update:
      type: object
      properties:
        configuration:
          nullable: true
          $ref: '#/components/schemas/messaging.v2.channels_sender.configuration'
        webhook:
          nullable: true
          $ref: '#/components/schemas/messaging.v2.channels_sender.webhook'
        profile:
          nullable: true
          $ref: '#/components/schemas/messaging.v2.channels_sender.profile'
    messaging.v2.channels_sender.configuration:
      type: object
      nullable: true
      properties:
        waba_id:
          type: string
          description: The ID of the WhatsApp Business Account to use for this sender.
          nullable: true
        verification_method:
          type: string
          enum:
          - sms
          - voice
          description: The method to use for verification. Either "sms" or "voice".
          example: sms
          default: sms
          nullable: true
        verification_code:
          type: string
          description: The verification code to use for this sender.
          nullable: true
        voice_application_sid:
          type: string
          description: The SID of the Twilio Voice application to use for this sender.
          nullable: true
      description: 'Configuration settings for creating a sender, e.g., {"waba_id":
        "1234567890", "verification_method": "sms"}'
    messaging.v2.channels_sender.webhook:
      type: object
      nullable: true
      properties:
        callback_url:
          type: string
          description: The URL to send the webhook to.
          nullable: true
        callback_method:
          type: string
          enum:
          - POST
          - PUT
          description: The HTTP method to use for the webhook. Either "POST" or "PUT".
          nullable: true
        fallback_url:
          type: string
          description: The URL to send the fallback webhook to.
          nullable: true
        fallback_method:
          type: string
          enum:
          - POST
          - PUT
          description: The HTTP method to use for the fallback webhook. Either "POST"
            or "PUT".
          nullable: true
        status_callback_url:
          type: string
          description: The URL to send the status callback to.
          nullable: true
        status_callback_method:
          type: string
          description: The HTTP method to use for the status callback.
          nullable: true
      description: 'Webhook specific configurations, e.g., {"callback_url": "https://xxx",
        "callback_method": "POST", "fallback_url": "https://xxx", "fallback_method":
        "POST", "status_callback_url": "https://xxx", "status_callback_method": "POST"}'
    messaging.v2.channels_sender.profile:
      type: object
      nullable: true
      properties:
        name:
          type: string
          description: The name of the sender.
          nullable: true
        about:
          type: string
          description: The about text of the sender.
          nullable: true
        address:
          type: string
          description: The address of the sender.
          nullable: true
        description:
          type: string
          description: The description of the sender.
          nullable: true
        emails:
          description: The emails of the sender.
        logo_url:
          type: string
          description: The logo URL of the sender.
          nullable: true
        vertical:
          type: string
          description: 'The vertical of the sender. Allowed values are:

            - "Automotive"

            - "Beauty, Spa and Salon"

            - "Clothing and Apparel"

            - "Education"

            - "Entertainment"

            - "Event Planning and Service"

            - "Finance and Banking"

            - "Food and Grocery"

            - "Public Service"

            - "Hotel and Lodging"

            - "Medical and Health"

            - "Non-profit"

            - "Professional Services"

            - "Shopping and Retail"

            - "Travel and Transportation"

            - "Restaurant"

            - "Other"

            '
          nullable: true
        websites:
          description: The websites of the sender.
      description: 'Sender profile specific configurations, e.g., {"name": "xxx",
        "about": "xxx", "address": "xxx", "description": "xxx", "emails": "xxx@xxx",
        "logo_url": "https://xxx", "vertical": "xxx", "websites": ["https://xxx",
        "..."]}'
    messaging.v2.channels_sender.profile-response:
      type: object
      nullable: true
      properties:
        name:
          type: string
          description: The name of the sender.
          nullable: true
        about:
          type: string
          description: The about text of the sender.
          nullable: true
        address:
          type: string
          description: The address of the sender.
          nullable: true
        description:
          type: string
          description: The description of the sender.
          nullable: true
        emails:
          description: The emails of the sender.
          nullable: true
          type: array
          items:
            type: object
            properties:
              email:
                type: string
              label:
                type: string
        logo_url:
          type: string
          description: The logo URL of the sender.
          nullable: true
        vertical:
          type: string
          description: 'The vertical of the sender. Allowed values are:

            - "Automotive"

            - "Beauty, Spa and Salon"

            - "Clothing and Apparel"

            - "Education"

            - "Entertainment"

            - "Event Planning and Service"

            - "Finance and Banking"

            - "Food and Grocery"

            - "Public Service"

            - "Hotel and Lodging"

            - "Medical and Health"

            - "Non-profit"

            - "Professional Services"

            - "Shopping and Retail"

            - "Travel and Transportation"

            - "Restaurant"

            - "Other"

            '
          nullable: true
        websites:
          description: The websites of the sender.
          nullable: true
          type: array
          items:
            type: object
            properties:
              website:
                type: string
              label:
                type: string
      description: 'Sender profile specific configurations for create and update request,
        e.g., {"name": "xxx", "about": "xxx", "address": "xxx", "description": "xxx",
        "emails": [{"label": "email 1", "email": "xxx@xxx"}], "logo_url": "https://xxx",
        "vertical": "xxx", "websites": [{"label": "email 1", "website": "https://xxx"}]}'
    messaging.v2.channels_sender.properties:
      type: object
      nullable: true
      properties:
        quality_rating:
          type: string
          description: The quality rating of the sender.
          nullable: true
        messaging_limit:
          type: string
          description: The messaging limit of the sender.
          nullable: true
      description: 'Sender specific additional properties, e.g., {"quality_rating":
        "HIGH", "messaging_limit": "10K Customers/24hr"}'
    messaging.v2.channels_sender.offline_reasons:
      type: array
      items:
        $ref: '#/components/schemas/messaging.v2.channels_sender.offline_reasons.items'
      nullable: true
      description: 'Reasons why the sender is offline., e.g., [{"code": "21211400",
        "message": "Whatsapp business account is banned by provider {provider_name}
        | Credit line is assigned to another BSP", "more_info": "https://www.twilio.com/docs/errors/21211400"}]'
    messaging.v2.channels_sender.offline_reasons.items:
      type: object
      nullable: true
      properties:
        code:
          type: string
          description: The error code.
          nullable: true
        message:
          type: string
          description: The error message.
          nullable: true
        more_info:
          type: string
          format: uri
          description: The URL to get more information about the error.
          nullable: true
    messaging.v2.channels_sender.fields.sender_id:
      type: string
      description: The ID of this Sender prefixed with the channel, e.g., `whatsapp:E.164`
      nullable: true
info:
  title: Twilio - Messaging
  description: This is the public Twilio REST API.
  termsOfService: https://www.twilio.com/legal/tos
  contact:
    name: Twilio Support
    url: https://support.twilio.com
    email: support@twilio.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
openapi: 3.0.1
paths:
  /v2/Channels/Senders:
    servers:
    - url: https://messaging.twilio.com
    description: A Sender resource of WhatsApp.
    x-twilio:
      defaultOutputProperties:
      - sid
      - status
      - sender_id
      mountName: channels_senders
      pathType: list
    post:
      description: Create a new sender of WhatsApp.
      summary: Create a new sender of WhatsApp.
      tags:
      - MessagingV2ChannelsSender
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v2.channels_sender'
              examples:
                create:
                  value:
                    sid: XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    status: CREATING
                    sender_id: whatsapp:+999999999XX
                    configuration:
                      waba_id: 1234567XXX
                      verification_method: sms
                      verification_code: null
                      voice_application_sid: APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    webhook:
                      callback_url: https://callback.com
                      callback_method: POST
                      fallback_url: https://fallback.com
                      fallback_method: POST
                      status_callback_url: https://statuscallback.com
                      status_callback_method: POST
                    profile:
                      name: Example Profile Name
                      about: This is an example about text.
                      address: 123 Example St, Example City, EX 12345
                      description: This is an example description.
                      emails:
                      - email: example@example.com
                        label: Email
                      - email: example2@example.com
                        label: Email
                      logo_url: https://logo_url.com
                      vertical: Automotive
                      websites:
                      - website: https://website.com
                        label: Website
                      - website: http://website2.com
                        label: Website
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
            T-Request-Id:
              schema:
                type: string
          description: Accepted
      security:
      - accountSid_authToken: []
      operationId: CreateChannelsSender
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/messaging.v2.channels_sender.requests.create'
            example:
              sender_id: whatsapp:+999999999XX
              configuration:
                waba_id: 1234567XXX
                verification_method: sms
              webhook:
                callback_url: https://callback.com
                callback_method: POST
                fallback_url: https://fallback.com
                fallback_method: POST
                status_callback_url: https://statuscallback.com
                status_callback_method: POST
              profile:
                name: Example Profile Name
                about: This is an example about text.
                address: 123 Example St, Example City, EX 12345
                description: This is an example description.
                emails:
                - email: example@example.com
                  label: Email
                - email: example2@example.com
                  label: Email
                logo_url: https://logo_url.com
                vertical: Automotive
                websites:
                - website: https://website.com
                  label: Website
                - website: http://website2.com
                  label: Website
    get:
      description: Get a list of Senders for an account.
      summary: Get a list of Senders for an account.
      tags:
      - MessagingV2ChannelsSender
      parameters:
      - name: Channel
        required: true
        in: query
        schema:
          type: string
      - name: PageSize
        in: query
        description: How many resources to return in each list page. The default is
          50, and the maximum is 1000.
        schema:
          type: integer
          format: int64
          minimum: 1
          maximum: 1000
      - name: Page
        in: query
        description: The page index. This value is simply for client state.
        schema:
          type: integer
          minimum: 0
      - name: PageToken
        in: query
        description: The page token. This is provided by the API.
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                type: object
                properties:
                  senders:
                    type: array
                    items:
                      $ref: '#/components/schemas/messaging.v2.channels_sender'
                  meta:
                    properties:
                      first_page_url:
                        format: uri
                        type: string
                      key:
                        type: string
                      next_page_url:
                        format: uri
                        nullable: true
                        type: string
                      page:
                        type: integer
                      page_size:
                        type: integer
                      previous_page_url:
                        format: uri
                        nullable: true
                        type: string
                      url:
                        format: uri
                        type: string
                    type: object
                title: ListChannelsSenderResponse
              examples:
                readEmpty:
                  value:
                    senders: []
                    meta:
                      page: 0
                      page_size: 10
                      first_page_url: https://messaging.twilio.com/v2/Channels/Senders?PageSize=10&Page=0&Channel=whatsapp
                      previous_page_url: null
                      url: https://messaging.twilio.com/v2/Channels/Senders?PageSize=10&Page=0&Channel=whatsapp
                      next_page_url: null
                      key: senders
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
            T-Request-Id:
              schema:
                type: string
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListChannelsSender
  /v2/Channels/Senders/{Sid}:
    servers:
    - url: https://messaging.twilio.com
    description: A Sender resource represents a messaging channel sender of WhatsApp.
    x-twilio:
      defaultOutputProperties:
      - sid
      - status
      - sender_id
      mountName: channels_senders
      pathType: instance
    get:
      description: Retrieve details of a specific sender by its unique identifier.
      summary: Retrieve details of a specific sender by its unique identifier.
      tags:
      - MessagingV2ChannelsSender
      parameters:
      - name: Sid
        required: true
        in: path
        description: A 34 character string that uniquely identifies this Sender.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^XE[0-9a-fA-F]{32}$
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v2.channels_sender'
              examples:
                fetch:
                  value:
                    sid: XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    status: ONLINE
                    sender_id: whatsapp:+999999999XX
                    configuration:
                      waba_id: 1234567XXX
                      verification_method: null
                      verification_code: null
                      voice_application_sid: APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    webhook:
                      callback_url: https://callback.com
                      callback_method: POST
                      fallback_url: https://fallback.com
                      fallback_method: POST
                      status_callback_url: https://statuscallback.com
                      status_callback_method: POST
                    profile:
                      name: Example Profile Name
                      about: This is an example about text.
                      address: 123 Example St, Example City, EX 12345
                      description: This is an example description.
                      emails:
                      - email: email@email.com
                        label: Email
                      logo_url: https://logo_url.com
                      vertical: Automotive
                      websites:
                      - website: https://website.com
                        label: Website
                      - website: http://website2.com
                        label: Website
                    properties:
                      quality_rating: HIGH
                      messaging_limit: 10K Customers/24hr
                    offline_reasons: null
                    url: https://messaging.twilio.com/v2/Channels/Senders/XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                fetchOfflineReasons:
                  value:
                    sid: XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    status: OFFLINE
                    sender_id: whatsapp:+999999999XX
                    configuration:
                      waba_id: 1234567XXX
                      verification_method: null
                      verification_code: null
                      voice_application_sid: APXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                    webhook:
                      callback_url: https://callback.com
                      callback_method: POST
                      fallback_url: https://fallback.com
                      fallback_method: POST
                      status_callback_url: https://statuscallback.com
                      status_callback_method: POST
                    profile:
                      name: Example Profile Name
                      about: This is an example about text.
                      address: 123 Example St, Example City, EX 12345
                      description: This is an example description.
                      emails:
                      - email: email@email.com
                        label: Email
                      logo_url: https://logo_url.com
                      vertical: Automotive
                      websites:
                      - website: https://website.com
                        label: Website
                      - website: http://website2.com
                        label: Website
                    properties:
                      quality_rating: HIGH
                      messaging_limit: 10K Customers/24hr
                    offline_reasons:
                    - code: '30008'
                      message: No delivery
                      more_info: https://www.twilio.com/docs/api/errors/30008
                    url: https://messaging.twilio.com/v2/Channels/Senders/XEXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
            T-Request-Id:
              schema:
                type: string
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchChannelsSender
    post:
      description: Update a specific sender information like OTP Code, Webhook, Profile
        information.
      summary: Update a specific sender information like OTP Code, Webhook, Profile
        information.
      tags:
      - MessagingV2ChannelsSender
      parameters:
      - name: Sid
        required: true
        in: path
        description: A 34 character string that uniquely identifies this Sender.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^XE[0-9a-fA-F]{32}$
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/messaging.v2.channels_sender'
              examples:
                update:
                  value:
                    sid: XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    status: VERIFYING
                    sender_id: whatsapp:+999999999XX
                    configuration:
                      waba_id: 1234567XXX
                      verification_method: sms
                      verification_code: null
                      voice_application_sid: APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    webhook:
                      callback_url: https://callback.com
                      callback_method: POST
                      fallback_url: https://fallback.com
                      fallback_method: POST
                      status_callback_url: https://statuscallback.com
                      status_callback_method: POST
                    profile:
                      about: Example about text
                      address: 123 Example St, Example City, EX 12345
                      description: Example description
                      emails:
                      - email: email@email.com
                        label: Email
                      name: Example Business
                      logo_url: https://logo_url.com
                      vertical: Automotive
                      websites:
                      - website: https://example.com
                        label: Website
                      - website: http://example.org
                        label: Website
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
            T-Request-Id:
              schema:
                type: string
          description: Accepted
      security:
      - accountSid_authToken: []
      operationId: UpdateChannelsSender
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/messaging.v2.channels_sender.requests.update'
              examples:
                update:
                  value:
                    configuration:
                      verification_code: '123456'
                      voice_application_sid: APaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                    webhook:
                      callback_url: https://callback.com
                      callback_method: POST
                      fallback_url: https://fallback.com
                      fallback_method: POST
                      status_callback_url: https://statuscallback.com
                      status_callback_method: POST
                    profile:
                      name: Example Business
                      about: Example about text
                      address: 123 Example St, Example City, EX 12345
                      description: Example description
                      logo_url: https://logo_url.com
                      vertical: Automotive
                      websites:
                      - website: https://example.com
                        label: Website
                      - website: http://example.org
                        label: Website
                      emails:
                      - email: email@email.com
                        label: Email
    delete:
      description: Delete a specific sender by its unique identifier.
      summary: Delete a specific sender by its unique identifier.
      tags:
      - MessagingV2ChannelsSender
      parameters:
      - name: Sid
        required: true
        in: path
        description: A 34 character string that uniquely identifies this Sender.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^XE[0-9a-fA-F]{32}$
      responses:
        '204':
          description: The resource was deleted successfully.
          headers:
            Access-Control-Allow-Origin:
              description: Specify the origin(s) allowed to access the resource
              schema:
                type: string
              example: '*'
            Access-Control-Allow-Methods:
              description: Specify the HTTP methods allowed when accessing the resource
              schema:
                type: string
              example: POST, OPTIONS
            Access-Control-Allow-Headers:
              description: Specify the headers allowed when accessing the resource
              schema:
                type: string
              example: Content-Type, Authorization
            Access-Control-Allow-Credentials:
              description: Indicates whether the browser should include credentials
              schema:
                type: boolean
            Access-Control-Expose-Headers:
              description: Headers exposed to the client
              schema:
                type: string
                example: X-Custom-Header1, X-Custom-Header2
            T-Request-Id:
              schema:
                type: string
      security:
      - accountSid_authToken: []
      operationId: DeleteChannelsSender
servers:
- url: https://messaging.twilio.com
tags:
- name: MessagingV2ChannelsSender
- name: MessagingV2Version
security:
- accountSid_authToken: []
