メニュー

Rate this page:

Thanks for rating this page!

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

ShortCode Resource

公開ベータ
TwilioのMessaging Service APIは現在パブリックベータ製品として利用可能です。まだ実装されていない機能や、正式版のリリースまでに変更される機能があります。
公開ベータ製品は、Twilioでのサポート対象外となります。

The ShortCode subresource of a Service Resource represents the short codes you have associated to the Service.

When a short code has been added to the Messaging Service, Copilot will always attempt to prioritize message delivery with your short code when possible. If the short code cannot be used to reach your user, Copilot's Shortcode Reroute will select a phone number in your Service instead.

Inbound messages received on any of short codes associated with a Messaging Service are passed to the inbound request URL of the Service with the TWiML parameters that describe the message.

ShortCode properties

Names in PHP format
sid
sid<SC> Not PII

The unique string that that we created to identify this ShortCode resource.

accountSid
sid<AC> Not PII

The SID of the Account that created this ShortCode resource.

serviceSid
sid<MG> Not PII

The SID of the Service this resource is associated with.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT that this resource was created specified in RFC 2822 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT that this resource was last updated, specified in RFC 2822 format.

shortCode
文字列 Not PII

ショートコードのE.164形式です。

countryCode
文字列 Not PII

The 2-character ISO Country Code of the number.

capabilities
object[] Not PII

電話番号またはメッセージを受信できるかどうかを示す値の配列です。取りうるケイパビリティはSMSおよびMMSです。

url
url Not PII

The absolute URL of this ShortCode resource.

Create a ShortCode resource

post
https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes
パラメーター
Names in None format
service_sid
必須
post sid<MG> Not PII

The SID of the Service to create the resource under.

short_code_sid
必須
post sid<SC> Not PII

SID of the ShortCode resource being added to the Service.

        
        
        
        

        Fetch a ShortCode resource

        GET
        https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}
        パラメーター
        Names in None format
        service_sid
        必須
        GET sid<MG> Not PII

        The SID of the Service to fetch the resource from.

        sid
        必須
        GET sid_like<SC> Not PII

        The Twilio-provided string that uniquely identifies the ShortCode resource to fetch

              
              
              
              

              Read multiple ShortCode resources

              GET
              https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes
              パラメーター
              Names in None format
              service_sid
              必須
              GET sid<MG> Not PII

              The SID of the Service to read the resource from.

                    
                    
                    
                    

                    Delete a ShortCode resource

                    削除する
                    https://messaging.twilio.com/v1/Services/{ServiceSid}/ShortCodes/{Sid}

                    Messaging Serviceからショートコードを削除しても、ショートコードはアカウントからリリースされません。 Messaging Serviceからショートコードの関連付けの解除、および削除を行うには、アカウントからショートコードを解約することが必要です。

                    Returns a 204 NO CONTENT if the short code was successfully removed from the service.

                    パラメーター
                    Names in None format
                    service_sid
                    必須
                    削除する sid<MG> Not PII

                    The SID of the Service to delete the resource from.

                    sid
                    必須
                    削除する sid_like<SC> Not PII

                    The Twilio-provided string that uniquely identifies the ShortCode resource to delete

                          
                          
                          
                          
                          Rate this page:

                          ヘルプが必要ですか?

                          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.