---
title: "Create a credential"
method: POST
path: "/telephony_credentials"
tags: ["Credentials"]
---

# Create a credential

`POST /telephony_credentials`

Create a credential.

## Request body

- TelephonyCredentialCreateRequest
  - `name` string
  - `tag` string — Tags a credential. A single tag can hold at maximum 1000 credentials.
  - `connection_id` string, required — Identifies the Credential Connection this credential is associated with.
  - `expires_at` string — ISO-8601 formatted date indicating when the credential will expire.

## Response `201`

Successful response with details about a credential

- object
  - `data` TelephonyCredential
    - `id` string — Identifies the resource.
    - `record_type` string — Identifies the type of the resource.
    - `name` string
    - `resource_id` string — Identifies the resource this credential is associated with.
    - `expired` boolean — Defaults to false
    - `sip_username` string — The randomly generated SIP username for the credential.
    - `sip_password` string — The randomly generated SIP password for the credential.
    - `created_at` string — ISO-8601 formatted date indicating when the resource was created.
    - `user_id` string — Identifies the user this credential is associated with.
    - `updated_at` string — ISO-8601 formatted date indicating when the resource was updated.
    - `expires_at` string — ISO-8601 formatted date indicating when the resource will expire.

## Other responses

- `422` — Bad request

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/versions/8f5f4e537994/schema)
