Create a new Variable.
A key and value pair that is specific to an Environment.
Create a new Variable.
Path parameters
-
The SID of the Service to create the Variable resource under.
-
The SID of the Environment in which the Variable resource exists.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^ZE[0-9a-fA-F]{32}$
.
POST
/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables
curl \
--request POST 'https://serverless.twilio.com/v1/Services/{ServiceSid}/Environments/{EnvironmentSid}/Variables' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Key=new-key&Value=new-value'
Request example
{"Key"=>"new-key", "Value"=>"new-value"}
Response examples (201)
{
"key": "new-key",
"sid": "ZV00000000000000000000000000000000",
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Environments/ZE00000000000000000000000000000000/Variables/ZV00000000000000000000000000000000",
"value": "new-value",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "ZS00000000000000000000000000000000",
"date_created": "2018-11-10T20:00:00Z",
"date_updated": "2018-11-10T20:00:00Z",
"environment_sid": "ZE00000000000000000000000000000000"
}