Create Credential

Add new SIP authentication credentials to a trunk.

This API creates a new set of SIP credentials (username and password) for authenticating calls on a specific trunk. The username must be unique within the trunk, and the password must meet minimum security requirements.

Important: Save the password securely after creation. The API will never return the password in future responses - it is write-only for security purposes.

Note: The username cannot be changed after creation. If you need a different username, create a new credential and delete the old one.

HTTP Request

POSThttps://api.vobiz.ai/api/v1/account/{account_id}/credentials

Authentication: Bearer token required. Include X-Auth-ID header.

Request Parameters

Request Parameters

NameTypeDescription
usernameRequired
stringSIP username for authentication. Must be unique within the account. Cannot be changed after creation. Use descriptive names like "office_phone_01" or "user_john_mobile".
passwordRequired
stringSIP password for authentication. Minimum 8 characters. Recommended: 12+ characters with mixed case, numbers, and special characters.
enabled
booleanWhether the credential is active and can be used for authentication. Default: true. Set to false to create a disabled credential.
description
stringOptional description providing context about the credential's purpose, such as "Primary office phone" or "John's mobile device".

Response

Returns the complete credential object including the auto-generated id UUID. Note that the password is not included in the response for security reasons.

Response - 201 Created
{
  "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",

  "username": "trunk_user_002",
  "enabled": true,
  "description": "Backup credential",
  "created_at": "2025-01-22T10:30:00Z",
  "updated_at": "2025-01-22T10:30:00Z"
}

Examples

cURL - Basic Credential

cURL Request
curl -X POST https://api.vobiz.ai/api/v1/account/{Auth_ID}/credentials \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "trunk_user_001",
    "password": "SecurePassword123!",
    "enabled": true,
    "description": "Primary credential"
  }'

cURL - Credential with Strong Password

cURL Request
curl -X POST https://api.vobiz.ai/api/v1/account/{Auth_ID}/credentials \
  -H "X-Auth-ID: YOUR_AUTH_ID" \
  -H "X-Auth-Token: YOUR_AUTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "office_phone_main",
    "password": "Vbz!2025$SecureP@ss",
    "enabled": true,
    "description": "Main office desk phone"
  }'

Error Response (409 Conflict): If the username already exists for this trunk:

Error Response
{
  "error": "Username already exists for this trunk",
  "code": 409
}

Next Steps:

  • • Save the credential id for future operations
  • • Store the password securely in your password manager
  • • Configure your SIP client with the username and password
  • • Test authentication by making a test call