Create workspace API keys and webhooks
On this page
Create scoped API keys, call the CRM API with them, add signed webhooks, and test, pause, rotate or revoke them in Settings › Integrations.
API keys let your own software read and write the workspace's CRM data. Webhooks send a signed POST to your URL when something changes, such as a new lead or a deal moving stage. Both belong to one workspace only, and only a person can create or revoke them: a key can never manage other keys.
Before you start #
- You are a tenant administrator of the workspace, or the Integrations settings area is delegated to you. Otherwise you see "Only people who manage Integrations can see API keys." Ask a workspace admin for access.
Step by step #
- 1Open IntegrationsIn the Client Craft section, open Settings › Integrations. Below Connected apps you find the API keys and Webhooks cards.
- 2Create a keySelect Create API key. Enter a Name (up to 80 characters, such as the app that uses it), tick only the Scopes the app needs, choose Expires (Never, In 30 days, In 90 days or In 1 year) and select Create key. A workspace can hold up to 25 keys.
Scope Allows contacts:readRead contacts companies:readRead companies leads:readRead leads leads:writeCreate leads (POST to the leads collection only) deals:readRead deals Access is denied by default. Bulk, export, import, merge, attachment, file and settings routes are refused for every key, whatever its scopes.
- 3Copy the key onceThe dialog says Shown once. Only a fingerprint is stored, so the value can't be shown again. Select Copy, store the key in your secret manager, then I've copied it. Keys start with
cc_live_; the list shows only a masked key. - 4Call the APISend the workspace id in
X-Tenantand the key inX-Integration-Key. A workspace key is a machine credential: it never acts as a person, so don't sendX-User.1# List the first page of leads (needs leads:read). Keep the key on the server.2curl "https://api.client-craft.com/api/v1/crm/leads?page=1&pageSize=20" \3 -H "X-Tenant: <workspace-id>" \4 -H "X-Integration-Key: $CLIENTCRAFT_API_KEY"Refusals are explicit:
api_key_scope_denied(missing scope, or the route isn't open to keys),api_key_workspace_mismatch(X-Tenantnames another workspace) andapi_key_cannot_act_as_user(a person header was sent). An expired key returns 401. - 5Confirm the key worksAfter the first call, reload Settings › Integrations. Last used is updated at most every five minutes per key. Creating and revoking keys is written to the Audit log.
- 6Rotate or revoke a keyKeys are never edited in place. To rotate, create a new key with the same scopes, deploy it, check that its Last used moves, then select Revoke on the old row and confirm with Revoke key. Apps using the revoked key stop working at once; this can't be undone.
- 7Add a webhookIn Webhooks, select Add webhook. Enter a Name and an Endpoint URL that starts with
https://and accepts POST requests. Under Events, tick the events you want, or leave all unticked to receive every event. Select Add webhook.The Signing secret (it starts with
ucrm_whsec_) is shown once. Copy it now; you need it to verify theX-uCRM-Signatureheader. See Receive and verify CRM webhook events. - 8Test and manage the endpointSelect Details on the webhook row:
- Send test event posts a signed test event and reports the status code and time. No records change.
- Pause and Resume stop or restart new deliveries.
- Roll secret issues a new signing secret.
- Delete stops all deliveries; past deliveries stay in the history.
The Delivery log lists recent events with the response and the number of attempts. The status is Active, Failing or Paused.
code in the response body before you create a broader key. A 401 with Missing integration key. means the header never reached the API, often because a proxy removed it.