Create Server Credential

Create a credential for authenticating requests to your custom endpoints (tools, webhooks, or custom LLM/TTS providers). The credential is synced to the voice engine and can be referenced by assistant credential_ids.

Endpoint

Request Body

name
string
required
Credential name (e.g., “My OpenAI Key”, “Production Webhook Auth”)
auth_type
string
required
Authentication type: bearer_token, oauth2_client_credentials, or hmac
description
string
Optional description
public_config
object
Public (non-secret) configuration. Required fields depend on auth_type.
  • For oauth2_client_credentials: token_url and client_id
  • For hmac: algorithm (e.g., sha256)
secrets
object
Secret values (encrypted at rest, never returned in full).
  • For bearer_token: token
  • For oauth2_client_credentials: client_secret
  • For hmac: secret_key

Example Request

Bearer Token

OAuth2 Client Credentials

HMAC

Response

The vapi_credential_id is the UUID assigned by the voice engine — use this in assistant credential_ids.

Errors