Menu

Expand
Rate this page:

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

Resource Properties in REST API format
sid
sid<ZS> Not PII

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

account_sid
sid<AC> Not PII

The SID of the Account that created the Service resource.

friendly_name

The string that you assigned to describe the Service resource.

unique_name

A user-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.

include_credentials
boolean Not PII

Whether to inject Account credentials into a function invocation context.

ui_editable
boolean Not PII

Whether the Service resource's properties and subresources can be edited via the UI.

domain_base
string Not PII

The base domain name for this Service, which is a combination of the unique name and a randomly generated string.

date_created
date_time<iso8601> Not PII

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

date_updated
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
Parameters in REST API format
unique_name
Required
post string PII MTL: 7 DAYS

A user-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 50 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 a maximum of 255 characters.

include_credentials
Optional
post boolean Not PII

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

ui_editable
Optional
post boolean Not PII

Whether the Service's properties and subresources can be edited via the UI. The default value is false.

Example 1
Loading Code Sample...
        
        

        Create Service

        Fetch a Service resource

        get
        https://serverless.twilio.com/v1/Services/{Sid}
        Parameters
        Parameters in REST API format
        sid
        Path
        get sid_like<ZS> Not PII

        The sid or unique_name of the Service resource to fetch.

        Example 1
        Loading Code Sample...
              
              

              Fetch Service

              Read multiple Service resources

              get
              https://serverless.twilio.com/v1/Services
              Example 1
              Loading Code Sample...
                    
                    

                    Read Service

                    Update a Service resource

                    post
                    https://serverless.twilio.com/v1/Services/{Sid}
                    Parameters
                    Parameters in REST API format
                    sid
                    Path
                    post sid_like<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 a maximum of 255 characters.

                    ui_editable
                    Optional
                    post boolean Not PII

                    Whether the Service resource's properties and subresources can be edited via the UI. The default value is false.

                    Example 1
                    Loading Code Sample...
                          
                          

                          Update a Service to be editable in the Console UI

                          Delete a Service resource

                          delete
                          https://serverless.twilio.com/v1/Services/{Sid}
                          Parameters
                          Parameters in REST API format
                          sid
                          Path
                          delete sid_like<ZS> Not PII

                          The sid or unique_name of the Service resource to delete.

                          Example 1
                          Loading Code Sample...
                                
                                

                                Delete Service

                                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