Skip to content
Docs menu

orgs

Organizations and membership (CRUD-lite)

7 operations · 9 schemas

GET /v1/orgs

List my organizations

listMyOrgs · scope key:read

Orgs the caller belongs to, with their role in each.

Parameters

listMyOrgs parameters
NameInTypeDescription
limitqueryinteger

default 20 · ≥ 1 · ≤ 100

Page size.

cursorquerystring

length ≤ 512

Opaque cursor from the previous page's next_cursor.

Responses

listMyOrgs responses
StatusDescriptionBody
200

Page of org memberships.

OrgMembershipPage
401

Missing or invalid credentials.

Problemapplication/problem+json

POST /v1/orgs

Create an organization

createOrg · scope key:write

Creates an org with the caller as owner member. Org slugs and usernames share one handle namespace.

Request body

application/json · required · OrgCreate

createOrg request body
FieldTypeDescription
slugrequiredSlug
display_namestring | null

length ≤ 128

descriptionstring | null

length ≤ 4096

Responses

createOrg responses
StatusDescriptionBody
201

Org created.

Org
401

Missing or invalid credentials.

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

GET /v1/orgs/{org}

Get an organization

getOrg · scope none

Public org profile.

Parameters

getOrg parameters
NameInTypeDescription
orgrequiredpathSlug

Org slug.

Responses

getOrg responses
StatusDescriptionBody
200

The org.

Org
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

PATCH /v1/orgs/{org}

Update an organization

updateOrg · scope key:write

Only members with role owner may update.

Parameters

updateOrg parameters
NameInTypeDescription
orgrequiredpathSlug

Org slug.

Request body

application/json · required · OrgUpdate

updateOrg request body
FieldTypeDescription
display_namestring | null

length ≤ 128

descriptionstring | null

length ≤ 4096

avatar_urlstring (uri) | null (uri)

Responses

updateOrg responses
StatusDescriptionBody
200

Updated org.

Org
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

GET /v1/orgs/{org}/members

List organization members

listOrgMembers · scope key:read

Visible to org members only.

Parameters

listOrgMembers parameters
NameInTypeDescription
orgrequiredpathSlug

Org slug.

limitqueryinteger

default 20 · ≥ 1 · ≤ 100

Page size.

cursorquerystring

length ≤ 512

Opaque cursor from the previous page's next_cursor.

Responses

listOrgMembers responses
StatusDescriptionBody
200

Page of members.

MemberPage
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json

PUT /v1/orgs/{org}/members/{username}

Add or update a member

putOrgMember · scope key:write

Upserts a membership with the given role. Only owner members may call. An org must keep at least one owner.

Parameters

putOrgMember parameters
NameInTypeDescription
orgrequiredpathSlug

Org slug.

usernamerequiredpathSlug

User handle.

Request body

application/json · required · MemberPut

putOrgMember request body
FieldTypeDescription
rolerequiredOrgRole

Responses

putOrgMember responses
StatusDescriptionBody
200

Membership created or updated.

Member
401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
422

Request failed validation.

Problemapplication/problem+json

DELETE /v1/orgs/{org}/members/{username}

Remove a member

removeOrgMember · scope key:write

owner members may remove anyone; any member may remove themselves (leave). Removing the last owner is rejected.

Parameters

removeOrgMember parameters
NameInTypeDescription
orgrequiredpathSlug

Org slug.

usernamerequiredpathSlug

User handle.

Responses

removeOrgMember responses
StatusDescriptionBody
204

Membership removed.

401

Missing or invalid credentials.

Problemapplication/problem+json
403

Authenticated but not allowed (visibility, membership or scope).

Problemapplication/problem+json
404

Resource not found (or hidden from the caller).

Problemapplication/problem+json
409

State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

Problemapplication/problem+json

Schemas (9)

The schemas these operations reach before any other tag’s do. A type that links elsewhere is rendered on that tag’s page.

OrgMembershipPage

object

OrgMembershipPage fields
FieldTypeDescription
itemsrequiredarray of OrgMembership
next_cursorrequiredstring | null

OrgCreate

object

OrgCreate fields
FieldTypeDescription
slugrequiredSlug
display_namestring | null

length ≤ 128

descriptionstring | null

length ≤ 4096

Org

object

Org fields
FieldTypeDescription
idrequiredId
slugrequiredSlug
display_namestring | null

length ≤ 128

descriptionstring | null

length ≤ 4096

avatar_urlstring (uri) | null (uri)
created_atrequiredstring (date-time)
updated_atrequiredstring (date-time)

OrgUpdate

object

All fields optional; omitted fields are unchanged.

OrgUpdate fields
FieldTypeDescription
display_namestring | null

length ≤ 128

descriptionstring | null

length ≤ 4096

avatar_urlstring (uri) | null (uri)

MemberPage

object

MemberPage fields
FieldTypeDescription
itemsrequiredarray of Member
next_cursorrequiredstring | null

MemberPut

object

MemberPut fields
FieldTypeDescription
rolerequiredOrgRole

Member

object

Member fields
FieldTypeDescription
userrequiredUserPublic
rolerequiredOrgRole
created_atrequiredstring (date-time)

OrgMembership

object

OrgMembership fields
FieldTypeDescription
orgrequiredOrg
rolerequiredOrgRole

OrgRole

string

one of owner · member