Create a new Service resource
The top-level resource for a Serverless application, which serves as a container for the application environments.
Create a new Service resource.
Body
-
A descriptive string that you create to describe the Service resource. It can be a maximum of 255 characters.
-
IncludeCredentials boolean
Whether to inject Account credentials into a function invocation context. The default value is
true
. -
UiEditable boolean
Whether the Service's properties and subresources can be edited via the UI. The default value is
false
. -
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.
POST /v1/Services
curl \
-X POST https://serverless.twilio.com/v1/Services \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'FriendlyName=string&IncludeCredentials=true&UiEditable=true&UniqueName=string'
Request example
{
"FriendlyName": "string",
"IncludeCredentials": true,
"UiEditable": true,
"UniqueName": "string"
}
Request examples
{
"FriendlyName": "string",
"IncludeCredentials": true,
"UiEditable": true,
"UniqueName": "string"
}
Response examples (201)
{
"account_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"domain_base": "string",
"friendly_name": "string",
"include_credentials": true,
"links": {},
"sid": "string",
"ui_editable": true,
"unique_name": "string",
"url": "https://example.com"
}
Response examples (201)
{
"account_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"domain_base": "string",
"friendly_name": "string",
"include_credentials": true,
"links": {},
"sid": "string",
"ui_editable": true,
"unique_name": "string",
"url": "https://example.com"
}