openapi: 3.0.1 info: title: Twilio - Accounts A2p Messaging Services API 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.52.0 servers: - url: https://accounts.twilio.com tags: - name: Messaging Services description: Configure messaging services for scalable messaging paths: /Services: get: operationId: listMessagingServices summary: Twilio List Messaging Services description: Retrieve a list of messaging services associated with your account. tags: - Messaging Services parameters: - name: PageSize in: query schema: type: integer minimum: 1 maximum: 1000 responses: '200': description: List of messaging services content: application/json: schema: $ref: '#/components/schemas/MessagingServiceList' '401': description: Unauthorized post: operationId: createMessagingService summary: Twilio Create a Messaging Service description: Create a new messaging service for managing senders and message configuration at scale. tags: - Messaging Services requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateMessagingServiceRequest' responses: '201': description: Messaging service created content: application/json: schema: $ref: '#/components/schemas/MessagingService' '400': description: Invalid request '401': description: Unauthorized /Services/{ServiceSid}: get: operationId: fetchMessagingService summary: Twilio Fetch a Messaging Service tags: - Messaging Services parameters: - $ref: '#/components/parameters/ServiceSid' responses: '200': description: Messaging service details content: application/json: schema: $ref: '#/components/schemas/MessagingService' '404': description: Service not found post: operationId: updateMessagingService summary: Twilio Update a Messaging Service tags: - Messaging Services parameters: - $ref: '#/components/parameters/ServiceSid' requestBody: required: true content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateMessagingServiceRequest' responses: '200': description: Messaging service updated content: application/json: schema: $ref: '#/components/schemas/MessagingService' '400': description: Invalid request delete: operationId: deleteMessagingService summary: Twilio Delete a Messaging Service tags: - Messaging Services parameters: - $ref: '#/components/parameters/ServiceSid' responses: '204': description: Messaging service deleted '404': description: Service not found components: parameters: ServiceSid: name: ServiceSid in: path required: true description: The unique identifier of the messaging service schema: type: string pattern: ^MG[0-9a-fA-F]{32}$ schemas: CreateMessagingServiceRequest: type: object required: - FriendlyName properties: FriendlyName: type: string description: Descriptive name for the messaging service InboundRequestUrl: type: string format: uri InboundMethod: type: string enum: - GET - POST FallbackUrl: type: string format: uri FallbackMethod: type: string enum: - GET - POST StatusCallback: type: string format: uri StickySender: type: boolean SmartEncoding: type: boolean AreaCodeGeomatch: type: boolean ValidityPeriod: type: integer PaginationMeta: type: object properties: page: type: integer page_size: type: integer first_page_url: type: string format: uri previous_page_url: type: string format: uri next_page_url: type: string format: uri url: type: string format: uri key: type: string MessagingServiceList: type: object properties: services: type: array items: $ref: '#/components/schemas/MessagingService' meta: $ref: '#/components/schemas/PaginationMeta' MessagingService: type: object properties: sid: type: string pattern: ^MG[0-9a-fA-F]{32}$ description: Unique identifier for the messaging service account_sid: type: string pattern: ^AC[0-9a-fA-F]{32}$ friendly_name: type: string description: Descriptive name for the messaging service inbound_request_url: type: string format: uri description: URL for incoming message webhooks inbound_method: type: string enum: - GET - POST fallback_url: type: string format: uri fallback_method: type: string enum: - GET - POST status_callback: type: string format: uri description: URL for delivery status webhooks sticky_sender: type: boolean description: Whether to use sticky sender for conversations smart_encoding: type: boolean description: Whether to automatically detect Unicode characters area_code_geomatch: type: boolean description: Whether to match sender area code to recipient validity_period: type: integer description: Message validity period in seconds date_created: type: string format: date-time date_updated: type: string format: date-time url: type: string format: uri securitySchemes: accountSid_authToken: type: http scheme: basic x-maturity: - name: GA description: This product is Generally Available. - name: Beta description: PLEASE NOTE that this is a Beta product that is subject to change. Use it with caution.