Skip to main content
POST
/
agents
/
{agentId}
/
connections
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

const attachedConnection = await client.connections.attach('agent_abc123', {
  connectionId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});

console.log(attachedConnection);
{
  "accountLabel": "<string>",
  "createdAt": "<string>",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "owner": {},
  "scopes": [
    "<string>"
  ],
  "updatedAt": "<string>",
  "attachedAt": "<string>",
  "metadata": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

agentId
string
required
Minimum string length: 1
Example:

"agent_abc123"

Body

application/json
connectionId
string<uuid>
required
metadata
object
{key}
any

Response

Connection attached.

accountLabel
string | null
required
createdAt
string
required
id
string<uuid>
required
owner
OrganizationConnectionOwner · object
required

Public owner for a reusable connection. Organization owners use the authenticated organization; fleet owners add a fleetId.

provider
enum<string>
required
Available options:
google,
github,
slack,
linear,
notion,
custom,
webhook
scopes
string[]
required
type
enum<string>
required
Available options:
oauth,
api_key
updatedAt
string
required
attachedAt
string
required
metadata
object