Skip to main content
POST
Link Activity To Deal
Attaches an existing account-level activity to a deal via a validated RPC. The activity keeps its account_id, so it remains visible in the account timeline and now also appears in the deal timeline. If the activity’s account_id was unset, linking it to the deal backfills that column from the deal’s own account — a deal always belongs to one account, so the two links stay consistent. Linking to a deal is validated, not a raw column write: this endpoint goes through a SECURITY DEFINER RPC that enforces the checks below. Updating an activity’s deal_id routes through the same RPC; unlinking a deal does not — it’s always a plain column write.

Auth

Requires a CRM manage scope and an active organization on the token. Any *:manage scope qualifies — in practice contacts:manage, deals:manage, companies:manage, or activities:manage.

Response

Errors

Authorizations

Authorization
string
header
required

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

Path Parameters

activity_id
string
required

The account-level activity's id to attach to a deal.

Body

application/json
deal_id
string
required

Deal to attach the activity to.

Response

Successful Response