Skip to main content
PATCH
/
api
/
v2
/
platform
/
telephony
/
providers-configurations
/
{id}
Update Provider
curl --request PATCH \
  --url http://localhost:3001/api/v2/platform/telephony/providers-configurations/{id}/ \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Org-Handle: <org-handle>' \
  --data '
{
  "auth_token": "new_auth_token"
}
'
{
  "status_code": 200,
  "message": "Provider configuration updated successfully.",
  "data": {
    "id": 42,
    "provider": "twilio",
    "account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "created_at": "2026-02-07T10:00:00Z"
  }
}
{
  "status_code": 200,
  "message": "Provider configuration updated successfully.",
  "data": {
    "id": 42,
    "provider": "twilio",
    "account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "created_at": "2026-02-07T10:00:00Z"
  }
}

Update Provider Configuration

Partially update an existing telephony provider configuration. This is useful for rotating credentials such as the auth_token without deleting and recreating the entire configuration.
Prerequisites: Make sure you have your API Token and Org-Handle ready. See Authentication for details.

Path Parameters

NameTypeRequiredDescription
idintegerYesUnique identifier of the provider configuration
You can get the provider configuration id by hitting the Get All Providers API.

Headers

NameTypeRequiredDescription
AuthorizationstringYesAPI Key format: Token <token>
Org-HandlestringYesOrganization domain handle
Content-TypestringYesapplication/json

Request Body

All fields are optional — include only the fields you wish to update.
FieldTypeRequiredDescription
auth_tokenstringNoUpdated Auth Token / Secret key
account_sidstringNoUpdated Account SID

Response Fields

FieldTypeDescription
status_codeintegerHTTP status code
messagestringResponse message
dataobjectUpdated provider config details

Provider Config Object Fields

FieldTypeDescription
idintegerUnique provider configuration identifier
providerstringProvider slug/identifier
account_sidstringAccount SID for the provider
created_atstringConfiguration creation timestamp

Common Error Codes

Status CodeDescription
200Success - Configuration updated successfully
400Bad Request - Invalid update parameters
401Unauthorized - Invalid or missing API token
403Forbidden - Invalid organization handle
404Not Found - Provider configuration not found
500Internal Server Error - Server-side error

Code Examples

const axios = require('axios');

const headers = {
  'Authorization': 'Token your-api-token',
  'Org-Handle': 'your-org-handle',
  'Content-Type': 'application/json'
};

// Update a provider configuration
const updateProvider = async (id, updates) => {
  const response = await axios.patch(
    `https://unpod.dev/api/v2/platform/telephony/providers-configurations/${id}/`,
    updates,
    { headers }
  );
  console.log(`Provider #${response.data.data.id} updated successfully`);
  return response.data.data;
};

// Example: rotate auth_token
updateProvider(42, { auth_token: 'your-new-auth-token-here' });

Best Practices

  1. Partial Updates: Only include fields you want to change — PATCH supports partial updates
  2. Credential Rotation: Regularly rotate auth_token values for security without disrupting bridges
  3. Security: Never expose auth_token values in logs or responses
  4. Verify Before Update: Use Get Provider by ID to confirm the configuration exists before patching
  5. Error Handling: Handle 404 and 400 errors to catch invalid IDs or credential formats

Authorizations

Authorization
string
header
required

Format: Token

Headers

Org-Handle
string
required

Organization domain handle

Example:

"unpod"

Path Parameters

id
integer
required
Example:

1

Body

application/json
auth_token
string
Example:

"new_auth_token"

Response

Provider updated