Organisations
Accept an invitation
Joins the organisation the token was made for.
POST
/orgs/invites/acceptTL;DR
| Question | Answer |
|---|---|
| What does it do? | Accept an invitation. |
| What does it take? | A JSON body of type AcceptInviteBody. |
| What does it return? | Status 200 with a body of type Organisation. |
| What can go wrong? | 400 the body is not valid; 401 not signed in; 403 the invitation was sent to another address (orgs.invite_wrong_account), the organisation is full (orgs.member_limit_reached), or the request came from an origin that may not make changes; 404 the token is unknown, used, or expired (orgs.invite_invalid); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Joins the organisation the token was made for. The signed-in account's address must equal the invited one (403 orgs.invite_wrong_account, which names the invited address). An unknown, used, or expired token is 404 orgs.invite_invalid, with one message for all three. 403 orgs.member_limit_reached if the organisation has filled since.
Request body
The body has the type AcceptInviteBody.
| Field | Type | Required | Description |
|---|---|---|---|
token | string | yes | The token in the invitation link. at least 1 character; at most 200 characters. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The organisation, as its new member sees it. | Organisation |
| 400 | The body is not valid. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | The invitation was sent to another address (orgs.invite_wrong_account), the organisation is full (orgs.member_limit_reached), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | The token is unknown, used, or expired (orgs.invite_invalid). | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type Organisation.
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
slug | string | yes | |
name | string | yes | |
role | "owner" | "admin" | "member" | "reader" | yes | What the caller is in this organisation. |
createdAt | integer | yes | Milliseconds since the epoch. |
memberCount | integer | yes | People who have joined, the owner included. The same number as usage.members. minimum 0. |
plan | "free" | "pro" | "enterprise" | yes | The organisation's plan: enterprise under a contract, otherwise its owner's. |
contractEndsOn | string | null | yes | The last day of the Enterprise contract, YYYY-MM-DD, or null when there is none or it has no end date written. The terms of a contract are not shown to members. |
usage | OrganisationUsage | yes | |
usage.diagrams | integer | yes | minimum 0. |
usage.bytes | integer | yes | minimum 0. |
usage.members | integer | yes | People who have joined, the owner included. minimum 0. |
usage.invites | integer | yes | Invitations that can still be accepted. They count toward the member limit. minimum 0. |
limits | OrganisationLimits | yes | |
limits.dailyCalls | integer | yes | |
limits.hostedDiagrams | integer | yes | Diagrams the organisation may hold. |
limits.hostedBytes | integer | yes | Total bytes of diagrams the organisation may hold. |
limits.retentionDays | integer | null | yes | Days a diagram is kept after it was last published, or null to keep it until it is deleted. |
limits.maxDiagramBytes | integer | yes | |
limits.stableLinks | integer | yes | Stable links the owner may keep for their own diagrams. An organisation's diagrams have none. |
limits.organisations | integer | yes | Organisations an account on this plan may own. |
limits.orgMembers | integer | yes | People one organisation may have, the owner included and pending invitations counted. |
limits.orgIcons | integer | yes | Custom icons one organisation may keep; zero on a plan without custom icons. minimum 0. |
limits.driftHistoryDays | integer | yes | Days the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0. |
limits.auditRetentionDays | integer | yes | Days the organisation's audit log keeps an event; zero on a plan that records none. minimum 0. |
limits.boards | integer | yes | Live whiteboards the organisation may keep; zero on a plan without them. minimum 0. |
limits.boardTabs | integer | yes | Tabs one whiteboard may have. minimum 0. |
limits.boardParticipants | integer | yes | People on one whiteboard at once. minimum 0. |
limits.boardHistoryDays | integer | yes | Days a whiteboard keeps the history of its changes. minimum 0. |
limits.boardSessionMinutes | integer | yes | Minutes one live connection to a whiteboard lasts before it asks whether the person is still there. minimum 0. |
limits.boardIdleMinutes | integer | yes | Minutes with no input before a whiteboard pauses its live connection. minimum 0. |
limits.boardDailyAwakeMinutes | integer | yes | Minutes the organisation's whiteboards may be live in one UTC day. minimum 0. |
limits.boardRevisions | integer | yes | Open revisions one tab of a whiteboard may have. minimum 0. |
avatar | OrgAvatar | yes | The organisation's uploaded avatar, or null when it has none and a mark made from its id stands in. |
avatar.version | string | yes | Changes with every upload. Put it in the address (?v=) so a new picture is a new address. |
avatar.contentType | "image/svg+xml" | "image/png" | "image/gif" | "image/webp" | yes | |
avatar.animated | boolean | yes | True when it moves, so a page can hold it still for a person who asked for less motion. |
keepEditable | boolean | yes | The owner's setting "Keep diagrams editable": true when a publish to the organisation that does not send embedSource writes the diagram source into the picture, so members can edit it in the portal later. Every member can open such a picture and read its source. |
publishing | OrganisationPublishing | yes | |
publishing.policy | "personal" | "organisation-default" | "organisation-required" | yes | What the owner or an admin chose: personal (members publish where they choose), organisation-default (a member's publish that names no organisation goes to this library), or organisation-required (nothing a member publishes reaches a public link). |
publishing.effective | "personal" | "organisation-default" | "organisation-required" | yes | What is enforced now: the choice, except organisation-required on a plan that no longer includes it, which acts as organisation-default. |
publishing.hideViewLinks | boolean | yes | Whether hosted answers leave view links out for members and the organisation's keys. Honoured only while effective is organisation-required. |
publishing.requiredAvailable | boolean | yes | Whether the organisation's plan includes organisation-required (Pro and Enterprise). |
sharing | OrganisationSharing | yes | |
sharing.publicSharing | boolean | yes | "Allow public sharing of individual diagrams": while true, the owner and admins may share any diagram, and a member a diagram they published, at a public link. Off by default. Turning it off ends every link. |
sharing.sharedCount | integer | yes | How many of the organisation's diagrams have a public link now. Counted against the plan's stableLinks. minimum 0. |
sharing.autoPublish | boolean | yes | "Agents publish every diagram they draw": while true, every valid drawing made through one of the organisation's agent connections or keys is stored in its private library with its source. Off by default. |
sharing.embedLinks | boolean | yes | "Allow diagrams on chosen websites" (Enterprise): while true, a diagram may have embed links that show it only on the websites they name. Off by default. Turning it off ends every embed link. |
sharing.embedLinkCount | integer | yes | How many embed links the organisation has now. minimum 0. |
governance | OrganisationGovernance | yes | |
governance.available | boolean | yes | Whether the organisation's plan includes the policies (Enterprise). A choice saved before is kept, and is not applied without it. |
governance.retention | OrganisationRetention | yes | |
governance.retention.libraryDays | 90 | yes | "Delete library diagrams not updated for": 90, 180, 365 or 730 days, or null for never (the default). |
governance.retention.auditDays | 365 | yes | "Keep the audit log for": 365, 730 or 2555 days (one, two or seven years), or null for the plan's days (the default). It only lengthens. |
governance.retention.planLibraryDays | integer | null | yes | How long the plan keeps a diagram after its last publish, or null for until it is deleted. The plan's limit wins when it is shorter. |
governance.retention.planAuditDays | integer | yes | How many days the plan keeps an audit event. |
governance.retention.effectiveLibraryDays | integer | null | yes | What is applied: the shorter of planLibraryDays and libraryDays. Null when diagrams are kept until they are deleted. |
governance.retention.effectiveAuditDays | integer | yes | What is applied: the longer of planAuditDays and auditDays, auditDays counted up to auditMaxDays. |
governance.retention.auditMaxDays | integer | yes | The longest auditDays this server takes: 730 unless its database is on D1's paid tier, then 2555. Every organisation shares one database. |
governance.legalHold | object | null | yes | The legal hold, or null when it is off. While it is on nothing of the organisation is deleted: no sweep, no member, and not the organisation itself. |
governance.legalHold.since | integer | yes | When the owner turned it on, in milliseconds since the epoch. |
governance.legalHold.reason | string | null | yes | The reason the owner typed. Shown to the owner and admins; null for anyone else. |
governance.patternsOnly | boolean | yes | "Agents start from approved patterns": find_pattern, called through the organisation's connections and keys, answers with its own patterns only. |
governance.styleRulesStrict | boolean | yes | "Style rules are errors": a publish to the library that breaks a saved style rule is refused with the findings. |
classification | OrganisationClassificationSummary | yes | |
classification.default | Classification | yes | A diagram's classification label: public, internal (the default, and what a diagram published before labels reads as) or confidential. Confidential is never shared publicly; under "Share only diagrams labelled Public" only public is. |
classification.sharePublicOnly | boolean | yes | "Share only diagrams labelled Public": while true, only a diagram labelled public may have a public link. The owner's setting. |
approval | OrganisationApprovalSummary | yes | |
approval.publish | "off" | "folders" | "all" | yes | "Publishing needs approval": off, folders (the chosen folders and every folder inside them) or all. |
approval.share | boolean | yes | "Public sharing needs approval". |
approval.approver | boolean | yes | True when the caller decides requests: the owner, an admin, or a member chosen as an approver. |
approval.pending | integer | null | yes | How many requests wait for a decision, for an approver; null for anyone else. minimum 0. |
agents | OrganisationAgents | yes | |
agents.approvedOnly | boolean | yes | "Only approved agents can connect": while true, an agent connects to the organisation only when it is on the approved list. |
agents.approved | string[] | yes | The approved agents by label, such as "Claude Code". Empty while approvedOnly is false. What identifies each is on GET /orgs/{org}/policies/agents, for the owner and admins. |
agents.orgOnly | boolean | yes | "Agents connect to this organisation", as applied: a member on a verified domain connects agents to the organisation, not to their own account. False on a plan without single sign-on. |
logAccess | boolean | yes | Whether the caller may read the audit log and the call history: the owner and admins, or a role or person the owner let in (PUT /orgs/{org}/log-access). |
boardsEnabled | boolean | yes | Whether live whiteboards are on for the organisation: its plan has them and Plotwork turned them on. The Boards section shows only then. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |