API reference
API: Integrations
| Method | Path | What it does | Scope |
|---|---|---|---|
| DELETE | /v1/connections/:id | Disconnect: stops syncing and deletes the saved credentials. What was already synced stays, unless an owner passes delete_data=true: then everything that came only from this source is deleted in the background (web app only) | connections:write |
| PATCH | /v1/connections/:id | Change a connection's settings, or pause syncing (web app only) | connections:write |
| POST | /v1/connections/:id/account | File the account a marketing connection is for (one of the choices, or the field's value): the channel account the areas use. Nothing is read, sent or started (web app only) | connections:write |
| PUT | /v1/connections/:id/account | Change the account a marketing connection is for (one of the choices, or the field's value): the new one is filed and becomes the connection's account; each other account filed from it is removed when it has nothing yet, or set aside with its figures kept (nothing reads or changes it). Also while the connection is paused. Nothing is read, sent or started (web app only) | connections:write |
| GET | /v1/connections/:id/account-step | Which account a marketing connection is for: the choices read from the provider, or the field to fill in, and the accounts already filed from it (web app only) | connections:read |
| DELETE | /v1/connections/:id/accounts/:account_id | Remove an account filed from a marketing connection that has nothing yet (no figures, campaigns or other work); one that has is refused (account_has_history): change the connection's account instead. When it was the connection's account, the next one filed from it takes its place (web app only) | connections:write |
| GET | /v1/connections/:id/calendars | Calendars this account can see, and which ones sync (settings.calendars; none chosen means the primary calendar) (web app only) | connections:read |
| GET | /v1/connections/:id/grant | The person's other connections that share this connection's grant at the provider (several products of one provider on the same account), so a disconnect can say what removing all access would also stop. The connection's own person only (web app only) | connections:read |
| GET | /v1/connections/:id/runs | Recent sync runs with stats and errors | connections:read |
| PUT | /v1/connections/:id/secrets | Add or replace a connection's declared secrets (e.g. the webhook signing secret shown after setup; on OAuth connections only declared extras such as a webhook secret, never the sign-in tokens). Values are stored encrypted and never returned; empty values keep the current one. (web app only) | connections:write |
| POST | /v1/connections/:id/sync | Sync now (web app only) | connections:write |
| GET | /v1/integrations | Available integrations (and whether each is available) plus your organization's connections | connections:read |
| POST | /v1/integrations/:provider/connect | Start connecting an account. OAuth providers return a URL to send the browser to; API-key providers connect immediately. (web app only) | connections:write |
Examples
GET /v1/connections/$ID/runs
Recent sync runs with stats and errors
curl -s "https://api.chapelwren.com/v1/connections/$ID/runs" \
-H "Authorization: Bearer $CG_API_KEY"const res = await fetch(`https://api.chapelwren.com/v1/connections/${id}/runs`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
const data = await res.json();GET /v1/integrations
Available integrations (and whether each is available) plus your organization's connections
curl -s "https://api.chapelwren.com/v1/integrations" \
-H "Authorization: Bearer $CG_API_KEY"const res = await fetch(`https://api.chapelwren.com/v1/integrations`, {
method: "GET",
headers: { authorization: `Bearer ${process.env.CG_API_KEY}` },
});
const data = await res.json();Request and response schemas: https://www.chapelwren.com/openapi.json. All resources: API reference.