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

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

const response = await client.texml.secrets({ name: 'My Secret Name', value: 'My Secret Value' });

console.log(response.data);
{
  "data": {
    "name": "My Secret Name",
    "value": "*****"
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json

Create TeXML secret request object

name
string
required

Name used as a reference for the secret, if the name already exists within the account its value will be replaced

Example:

"My Secret Name"

value
string
required

Secret value which will be used when rendering the TeXML template

Example:

"My Secret Value"

Response

Successful response upon creating a TeXML secret.

data
Create TeXML Secret result · object
Example:
{
"name": "My Secret Name",
"value": "*****"
}