---
title: "Create Connection"
method: POST
path: "/api/v1/crm/connections"
tags: ["crm"]
---

# Create Connection

`POST /api/v1/crm/connections`

## Request

- Base URL: `https://app.goodleads.club` (the document declares no server; this is the origin it was published from)
- URL: `https://app.goodleads.club/api/v1/crm/connections`
- Auth: API key in header `X-API-Key`

Register a partner CRM connection.

Two shapes, chosen by `credential_kind`:
- **oauth** (Lawmatics): store the partner's app credentials and mint the
  `authorize_url` they click (while logged in to their CRM) to grant access;
  the callback endpoint below finishes the handshake.
- **api_key** (Instantly): store the partner's pasted scoped key (encrypted)
  and go straight to `connected` — no app to create, no callback. The
  partner's only action is pasting the key.

## Request body

- ConnectionCreateRequest
  - `label` string, required
  - `provider` string
  - `credential_kind` string
  - `client_id` string, nullable
  - `client_secret` string, nullable
  - `redirect_uri` string, nullable
  - `api_key` string, nullable
  - `campaign_id` string, nullable

## Response `201`

Successful Response

- ConnectionResponse
  - `connection_id` string, required
  - `provider` string, required
  - `label` string, required
  - `status` string, required
  - `credential_kind` string, required
  - `redirect_uri` string, nullable
  - `authorize_url` string, nullable
  - `connected_at` string, date-time, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/goodleads/apis/formation-gtm-api.md) · [All operations](https://skmtc.dev/goodleads/apis/formation-gtm-api/llms.txt) · [OpenAPI document](https://skmtc.dev/goodleads/apis/formation-gtm-api/revisions/2068d13a82cf?raw)
