VocalDocscontracts 1.65.0

Enter a secret of a Connection

PUT /v1/connections/{connection_id}/credentials

PropertyValue
Operationput_connection_credentials
GroupConnections
Scopeintegrations:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited integrations.connection.put_credentials (mutation)
Released in1.60.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Seals a key, token, client or certificate into the Connection under the Organization's data key and answers the Connection with its secret_hint (1.60.0; integrations.md section 8). Write-only: the body is never logged, stored in clear or answered, and the Audit event names the kind and the secret version only. A kind the strategy does not take is validation_failed with connection_credential_kind_invalid. A key, token or certificate makes a pending_authorization Connection active.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the integrations:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X PUT "$VOCAL_API/v1/connections/con_.../credentials" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "kind": "api_key", "value": "<value>" }'

Parameters

NameInTypeRequiredDescription
connection_idpathConnectionIdyesThe id of a Connection: con_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.

Request body

Content type application/json, required: ConnectionCredentialInput.

Responses

StatusContent typeShapeError codes
200application/jsonConnection
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeconnection_revoked
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is Connection.

FieldTypeRequiredDescription
allowed_environmentsarray of EnvironmentyesThe environments whose runs may use it; live only by default. A test run against a Connection that does not allow test executes the Connector's mock (integrations.md section 3).
auth_strategyConnectionAuthStrategyyes
authorized_atTimestamp or nullyes
base_urlConnectionBaseUrl or nullyes
connector_idConnectorId or nullyesThe Connector; null for an MCP server.
connector_majorinteger or nullyesThe major version of the Connector's manifest the Connection pins; null for an MCP server.
created_atTimestampyes
enabled_toolsarray of ConnectorToolNameyesThe Connector's tools the Organization allows, which set the scopes requested (integrations.md section 10); empty for an MCP server, whose registration's allowed_tools govern.
external_accountstring or nullyesThe external account authorized (a tenant id, an instance URL); null before.
granted_scopesarray of VendorScopeyesThe scopes the vendor granted at the last authorization; empty before.
idConnectionIdyes
mcp_server_idMcpServerId or nullyesThe MCP server registration whose credential the Connection holds; null for a Connector.
nameConnectionNameyes
object"connection"yes
organization_idOrganizationIdyes
originConnectionOriginyes
phi_attestationConnectionPhiAttestation or nullyesThe PHI attestation, or null; only an attested Connection may receive PHI.
requested_scopesarray of VendorScopeyesThe union of the scopes of enabled_tools; nothing more is requested.
revisionintegeryesCounts writes to the Connection; returned as the ETag and required in If-Match.
revoked_atTimestamp or nullyes
sandboxbooleanyesTrue for a vendor sandbox, which may allow test; a test Call never books a real appointment.
secret_hintstring or nullyesThe last characters of the stored key or token, or null; never the secret.
secret_versionintegeryesCounts the secrets stored; 0 before the first. A refresh write-back compares and sets it.
senderConnectionSender or nullyesThe sender of a messaging Connection; null otherwise.
statusConnectionStatusyes
status_reasonConnectionStatusReason or nullyesNull while active.
updated_atTimestampyes