Skip to content

All resources

organizations

26 endpoints

get /invites/{token}

Get public invite info by token

No authentication

Public endpoint returning the invite's role, expiry, and org name. Deliberately omits the invitee email.

Parameters

NameInTypeRequiredDescription
tokenpathstringyesInvite token

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

delete /invites/{token}

Decline an invite by token

No authentication

Public invitee-side reject. Possession of the plaintext token is the proof.

Parameters

NameInTypeRequiredDescription
tokenpathstringyesInvite token

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

post /invites/{token}/accept

Accept an invite by token

Requires authentication

Authenticated accept via the URL-supplied plaintext token.

Parameters

NameInTypeRequiredDescription
tokenpathstringyesInvite token

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope

delete /invites/by-id/{id}

Decline a pending invite by id

Requires authentication

Authenticated decline for the /invites/pending list. The server matches the invite's email to the caller's.

Parameters

NameInTypeRequiredDescription
idpathintegeryesInvite id

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope

post /invites/by-id/{id}/accept

Accept a pending invite by id

Requires authentication

Authenticated accept for the /invites/pending list. The server matches the invite's email to the caller's.

Parameters

NameInTypeRequiredDescription
idpathintegeryesInvite id

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope

get /invites/pending

List the caller's pending invites

Requires authentication

Returns pending invitations addressed to the authenticated user's email.

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope

get /orgs

List the caller's organizations

Requires authentication

Returns every organization the caller belongs to, each with its member count.

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope

post /orgs

Create an organization

Requires authentication

Creates a new organization owned by the caller. A user may create at most 5 organizations in any 24 hours; the sixth is refused with 429 ORG_CREATE_LIMIT.

Request body: dto.CreateOrgRequest

NameTypeRequiredDescription
namestringyes

Responses

  • 201 Created · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 429 Too Many Requests · apimodel.ErrorEnvelope

get /orgs/{id}

Get an organization by id

Requires authentication

Returns the organization detail plus its live member count.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

patch /orgs/{id}

Update an organization

Requires authentication

Updates an organization's mutable fields and returns the trimmed summary.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Request body: dto.UpdateOrgRequest

NameTypeRequiredDescription
aiEnabledbooleannoAIEnabled is a pointer so nil means "leave unchanged": a client that only renames the org must not switch AI off by omitting the field.
avatarUrlstringno
namestringno

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope

get /orgs/{id}/audit-log

Get an organization's audit log

Requires authentication

Returns recent audit events, most-recent first. Owner/admin only. Offset-paginated (bounded admin list).

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id
limitqueryintegernoPage size (default 50)
offsetqueryintegernoRow offset (default 0)

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

post /orgs/{id}/delete

Delete an organization

Requires authentication

Owners only. Needs the organization's name typed and a re-authentication (the current password, or the code from POST /orgs/{id}/deletion-code). Every subscription that has not ended is cancelled at Stripe first; if Stripe does not confirm, nothing is deleted (502 BILLING_CANCEL_FAILED). Then the organization is deleted and every member, pending invite and organization API key loses access at once. Its data is purged after 30 days; billing and time records are kept for the statutory period. nextOrgId is where the caller continues: another of their organizations, or a new empty workspace (newWorkspace) when this was their last. A wrong password or code is 403 REAUTH_FAILED. Irreversible.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Request body: dto.DeleteOrgRequest

NameTypeRequiredDescription
codestringnoCode is required when it has none.
confirmNamestringnoConfirmName is the organization's name, typed by the owner.
passwordstringnoPassword is required when the account has one.

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope
  • 429 Too Many Requests · apimodel.ErrorEnvelope
  • 502 Bad Gateway · apimodel.ErrorEnvelope

get /orgs/{id}/deletion-check

What deleting an organization will do

Requires authentication

Whether the caller may delete the organization (owners only), how they confirm it (password or a mailed code), how many other people lose access, whether a subscription is cancelled first and whether accounting records are kept. Read-only.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

post /orgs/{id}/deletion-code

Mail a code that confirms deleting an organization

Requires authentication

For an owner whose account has no password: mails a 6-digit code (10 minutes, 5 attempts) that confirms POST /orgs/{id}/delete. 400 for an account with a password. Rate-limited per user.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope
  • 429 Too Many Requests · apimodel.ErrorEnvelope

get /orgs/{id}/get-started

State of the first-run Get started card

Requires authentication

Whether the dashboard shows its Get started card to the caller, and how far its three steps are. Visible is false for anyone who is not an owner or admin of the organization, for an organization that never had the card, and once the card was hidden or finished. Finishing the last step hides the card for good.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

post /orgs/{id}/get-started/hide

Hide the first-run Get started card

Requires authentication

Hides the Get started card for the whole organization. Owner/admin only. Idempotent.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope
  • 404 Not Found · apimodel.ErrorEnvelope

post /orgs/{id}/invite

Invite a member to an organization

Requires authentication

Invites a single email to the org. Admin/owner only. The plaintext token is returned only in test mode.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Request body: dto.InviteMemberRequest

NameTypeRequiredDescription
emailstringyes
projectsdto.ProjectGrantInput[]noProjects the invitee joins on redemption. Empty is legitimate: an admin reaches every project without a grant, and a member invited with no projects simply has nothing to open yet.
rolestring (admin | member | guest)no

Responses

  • 201 Created · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

get /orgs/{id}/invites

List an organization's sent invites

Requires authentication

Returns pending invitations sent by the organization. Admin/owner only.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

delete /orgs/{id}/invites/{inviteId}

Cancel a pending invitation

Requires authentication

Cancels a pending invitation. Admin/owner only.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id
inviteIdpathintegeryesInvite id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

post /orgs/{id}/invites/{inviteId}/resend

Resend an invitation email

Requires authentication

Re-sends the invitation email for a pending invite. Admin/owner only.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id
inviteIdpathintegeryesInvite id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

post /orgs/{id}/invites/bulk

Bulk-invite members

Requires authentication

Invites many emails in one call and returns a per-email success/failure list.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Request body: dto.BulkInviteRequest

NameTypeRequiredDescription
emailsstring[]yes
rolestring (admin | member | guest)no

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope

get /orgs/{id}/members

List an organization's members

Requires authentication

Returns the org member roster. Admin/owner only.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

delete /orgs/{id}/members/{memberId}

Remove a member from an organization

Requires authentication

Removes a user from the org (cascades to project memberships). Admin/owner only.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id
memberIdpathintegeryesMember id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

patch /orgs/{id}/members/{memberId}/role

Update a member's role

Requires authentication

Owner-only. Rejects role=owner (use transfer-ownership) and self-targeting.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id
memberIdpathintegeryesMember id

Request body: dto.UpdateMemberRoleRequest

NameTypeRequiredDescription
rolestring (owner | admin | member | guest)yes

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope

delete /orgs/{id}/members/me

Leave an organization

Requires authentication

Removes the caller from the org. Refused if the caller is the sole owner.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Responses

  • 200 OK · object
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 409 Conflict · apimodel.ErrorEnvelope

post /orgs/{id}/transfer-ownership

Transfer organization ownership

Requires authentication

Owner-only atomic owner swap.

Parameters

NameInTypeRequiredDescription
idpathintegeryesOrganization id

Request body: dto.TransferOwnershipRequest

NameTypeRequiredDescription
newOwnerUserIdintegeryes

Responses

  • 200 OK · object
  • 400 Bad Request · apimodel.ErrorEnvelope
  • 401 Unauthorized · apimodel.ErrorEnvelope
  • 403 Forbidden · apimodel.ErrorEnvelope