Skip to content

API reference

API: Organization

Markdown version

MethodPathWhat it doesScope
GET/v1/first-runYour first-run checklist: mailbox connected, accounts and contacts filling in (live counts), first agent runsettings:read
GET/v1/invitationsList pending invitations (owner)members:write
POST/v1/invitationsInvite someone by email (owner, web only) (web app only)members:write
DELETE/v1/invitations/:idCancel a pending invitation (owner, web only) (web app only)members:write
POST/v1/invitations/:id/resendResend a pending invitation (owner, web only) (web app only)members:write
GET/v1/membersList members and their rolesmembers:read
DELETE/v1/members/:idRemove a member and revoke their API keys and app connections (owner)members:write
PATCH/v1/members/:idChange a member's role (owner)members:write
GET/v1/members/formerPeople who still own records here but are no longer members (to reassign their work)members:read
DELETE/v1/organizationSchedule the organization's deletion: it's suspended at once and, unless an owner undoes it within 30 days, purged with all its data, including audit history (owner, web only, the exact name to confirm) (web app only)security:write
GET/v1/organizationGet the active organizationsettings:read
PATCH/v1/organizationRename the organization (owner)security:write
POST/v1/organization/acquisitionRecord how this organization found us (first answer kept; owners). Only the referrer's host name is storedsettings:read
GET/v1/organization/deletionWhether the organization is scheduled for deletion, and when it will be purged (answers while it's suspended) (web app only)—
POST/v1/organization/deletion/cancelUndo the organization's scheduled deletion before its window ends (owner, web only) (web app only)security:write
GET/v1/organization/exportsYour exports of this organization (owner; each holds what its requester could read, so it's theirs alone)security:write
POST/v1/organization/exportsExport everything this organization holds (every table, as gzipped JSON lines, secrets left out); ready to download for 7 days (owner) (web app only)security:write

Examples

GET /v1/first-run

Your first-run checklist: mailbox connected, accounts and contacts filling in (live counts), first agent run

curl -s "https://api.closefinch.com/v1/first-run" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/first-run`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

GET /v1/invitations

List pending invitations (owner)

curl -s "https://api.closefinch.com/v1/invitations" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/invitations`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

GET /v1/members

List members and their roles

curl -s "https://api.closefinch.com/v1/members" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/members`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

DELETE /v1/members/$ID

Remove a member and revoke their API keys and app connections (owner)

curl -s -X DELETE "https://api.closefinch.com/v1/members/$ID" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/members/${id}`, {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

PATCH /v1/members/$ID

Change a member's role (owner)

curl -s -X PATCH "https://api.closefinch.com/v1/members/$ID" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/members/${id}`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/members/former

People who still own records here but are no longer members (to reassign their work)

curl -s "https://api.closefinch.com/v1/members/former" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/members/former`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

GET /v1/organization

Get the active organization

curl -s "https://api.closefinch.com/v1/organization" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/organization`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

PATCH /v1/organization

Rename the organization (owner)

curl -s -X PATCH "https://api.closefinch.com/v1/organization" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/organization`, {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

POST /v1/organization/acquisition

Record how this organization found us (first answer kept; owners). Only the referrer's host name is stored

curl -s -X POST "https://api.closefinch.com/v1/organization/acquisition" \
  -H "Authorization: Bearer $RA_API_KEY" \
  -H "content-type: application/json" \
  -d '{}'
const res = await fetch(`https://api.closefinch.com/v1/organization/acquisition`, {
  method: "POST",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({}), // fields: see the OpenAPI schema
});
const data = await res.json();

GET /v1/organization/exports

Your exports of this organization (owner; each holds what its requester could read, so it's theirs alone)

curl -s "https://api.closefinch.com/v1/organization/exports" \
  -H "Authorization: Bearer $RA_API_KEY"
const res = await fetch(`https://api.closefinch.com/v1/organization/exports`, {
  method: "GET",
  headers: { authorization: `Bearer ${process.env.RA_API_KEY}` },
});
const data = await res.json();

Request and response schemas: https://www.closefinch.com/openapi.json. All resources: API reference.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.

Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.