Skip to content
Connect an agent
Organisations

Create an organisation

Makes an organisation owned by the account.

POST/orgs

TL;DR

QuestionAnswer
What does it do?Create an organisation.
What does it take?A JSON body of type CreateOrganisationBody.
What does it return?Status 201 with a body of type Organisation.
What can go wrong?400 the body is not valid; 401 not signed in; 403 the account already owns the most organisations its plan allows (orgs.limit_reached), or the request came from an origin that may not make changes; 409 the slug is taken (orgs.slug_taken); 422 the name, or the slug, holds a word that is not allowed in a name (orgs.name_not_allowed); 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope.

What it does

Makes an organisation owned by the account. The slug is chosen here and never changes; left out, it is made from the name. The account owns as many as its plan allows: 403 orgs.limit_reached says the plan, the limit, and what is used. 409 orgs.slug_taken for a slug someone has.

Request body

The body has the type CreateOrganisationBody.

FieldTypeRequiredDescription
namestringyesWhat people read. 1 to 60 characters. It can be changed; the slug cannot. at least 1 character; pattern ^[^\p{Cc}]+$/u.
slugstringnoThe handle. Left out, it is made from the name, with a short suffix when that is taken. at least 3 characters; at most 40 characters; pattern ^[a-z0-9][a-z0-9-]*[a-z0-9]$.

Responses

StatusMeaningBody
201The organisation.Organisation
400The body is not valid.ErrorResponse
401Not signed in.ErrorResponse
403The account already owns the most organisations its plan allows (orgs.limit_reached), or the request came from an origin that may not make changes.ErrorResponse
409The slug is taken (orgs.slug_taken).ErrorResponse
422The name, or the slug, holds a word that is not allowed in a name (orgs.name_not_allowed).ErrorResponse
429Too many requests.ErrorResponse
503Organisations are not set up on this server.ErrorResponse

Response body

A 201 answer has the type Organisation.

FieldTypeRequiredDescription
idstringyes
slugstringyes
namestringyes
role"owner" | "admin" | "member" | "reader"yesWhat the caller is in this organisation.
createdAtintegeryesMilliseconds since the epoch.
memberCountintegeryesPeople who have joined, the owner included. The same number as usage.members. minimum 0.
plan"free" | "pro" | "enterprise"yesThe organisation's plan: enterprise under a contract, otherwise its owner's.
contractEndsOnstring | nullyesThe 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.
usageOrganisationUsageyes
usage.diagramsintegeryesminimum 0.
usage.bytesintegeryesminimum 0.
usage.membersintegeryesPeople who have joined, the owner included. minimum 0.
usage.invitesintegeryesInvitations that can still be accepted. They count toward the member limit. minimum 0.
limitsOrganisationLimitsyes
limits.dailyCallsintegeryes
limits.hostedDiagramsintegeryesDiagrams the organisation may hold.
limits.hostedBytesintegeryesTotal bytes of diagrams the organisation may hold.
limits.retentionDaysinteger | nullyesDays a diagram is kept after it was last published, or null to keep it until it is deleted.
limits.maxDiagramBytesintegeryes
limits.stableLinksintegeryesStable links the owner may keep for their own diagrams. An organisation's diagrams have none.
limits.organisationsintegeryesOrganisations an account on this plan may own.
limits.orgMembersintegeryesPeople one organisation may have, the owner included and pending invitations counted.
limits.orgIconsintegeryesCustom icons one organisation may keep; zero on a plan without custom icons. minimum 0.
limits.driftHistoryDaysintegeryesDays the drift dashboard keeps a run and a status after it was reported; zero on a plan without the dashboard. minimum 0.
limits.auditRetentionDaysintegeryesDays the organisation's audit log keeps an event; zero on a plan that records none. minimum 0.
avatarOrgAvataryesThe organisation's uploaded avatar, or null when it has none and a mark made from its id stands in.
avatar.versionstringyesChanges 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.animatedbooleanyesTrue when it moves, so a page can hold it still for a person who asked for less motion.
keepEditablebooleanyesThe 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.
publishingOrganisationPublishingyes
publishing.policy"personal" | "organisation-default" | "organisation-required"yesWhat 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"yesWhat is enforced now: the choice, except organisation-required on a plan that no longer includes it, which acts as organisation-default.
publishing.hideViewLinksbooleanyesWhether hosted answers leave view links out for members and the organisation's keys. Honoured only while effective is organisation-required.
publishing.requiredAvailablebooleanyesWhether the organisation's plan includes organisation-required (Pro and Enterprise).

See also

DocWhy
API referenceEvery endpoint, and the error envelope
SchemasEvery request and response type
Tool referenceThe operations as callable tools