Menu

Expand
Rate this page:

ConnectionPolicyTarget Resource

The ConnectionPolicyTarget resource describes the individual URI entries that make up the BYOC Origination ConnectionPolicies list.

ConnectionPolicyTarget properties

Resource Properties in REST API format
account_sid
sid<AC> Not PII

The SID of the Account that created the Target resource.

connection_policy_sid
sid<NY> Not PII

The SID of the Connection Policy that owns the Target.

sid
sid<NE> Not PII

The unique string that we created to identify the Target resource.

friendly_name
string Not PII

The string that you assigned to describe the resource.

target

The SIP address you want Twilio to route your calls to. This must be a sip: schema. sips is NOT supported.

priority
integer Not PII

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
integer Not PII

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
boolean Not PII

Whether the target is enabled. The default is true.

date_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in RFC 2822 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in RFC 2822 format.

url
url Not PII

The absolute URL of the resource.

Create a ConnectionPolicyTarget resource

post
https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets
Parameters
Parameters in REST API format
connection_policy_sid
Path
post sid<NY> Not PII

The SID of the Connection Policy that owns the Target.

target
Required
post url PII MTL: 30 DAYS

The SIP address you want Twilio to route your calls to. This must be a sip: schema. sips is NOT supported.

friendly_name
Optional
post string Not PII

A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.

priority
Optional
post integer Not PII

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
Optional
post integer Not PII

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
Optional
post boolean Not PII

Whether the Target is enabled. The default is true.

Example 1
Loading Code Sample...
        
        
        

        Create Connection Policy Target

        Fetch a ConnectionPolicyTarget resource

        get
        https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
        Parameters
        Parameters in REST API format
        connection_policy_sid
        Path
        get sid<NY> Not PII

        The SID of the Connection Policy that owns the Target.

        sid
        Path
        get sid<NE> Not PII

        The unique string that we created to identify the Target resource to fetch.

        Example 1
        Loading Code Sample...
              
              
              

              Fetch Connection Policy Target

              Read multiple ConnectionPolicyTarget resources

              get
              https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets
              Parameters
              Parameters in REST API format
              connection_policy_sid
              Path
              get sid<NY> Not PII

              The SID of the Connection Policy from which to read the Targets.

              Example 1
              Loading Code Sample...
                    
                    
                    

                    Read Connection Policy Target

                    Update a ConnectionPolicyTarget resource

                    post
                    https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
                    Parameters
                    Parameters in REST API format
                    connection_policy_sid
                    Path
                    post sid<NY> Not PII

                    The SID of the Connection Policy that owns the Target.

                    sid
                    Path
                    post sid<NE> Not PII

                    The unique string that we created to identify the Target resource to update.

                    friendly_name
                    Optional
                    post string Not PII

                    A descriptive string that you create to describe the resource. It is not unique and can be up to 255 characters long.

                    target
                    Optional
                    post url PII MTL: 30 DAYS

                    The SIP address you want Twilio to route your calls to. This must be a sip: schema. sips is NOT supported.

                    priority
                    Optional
                    post integer Not PII

                    The relative importance of the target. Can be an integer from 0 to 65535, inclusive. The lowest number represents the most important target.

                    weight
                    Optional
                    post integer Not PII

                    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
                    Optional
                    post boolean Not PII

                    Whether the Target is enabled.

                    Example 1
                    Loading Code Sample...
                          
                          
                          

                          Update Connection Policy Target

                          Delete a ConnectionPolicyTarget resource

                          delete
                          https://voice.twilio.com/v1/ConnectionPolicies/{ConnectionPolicySid}/Targets/{Sid}
                          Parameters
                          Parameters in REST API format
                          connection_policy_sid
                          Path
                          delete sid<NY> Not PII

                          The SID of the Connection Policy that owns the Target.

                          sid
                          Path
                          delete sid<NE> Not PII

                          The unique string that we created to identify the Target resource to delete.

                          Example 1
                          Loading Code Sample...
                                
                                
                                

                                Delete Connection Policy Target

                                Rate this page:

                                Need some help?

                                We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                                Loading Code Sample...
                                      
                                      
                                      

                                      Thank you for your feedback!

                                      Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                      Sending your feedback...
                                      🎉 Thank you for your feedback!
                                      Something went wrong. Please try again.

                                      Thanks for your feedback!

                                      thanks-feedback-gif