Create a secret
POST/integration_secrets
Create a new secret with an associated identifier that can be used to securely integrate with other services.
Request
- application/json
Body
required
identifier Identifier (string)required
The unique identifier of the secret.
type Type (string)required
Possible values: [bearer
, basic
]
The type of secret.
token Token (string)
The token for the secret. Required for bearer type secrets, ignored otherwise.
username Username (string)
The username for the secret. Required for basic type secrets, ignored otherwise.
password Password (string)
The password for the secret. Required for basic type secrets, ignored otherwise.
Responses
201: Successful Response
- application/json
422: Validation Error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/integration_secrets' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"identifier": "string",
"type": "bearer",
"token": "string",
"username": "string",
"password": "string"
}'
Response samples
{
"data": {
"record_type": "integration_secret",
"id": "string",
"identifier": "string",
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z"
}
}
{
"errors": [
{
"code": "string",
"detail": "string",
"title": "string"
}
]
}