Create BYOK credential
Add a new bring-your-own-key (BYOK) provider credential.
Create BYOK credential API Documentation
Use the POST /v1/byok endpoint to create a new BYOK integration with a third-party provider using the API key generated on the provider's application.
API Request
Sending Request
curl -X POST "https://api.zoice.com/v1/byok" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ZOICE_API_KEY" \
-d '{
"key_name": "ElevenLabs Personal",
"provider": "elevenlabs",
"api_key": "sk_3d85c3d4e..."
}'Response Format
{
"status": "success",
"credential": {
"key_status": "active",
"credential_id": "cred_a8f7407278ce06f5...",
"key_name": "Elevenlabs Personal",
"provider": "elevenlabs",
"masked_api_key": "sk_3d85...692b"
}
}Schemas
Input
Body Parameter | Type | Required | Default | Range |
|---|---|---|---|---|
key_name | string | Yes | - | - |
provider | string | Yes | - |
|
api_key | string | Yes | - | A valid API key generated on the provider's app. |
Output
Field | Type | Description |
|---|---|---|
status | string | The status of the API request. Allowed values: |
credential | object | Object with credential information. |
credential.key_status | string | The current status of the key. Allowed values: |
credential.credential_id | string | The unique identifier associated with the credential. |
credential.key_name | string | The name of the credential. |
credential.provider | string | The third-party provider associated with the credential, for eg., |
credential.masked_api_key | string | The API key used to set up the credential in masked form. |