> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleartalk.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Add phone numbers to a messaging service



## OpenAPI

````yaml post /agency/twilio/add-phone-numbers-to-messaging-service
openapi: 3.0.0
info:
  title: ClearTalk API
  description: The ClearTalk API Documentation
  version: '1.0'
  contact:
    name: Developer Support
    email: devsupport@cleartalk.ai
servers:
  - url: https://api.cleartalk.ai
    description: ClearTalk AI API Server
security: []
tags: []
paths:
  /agency/twilio/add-phone-numbers-to-messaging-service:
    post:
      tags:
        - Twilio
      summary: Add phone numbers to a messaging service
      operationId: TwilioController_addPhoneNumbersToMessagingService
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddPhoneNumbersToMessagingServiceDto'
      responses:
        '200':
          description: Phone numbers added to messaging service successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: number
                    description: Number of successfully added phone numbers
                  failed:
                    type: number
                    description: Number of failed additions
                  results:
                    type: array
                    items:
                      type: object
                      properties:
                        phone_number_sid:
                          type: string
                          description: Phone number SID
                        status:
                          type: string
                          description: Status of the operation
                        data:
                          type: object
                          properties:
                            sid:
                              type: string
                              description: Messaging service phone number SID
                            phone_number:
                              type: string
                              description: Phone number
                            capabilities:
                              type: object
                              description: Phone number capabilities
                            date_created:
                              type: string
                              description: Creation date
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        phone_number_sid:
                          type: string
                          description: Phone number SID that failed
                        status:
                          type: string
                          description: Error status
                        error:
                          type: string
                          description: Error message
                  message:
                    type: string
                    description: Summary message
        '400':
          description: Bad request - invalid input data
        '401':
          description: Unauthorized
        '404':
          description: Messaging service not found
        '500':
          description: Internal server error
      security:
        - apiKey: []
components:
  schemas:
    AddPhoneNumbersToMessagingServiceDto:
      type: object
      properties:
        phoneNumberSids:
          description: Array of phone number SIDs to add to the messaging service
          type: array
          items:
            type: string
      required:
        - phoneNumberSids
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key for authentication

````