Path parameters
-
The Twilio-provided string that uniquely identifies the Key resource to update.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^SK[0-9a-fA-F]{32}$
.
Body
-
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
-
The `Policy` object is a collection that specifies the allowed Twilio permissions for the restricted key. For more information on the permissions available with restricted API keys, refer to the Twilio documentation.
POST
/v1/Keys/{Sid}
curl \
--request POST 'https://iam.twilio.com/v1/Keys/{Sid}' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'FriendlyName=foo'
Request examples
Update standard key
{"FriendlyName"=>"foo"}
{"Policy"=>"{\"allow\":[\"/twilio/messaging/messages/read\", \"/twilio/messaging/messages/update\"]}", "FriendlyName"=>"foo"}
Response examples (200)
Update standard key
{
"sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"policy": null,
"date_created": "Mon, 13 Jun 2016 22:50:08 +0000",
"date_updated": "Mon, 13 Jun 2016 22:50:08 +0000",
"friendly_name": "foo"
}
{
"sid": "SKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"policy": {
"allow": [
"/twilio/messaging/messages/read",
"/twilio/messaging/messages/update"
]
},
"date_created": "Mon, 13 Jun 2016 22:50:08 +0000",
"date_updated": "Mon, 13 Jun 2016 22:50:08 +0000",
"friendly_name": "foo"
}