Create a new environment
Represents a deployed build of a given set of Functions and/or Assets at a specific URL.
Create a new environment.
Path parameters
-
The SID of the Service to create the Environment resource under.
Body
-
DomainSuffix string
A URL-friendly name that represents the environment and forms part of the domain name. It can be a maximum of 16 characters.
-
A user-defined string that uniquely identifies the Environment resource. It can be a maximum of 100 characters.
POST /v1/Services/{ServiceSid}/Environments
curl \
-X POST https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments \
--user "username:password" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'DomainSuffix=string&UniqueName=string'
Request example
{
"DomainSuffix": "string",
"UniqueName": "string"
}
Request examples
{
"DomainSuffix": "string",
"UniqueName": "string"
}
Response examples (201)
{
"account_sid": "string",
"build_sid": "string",
"date_created": "2023-05-04T09:42:00+00:00",
"date_updated": "2023-05-04T09:42:00+00:00",
"domain_name": "string",
"domain_suffix": "string",
"links": {},
"service_sid": "string",
"sid": "string",
"unique_name": "string",
"url": "https://example.com"
}
Response examples (201)
{
"account_sid": "string",
"build_sid": "string",
"date_created": "2024-05-04T09:42:00+00:00",
"date_updated": "2024-05-04T09:42:00+00:00",
"domain_name": "string",
"domain_suffix": "string",
"links": {},
"service_sid": "string",
"sid": "string",
"unique_name": "string",
"url": "https://example.com"
}