Skip to main content
POST
/
integration_secrets
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const integrationSecret = await client.integrationSecrets.create({
  identifier: 'my_secret',
  type: 'bearer',
  token: 'my_secret_value',
});

console.log(integrationSecret.data);
{
  "data": {
    "record_type": "integration_secret",
    "id": "<string>",
    "identifier": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
identifier
string
required

The unique identifier of the secret.

type
enum<string>
required

The type of secret.

Available options:
bearer,
basic
token
string

The token for the secret. Required for bearer type secrets, ignored otherwise.

username
string

The username for the secret. Required for basic type secrets, ignored otherwise.

password
string

The password for the secret. Required for basic type secrets, ignored otherwise.

Response

Successful Response

data
IntegrationSecret · object
required