SDK reference

Integrations and webhooks

Each route's function in the SDK, its call beside the same request in cURL.
orgIntegrationsSources

GET/v1/orgs/:orgId/integrations/sources

The import sources, for Tasks (Jira, Linear, GitHub, GitLab, Zendesk) and Customers (Stripe, HubSpot, Salesforce): whether each is connected and as which account, whether it takes a token or a sign-in (and whether that's set up here), with what connecting one needs. Tokens are never returned.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/sources' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
putOrgIntegrationsSourcesByProvider

PUT/v1/orgs/:orgId/integrations/sources/:provider

Connects an import source with a token: Jira and Zendesk also take their site (<name>.atlassian.net, <name>.zendesk.com) and the account's email, GitLab its host (empty for gitlab.com); Stripe takes a restricted key only. The token is checked with the provider and sealed; it replaces an earlier one. Salesforce connects through POST …/integrations/salesforce/authorize instead. Owners and admins.

Parameters and answers
curl -X PUT 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/sources/{provider}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "token": "example"
  }'
deleteOrgIntegrationsSourcesByProvider

DELETE/v1/orgs/:orgId/integrations/sources/:provider

Forgets an import source's token (Salesforce's sign-in is revoked there first); imports still running stop at their next step. Owners and admins.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/sources/{provider}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrationsSourcesProjects

GET/v1/orgs/:orgId/integrations/sources/:provider/projects

What a Tasks source's token reads, to import from: Jira projects, Linear teams, GitHub repositories with issues, GitLab projects, Zendesk groups (and all; 200 at most), each with the id an import names. Owners and admins.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/sources/{provider}/projects' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrationsImports

GET/v1/orgs/:orgId/integrations/imports

Imports into Tasks, newest first (space: one space's, by key or id), with their counts, last problems and status.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrationsImportsByImportId

GET/v1/orgs/:orgId/integrations/imports/:importId

One import into Tasks: its source project, space, options, status, counts and problems.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/imports/{importId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgIntegrationsImports

POST/v1/orgs/:orgId/integrations/imports

Starts importing a source project's issues (and, by default, closed ones and comments) into a space you administer, run in the background as you. Imported issues link back and are skipped when imported again. Owners and admins with issues:write; three running at once.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "provider": "jira",
    "project": "example",
    "space": "example"
  }'
postOrgIntegrationsImportsCancel

POST/v1/orgs/:orgId/integrations/imports/:importId/cancel

Stops an import after its current page; what it imported stays. Owners and admins.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/imports/{importId}/cancel' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrations

GET/v1/orgs/:orgId/integrations

The catalogue, the org's connections and the events a channel can carry.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrationsByProvider

GET/v1/orgs/:orgId/integrations/:provider

One chat connection (slack or teams): whether it's connected, to which workspace or Microsoft organisation, and its settings. Tokens are never returned.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgIntegrationsAuthorize

POST/v1/orgs/:orgId/integrations/:provider/authorize

Starts connecting: the provider's sign-in URL (one-time state, 10 minutes).

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/authorize' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "returnTo": "example"
  }'
orgIntegrationsChannels

GET/v1/orgs/:orgId/integrations/:provider/channels

Channels the org can send notices to.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/channels' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
patchOrgIntegrationsByProvider

PATCH/v1/orgs/:orgId/integrations/:provider

Changes a chat connection's settings: the notice channel (one the channels list offers), which org-wide events go there, and whether Caity answers and links preview. Owners and admins.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "channelId": "<channelId>",
    "events": [
      "deployment.failed"
    ],
    "ask": true
  }'
deleteOrgIntegrationsByProvider

DELETE/v1/orgs/:orgId/integrations/:provider

Disconnects: revokes at the provider (best effort) and forgets the tokens, links and channels.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgIntegrationsPeople

GET/v1/orgs/:orgId/integrations/:provider/people

The org's people linked in the workspace (Caity answers and links unfurl as them).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/people' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteOrgIntegrationsPeopleByExternalUserId

DELETE/v1/orgs/:orgId/integrations/:provider/people/:externalUserId

Unlinks a chat account from its person: Caity stops answering it as them and its links stop previewing. Owners and admins.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/people/{externalUserId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgWebhooks

GET/v1/orgs/:orgId/webhooks

The organisation's outgoing webhooks: name, URL, events, on or off, and the secret's last four characters.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgWebhooks

POST/v1/orgs/:orgId/webhooks

Adds a webhook: an https URL and the events it wants (audit actions such as member.join, categories such as member.*, or *). The signing secret is in this answer only. Owners and admins.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example",
    "url": "https://example.com",
    "events": [
      "example"
    ],
    "enabled": true
  }'
patchOrgWebhooksByWebhookId

PATCH/v1/orgs/:orgId/webhooks/:webhookId

Changes a webhook's name, URL, events or whether it's on. Owners and admins.

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks/{webhookId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": {},
    "url": {},
    "events": {}
  }'
postOrgWebhooksRotate

POST/v1/orgs/:orgId/webhooks/:webhookId/rotate

A new secret, shown once; the old one stops signing.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks/{webhookId}/rotate' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgWebhooksPing

POST/v1/orgs/:orgId/webhooks/:webhookId/ping

Sends a ping now, signed like every delivery.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks/{webhookId}/ping' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgWebhooksDeliveries

GET/v1/orgs/:orgId/webhooks/:webhookId/deliveries

A webhook's last 50 deliveries (30 days): event, status or error, try and time.

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks/{webhookId}/deliveries' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
deleteOrgWebhooksByWebhookId

DELETE/v1/orgs/:orgId/webhooks/:webhookId

Removes a webhook; its deliveries stop. Owners and admins.

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/webhooks/{webhookId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postIntegrationsOauth

POST/v1/integrations/oauth

Finishes connecting Slack, Teams or Salesforce with the provider's code (or error) and the state the connect started with. The state is used once, by the person who started it, still an owner or admin.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/integrations/oauth' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "state": "example"
  }'
orgCrmSourceImports

GET/v1/orgs/:orgId/crm/source-imports

Imports into Customers from Stripe, HubSpot and Salesforce, newest first: the source account, objects, status, counts (seen, created, updated since an earlier import, linked to a match, skipped, failed) and last problems. Customers admins (crm:admin).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/crm/source-imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
orgCrmSourceImportsByImportId

GET/v1/orgs/:orgId/crm/source-imports/:importId

One import into Customers, as the list gives it. Customers admins (crm:admin).

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/crm/source-imports/{importId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
postOrgCrmSourceImports

POST/v1/orgs/:orgId/crm/source-imports

Starts importing a connected source into Customers, run in the background as you: provider (stripe, hubspot, salesforce) and, optionally, which of its objects (taken in the source's order: accounts before the contacts and deals on them). Records link back; matches already here (accounts by name, contacts and leads by email) are linked, not copied; importing again changes a field only where the source changed it and nobody here did. Owners and admins with crm:write; three imports run at once.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/crm/source-imports' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "provider": "stripe"
  }'
postOrgCrmSourceImportsCancel

POST/v1/orgs/:orgId/crm/source-imports/:importId/cancel

Stops an import into Customers after its current page; what it imported stays. Owners and admins with crm:write.

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/crm/source-imports/{importId}/cancel' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
chatMirrorsMirrorsList

GET/v1/orgs/:orgId/integrations/:provider/mirrors

List Mirage mirrors

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/mirrors' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
chatMirrorsOptionsList

GET/v1/orgs/:orgId/integrations/:provider/mirrors/options

Where a Mirage mirror can start

Parameters and answers
curl 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/mirrors/options' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"
chatMirrorsMirrorsCreate

POST/v1/orgs/:orgId/integrations/:provider/mirrors

Mirror a Mirage channel

Parameters and answers
curl -X POST 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/mirrors' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "serverId": "<serverId>",
    "channelId": "<channelId>",
    "externalChannelId": "<externalChannelId>"
  }'
chatMirrorsMirrorsUpdate

PATCH/v1/orgs/:orgId/integrations/:provider/mirrors/:serverId/:channelId

Change a Mirage mirror

Parameters and answers
curl -X PATCH 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/mirrors/{serverId}/{channelId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
    "direction": "both"
  }'
chatMirrorsMirrorsDelete

DELETE/v1/orgs/:orgId/integrations/:provider/mirrors/:serverId/:channelId

Stop a Mirage mirror

Parameters and answers
curl -X DELETE 'https://api.cactive.com.au/v1/orgs/{orgId}/integrations/{provider}/mirrors/{serverId}/{channelId}' \
  -H "Authorization: Bearer $CACTIVE_TOKEN"