POST
/2010-04-01/Accounts/{AccountSid}/Keys.jsonCreate an API Key
Creates a new API Key for an account. Optionally provide FriendlyName to label the key; the response includes its secret, which is returned only when the key is first created.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
AccountSidstringrequired
The SID of the account responsible for the new API Key, in the format `AC` followed by 32 hexadecimal characters.
Optional API Key creation details.
FriendlyNamestringoptional
A descriptive string that you create to describe the resource. It can be up to 64 characters long.
201Returns the created API Key, including its SID, friendly name, creation and update dates, and secret. The secret is returned only when the key is first created.
sidstringoptional
The unique string that that we created to identify the NewKey resource. You will use this as the basic-auth `user` when authenticating to the API.
friendly_namestringoptional
The string that you assigned to describe the resource.
date_createdstringoptional
The date and time in GMT that the API Key was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
date_updatedstringoptional
The date and time in GMT that the new API Key was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
secretstringoptional
The secret your application uses to sign Access Tokens and to authenticate to the REST API (you will use this as the basic-auth `password`). **Note that for security reasons, this field is ONLY returned when the API Key is first created.**
Error handling
AccountSid must be a 34-character account SID beginning with AC. If provided, FriendlyName must not exceed 64 characters.