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?

Service

Services are containers for your environments. You may only need one Service with many environments. When you begin working on a new application, you will likely want to create a new Service.

The unique name of your service forms the first part of your Serverless domain and cannot be updated.

Service properties

Names in PHP format
sid
sid<ZS> Not PII

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

accountSid
sid<AC> Not PII

The SID of the Account that created the Service resource.

friendlyName

The string that you assigned to describe the Service resource.

uniqueName

An application-defined string that uniquely identifies the Service resource. It can be used in place of the Service resource's sid in the URL to address the Service resource.

includeCredentials
boolean Not PII

Whether to inject Account credentials into a function invocation context.

dateCreated
date_time<iso8601> Not PII

The date and time in GMT when the Service resource was created specified in ISO 8601 format.

dateUpdated
date_time<iso8601> Not PII

The date and time in GMT when the Service resource was last updated specified in ISO 8601 format.

url
url Not PII

The absolute URL of the Service resource.

links
uri_map Not PII

The URLs of the Service's nested resources.

Create a Service resource

post
https://serverless.twilio.com/v1/Services
Parameters
Names in None format
include_credentials
Optional
post boolean Not PII

Whether to inject Account credentials into a function invocation context. The default value is false.

unique_name
Required
post string PII MTL: 7 DAYS

An application-defined string that uniquely identifies the Service resource. It can be used as an alternative to the sid in the URL path to address the Service resource. This value must be 244 characters or less in length and be unique.

friendly_name
Required
post string PII MTL: 7 DAYS

A descriptive string that you create to describe the Service resource. It can be up to 255 characters long.

Example 1
        
        
        
        

        Fetch a Service resource

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

        The sid or unique_name of the Service resource to fetch.

        Example
              
              
              
              

              Read multiple Service resources

              get
              https://serverless.twilio.com/v1/Services
              Example
                    
                    
                    
                    

                    Update a Service resource

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

                    The sid or unique_name of the Service resource to update.

                    include_credentials
                    Optional
                    post boolean Not PII

                    Whether to inject Account credentials into a function invocation context.

                    friendly_name
                    Optional
                    post string PII MTL: 7 DAYS

                    A descriptive string that you create to describe the Service resource. It can be up to 255 characters long.

                    Example
                          
                          
                          
                          

                          Delete a Service resource

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

                          The sid or unique_name of the Service resource to delete.

                          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.