API referenceConnections

Update a connection

PATCH
/connections/{id}

Send only the fields to change. New credentials replace the stored ones, and an empty credentials object removes them. Moment types apply to the calls that start from then on.

Authorization

apiKey
X-API-Key<token>

API key (prefix spk_test_ or spk_live_) or personal access token (prefix pat_)

In: header

Path Parameters

id*string

Connection ID

Header Parameters

Idempotency-Key*string

Idempotency key that prevents processing a request twice. Use a unique UUID v4 per request.

Lengthlength <= 255

Request Body

application/json

credentials?

The vendor's credentials, replacing the stored ones; an empty object removes them, and for a webhook connection its signing secret, so its requests need no signature

mode?string

Webhook connections only: what each request carries from now on

Value in

  • "transcript"
  • "turns"
moment_types?array<string>

The moment types the conversations it creates from now on detect; empty detects every type

name?string

A label for the connection

Lengthlength <= 100
status?string

active takes calls; disabled answers the vendor and drops them

Value in

  • "active"
  • "disabled"
  • "disconnected"

Response Body

application/json

application/json

curl -X PATCH "https://example.com/connections/con_2jxsy8cc8v0348asy6t1" \  -H "Idempotency-Key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "created_at": "2019-08-24T14:15:22Z",  "environment": "test",  "has_credentials": true,  "id": "con_2jxsy8cc8v0348asy6t1",  "last_error_code": "plan_limit",  "last_event_at": "2019-08-24T14:15:22Z",  "mode": "transcript",  "moment_types": [    "string"  ],  "name": "string",  "organization_id": "string",  "status": "active",  "tenant_id": "string",  "updated_at": "2019-08-24T14:15:22Z",  "vendor": "recall"}