Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
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?

Asset

Assets are static files that you can host at a particular domain in an Environment.

The steps to create Assets are as follows:

  1. Create an Asset (this resource)
  2. Create an Asset Version

We will need the Asset Version SID to include this Asset in a Build.

Asset properties

Names in PHP format
sid
sid<ZH> Not PII

The unique SID identifier of this Asset.

accountSid
sid<AC> Not PII

The unique SID identifier of the Account that owns this Asset.

serviceSid
sid<ZS> Not PII

The unique SID identifier of the Service for this Asset.

friendlyName

A human-readable description of this Asset, fewer than 256 characters.

dateCreated
date_time<iso8601> Not PII

The date that this Asset was created, given in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date that this Asset was updated, given in ISO 8601 format.

url
url Not PII

The URL of this Asset.

links
uri_map Not PII

Contains a dictionary of URL links to nested resources of this Asset.

Create an Asset resource

post
https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets
Parameters
Names in None format
service_sid
Required
post sid_like<ZS> Not PII

The unique SID identifier of the Service for this Asset.

friendly_name
Required
post string PII MTL: 7 DAYS

A human-readable description of this Asset, fewer than 256 characters. Required.

Example
        
        
        
        

        Fetch an Asset resource

        get
        https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets/{Sid}
        Parameters
        Names in None format
        service_sid
        Required
        get sid_like<ZS> Not PII

        The unique SID identifier of the Service for this Asset.

        sid
        Required
        get sid<ZH> Not PII

        The unique SID identifier of this Asset.

        Example
              
              
              
              

              Read multiple Asset resources

              get
              https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets
              Parameters
              Names in None format
              service_sid
              Required
              get sid_like<ZS> Not PII

              The unique SID identifier of the Service for these Assets.

              Example
                    
                    
                    
                    

                    Update an Asset resource

                    post
                    https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets/{Sid}
                    Parameters
                    Names in None format
                    service_sid
                    Required
                    post sid_like<ZS> Not PII

                    The unique SID identifier of the Service for this Asset.

                    sid
                    Required
                    post sid<ZH> Not PII

                    The unique SID identifier of this Asset.

                    friendly_name
                    Required
                    post string PII MTL: 7 DAYS

                    A human-readable description of this Asset, fewer than 256 characters. Required.

                    Example
                          
                          
                          
                          

                          Delete an Asset resource

                          delete
                          https://serverless.twilio.com/v1/Services/{ServiceSid}/Assets/{Sid}
                          Parameters
                          Names in None format
                          service_sid
                          Required
                          delete sid_like<ZS> Not PII

                          The unique SID identifier of the Service for these Assets.

                          sid
                          Required
                          delete sid<ZH> Not PII

                          The unique SID identifier of this Asset.

                          Example
                                
                                
                                
                                
                                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.