Twilio ConnectionPolicies API

The ConnectionPolicies API from Twilio — 4 operation(s) for connectionpolicies.

Documentation

Specifications

Other Resources

OpenAPI Specification

twilio-connectionpolicies-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Twilio - Accounts A2p ConnectionPolicies 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: ConnectionPolicies
paths:
  /v1/ConnectionPolicies:
    servers:
    - url: https://voice.twilio.com
    description: Connection Policy for sending traffic to your communications infrastructure.
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      pathType: list
      dependentProperties:
        targets:
          mapping:
            connection_policy_sid: sid
          resource_url: /v1/ConnectionPolicies/{connection_policy_sid}/Targets
    post:
      description: ''
      tags:
      - ConnectionPolicies
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.connection_policy'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateConnectionPolicy
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateConnectionPolicyRequest'
    get:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - 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
          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:
                $ref: '#/components/schemas/ListConnectionPolicyResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListConnectionPolicy
      x-maturity:
      - GA
  /v1/ConnectionPolicies/{Sid}:
    servers:
    - url: https://voice.twilio.com
    description: Connection Policy for sending traffic to your communications infrastructure.
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      pathType: instance
      dependentProperties:
        targets:
          mapping:
            connection_policy_sid: sid
          resource_url: /v1/ConnectionPolicies/{connection_policy_sid}/Targets
    get:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: Sid
        in: path
        description: The unique string that we created to identify the Connection Policy resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.connection_policy'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchConnectionPolicy
      x-maturity:
      - GA
    post:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: Sid
        in: path
        description: The unique string that we created to identify the Connection Policy resource to update.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.connection_policy'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateConnectionPolicy
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateConnectionPolicyRequest'
    delete:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: Sid
        in: path
        description: The unique string that we created to identify the Connection Policy resource to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteConnectionPolicy
      x-maturity:
      - GA
  /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets:
    servers:
    - url: https://voice.twilio.com
    description: Network element entry points into your communications infrastructure
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - target
      - enabled
      pathType: list
      parent: /ConnectionPolicies/{Sid}
      className: connection_policy_target
    post:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: ConnectionPolicySid
        in: path
        description: The SID of the Connection Policy that owns the Target.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.connection_policy.connection_policy_target'
          description: Created
      security:
      - accountSid_authToken: []
      operationId: CreateConnectionPolicyTarget
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateConnectionPolicyTargetRequest'
    get:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: ConnectionPolicySid
        in: path
        description: The SID of the Connection Policy from which to read the Targets.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      - 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
          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:
                $ref: '#/components/schemas/ListConnectionPolicyTargetResponse'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: ListConnectionPolicyTarget
      x-maturity:
      - GA
  /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}:
    servers:
    - url: https://voice.twilio.com
    description: Network element entry points into your communications infrastructure
    x-twilio:
      defaultOutputProperties:
      - sid
      - friendly_name
      - target
      - enabled
      pathType: instance
      parent: /ConnectionPolicies/{Sid}
      className: connection_policy_target
    get:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: ConnectionPolicySid
        in: path
        description: The SID of the Connection Policy that owns the Target.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The unique string that we created to identify the Target resource to fetch.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NE[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.connection_policy.connection_policy_target'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: FetchConnectionPolicyTarget
      x-maturity:
      - GA
    post:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: ConnectionPolicySid
        in: path
        description: The SID of the Connection Policy that owns the Target.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The unique string that we created to identify the Target resource to update.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NE[0-9a-fA-F]{32}$
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/voice.v1.connection_policy.connection_policy_target'
          description: OK
      security:
      - accountSid_authToken: []
      operationId: UpdateConnectionPolicyTarget
      x-maturity:
      - GA
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/UpdateConnectionPolicyTargetRequest'
    delete:
      description: ''
      tags:
      - ConnectionPolicies
      parameters:
      - name: ConnectionPolicySid
        in: path
        description: The SID of the Connection Policy that owns the Target.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
        required: true
      - name: Sid
        in: path
        description: The unique string that we created to identify the Target resource to delete.
        schema:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NE[0-9a-fA-F]{32}$
        required: true
      responses:
        '204':
          description: The resource was deleted successfully.
      security:
      - accountSid_authToken: []
      operationId: DeleteConnectionPolicyTarget
      x-maturity:
      - GA
components:
  schemas:
    UpdateConnectionPolicyRequest:
      type: object
      properties:
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
    ListConnectionPolicyTargetResponse:
      type: object
      properties:
        targets:
          type: array
          items:
            $ref: '#/components/schemas/voice.v1.connection_policy.connection_policy_target'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    CreateConnectionPolicyTargetRequest:
      type: object
      required:
      - Target
      properties:
        Target:
          type: string
          format: uri
          description: The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported.
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
        Priority:
          type: integer
          description: The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target.
        Weight:
          type: integer
          description: The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority.
        Enabled:
          type: boolean
          description: Whether the Target is enabled. The default is `true`.
    CreateConnectionPolicyRequest:
      type: object
      properties:
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
    voice.v1.connection_policy.connection_policy_target:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Target resource.
        connection_policy_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the Connection Policy that owns the Target.
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NE[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Target resource.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the resource.
        target:
          type: string
          format: uri
          nullable: true
          description: The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported.
          x-twilio:
            pii:
              handling: standard
              deleteSla: 30
        priority:
          type: integer
          nullable: true
          description: The relative importance of the target. Can be an integer from 0 to 65535, inclusive, and the default is 10. The lowest number represents the most important target.
        weight:
          type: integer
          nullable: true
          description: The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive, and the default is 10. Targets with higher values receive more load than those with lower ones with the same priority.
        enabled:
          type: boolean
          nullable: true
          description: Whether the target is enabled. The default is `true`.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
    ListConnectionPolicyResponse:
      type: object
      properties:
        connection_policies:
          type: array
          items:
            $ref: '#/components/schemas/voice.v1.connection_policy'
        meta:
          type: object
          properties:
            first_page_url:
              type: string
              format: uri
            next_page_url:
              type: string
              format: uri
              nullable: true
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type: string
              format: uri
              nullable: true
            url:
              type: string
              format: uri
            key:
              type: string
    voice.v1.connection_policy:
      type: object
      properties:
        account_sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          nullable: true
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Connection Policy resource.
        sid:
          type: string
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          nullable: true
          description: The unique string that we created to identify the Connection Policy resource.
        friendly_name:
          type: string
          nullable: true
          description: The string that you assigned to describe the resource.
        date_created:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
        date_updated:
          type: string
          format: date-time
          nullable: true
          description: The date and time in GMT when the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
        url:
          type: string
          format: uri
          nullable: true
          description: The absolute URL of the resource.
        links:
          type: object
          format: uri-map
          nullable: true
          description: The URLs of related resources.
    UpdateConnectionPolicyTargetRequest:
      type: object
      properties:
        FriendlyName:
          type: string
          description: A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.
        Target:
          type: string
          format: uri
          description: The SIP address you want Twilio to route your calls to. This must be a `sip:` schema. `sips` is NOT supported.
        Priority:
          type: integer
          description: The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target.
        Weight:
          type: integer
          description: The value that determines the relative share of the load the Target should receive compared to other Targets with the same priority. Can be an integer from 1 to 65535, inclusive. Targets with higher values receive more load than those with lower ones with the same priority.
        Enabled:
          type: boolean
          description: Whether the Target is enabled.
  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.