Skip to main content
POST
/
connections
/
api-keys
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 connection = await client.connections.create({
  apiKey: 'sk_live_...',
  owner: { type: 'organization' },
  provider: 'custom',
});

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

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.

Body

application/json
owner
OrganizationConnectionOwner · object
required

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

provider
string
required

Credential provider to store an API key for.

Example:

"custom"

apiKey
string
required

API key secret. It is stored securely and is not returned.

Example:

"sk_live_..."

accountLabel
string

Optional human-readable account label.

Example:

"primary"

Response

Created reusable API-key connection.

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