Twilio ConnectionPolicies API

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

Operations 10

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/ConnectionPolicies Create a connection policy · Create connection policy #
Ask an LLM
“How do I start a new connection policy for sending calls to my own SIP servers?”
“Can I give a new connection policy a friendly name when I create it?”
Tell an agent
Create a new connection policy named {name}.
Create an empty connection policy.
GET /v1/ConnectionPolicies List connection policies · List connection policy #
Ask an LLM
“Which connection policies have I set up for routing calls to my SIP infrastructure?”
“What connection policies exist on my account right now?”
Tell an agent
List all my connection policies.
Show my connection policies, {page_size} per page.
GET /v1/ConnectionPolicies/{Sid} View a connection policy · Fetch connection policy #
Ask an LLM
“What are the details of one particular connection policy?”
“Can I look up a connection policy by its SID?”
Tell an agent
Show connection policy {policy}.
Get the name and dates of connection policy {policy}.
POST /v1/ConnectionPolicies/{Sid} Rename a connection policy · Update connection policy #
Ask an LLM
“Can I change the friendly name of a connection policy I already have?”
“Is it possible to relabel an existing connection policy?”
Tell an agent
Rename connection policy {policy} to {name}.
Change the label on existing connection policy {policy} to {name}.
DELETE /v1/ConnectionPolicies/{Sid} Delete a connection policy · Delete connection policy #
Ask an LLM
“How do I remove a connection policy I no longer use?”
“Can I delete a whole connection policy including its targets?”
Tell an agent destructive · confirm first
Delete connection policy {policy}.
Remove the unused connection policy {policy} from my account.
POST /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets Add a SIP target to a connection policy · Create connection policy target #
Ask an LLM
“How do I add a SIP address as a new target on a connection policy?”
“Can I set priority and weight when adding a target so calls fail over or load balance?”
Tell an agent
Add target {target} to connection policy {policy}.
Add target {target} to policy {policy} with priority {priority} and weight {weight}.
GET /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets List the targets of a connection policy · List connection policy target #
Ask an LLM
“Which SIP endpoints does a connection policy send calls to?”
“What targets, priorities and weights are on one of my connection policies?”
Tell an agent
List the targets on connection policy {policy}.
Show every SIP target configured under policy {policy}.
GET /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} View one connection policy target · Fetch connection policy target #
Ask an LLM
“What SIP address, priority and weight does a single policy target have?”
“Is a specific target on my connection policy enabled?”
Tell an agent
Show target {target} on connection policy {policy}.
Check whether target {target} in policy {policy} is enabled.
POST /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} Change a connection policy target · Update connection policy target #
Ask an LLM
“Can I temporarily disable one SIP target without deleting it?”
“What do I change to shift more traffic to one existing target?”
Tell an agent
Disable target {target} on connection policy {policy} by setting enabled to {enabled}.
Change the weight of existing target {target} in policy {policy} to {weight}.
DELETE /v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid} Remove a target from a connection policy · Delete connection policy target #
Ask an LLM
“How do I take a decommissioned SIP server out of a connection policy?”
“Can I delete a single target and keep the rest of the policy?”
Tell an agent destructive · confirm first
Remove target {target} from connection policy {policy}.
Delete policy target {target} under {policy}.

Documentation

Specifications

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/twilio-connectionpolicies-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

twilio-connectionpolicies-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Twilio - Voice Connection Policies 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://voice.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'
      summary: Create connection policy
      x-summary-source: derived
    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
      summary: List connection policy
      x-summary-source: derived
  /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
      summary: Fetch connection policy
      x-summary-source: derived
    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'
      summary: Update connection policy
      x-summary-source: derived
    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
      summary: Delete connection policy
      x-summary-source: derived
  /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'
      summary: Create connection policy target
      x-summary-source: derived
    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
      summary: List connection policy target
      x-summary-source: derived
  /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
      summary: Fetch connection policy target
      x-summary-source: derived
    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'
      summary: Update connection policy target
      x-summary-source: derived
    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
      summary: Delete connection policy target
      x-summary-source: derived
components:
  schemas:
    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
              - 'null'
              format: uri
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type:
              - string
              - 'null'
              format: uri
            url:
              type: string
              format: uri
            key:
              type: string
    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
              - 'null'
              format: uri
            page:
              type: integer
            page_size:
              type: integer
            previous_page_url:
              type:
              - string
              - 'null'
              format: uri
            url:
              type: string
              format: uri
            key:
              type: string
    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.
    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.
    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`.
    voice.v1.connection_policy.connection_policy_target:
      type: object
      properties:
        account_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Target resource.
        connection_policy_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          description: The SID of the Connection Policy that owns the Target.
        sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^NE[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Target resource.
        friendly_name:
          type:
          - string
          - 'null'
          description: The string that you assigned to describe the resource.
        target:
          type:
          - string
          - 'null'
          format: uri
          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
          - 'null'
          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
          - 'null'
          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
          - 'null'
          description: Whether the target is enabled. The default is `true`.
        date_created:
          type:
          - string
          - 'null'
          format: date-time
          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
          - 'null'
          format: date-time
          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
          - 'null'
          format: uri
          description: The absolute URL of the resource.
    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:
      type: object
      properties:
        account_sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^AC[0-9a-fA-F]{32}$
          description: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Connection Policy resource.
        sid:
          type:
          - string
          - 'null'
          minLength: 34
          maxLength: 34
          pattern: ^NY[0-9a-fA-F]{32}$
          description: The unique string that we created to identify the Connection Policy resource.
        friendly_name:
          type:
          - string
          - 'null'
          description: The string that you assigned to describe the resource.
        date_created:
          type:
          - string
          - 'null'
          format: date-time
          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
          - 'null'
          format: date-time
          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
          - 'null'
          format: uri
          description: The absolute URL of the resource.
        links:
          type:
          - object
          - 'null'
          format: uri-map
          description: The URLs of related resources.
  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.
- name: Preview
  description: PLEASE NOTE that this is a Preview product that is subject to change. Use it with caution. If you currently do not have developer preview access, please contact https://www.twilio.com/help/contact.