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
        
        
        
        

        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
              
              
              
              

              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
                    
                    
                    
                    

                    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
                          
                          
                          
                          

                          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
                                
                                
                                
                                
                                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 browsing the Twilio tag on Stack Overflow.

                                      
                                      
                                      

                                      Thank you for your feedback!

                                      We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

                                      Thanks for your feedback!

                                      Refer us and get $10 in 3 simple steps!

                                      Step 1

                                      Get link

                                      Get a free personal referral link here

                                      Step 2

                                      Give $10

                                      Your user signs up and upgrade using link

                                      Step 3

                                      Get $10

                                      1,250 free SMSes
                                      OR 1,000 free voice mins
                                      OR 12,000 chats
                                      OR more