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.
POST
/v1/Services/{ServiceSid}/Environments
curl \
--request POST 'https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'UniqueName=staging&DomainSuffix=stage'
Request example
{"UniqueName"=>"staging", "DomainSuffix"=>"stage"}
Response examples (201)
{
"sid": "ZE00000000000000000000000000000000",
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000",
"links": {
"logs": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Logs",
"variables": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Variables",
"deployments": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Deployments"
},
"build_sid": null,
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"domain_name": "foobar-1234-stage.twil.io",
"service_sid": "ZS00000000000000000000000000000000",
"unique_name": "staging",
"date_created": "2018-11-10T20:00:00Z",
"date_updated": "2018-11-10T20:00:00Z",
"domain_suffix": "stage",
"custom_domain_name": null
}