API reference

Workspace

5 endpoints, served at https://orbitwrite.com/api/v1. Each one lists the credentials it accepts, its parameters and every response it can give.

List the workspace's members#

GET/api/v1/workspaces/{organizationId}/members

Everyone in the workspace, oldest first. Any member may read it, as may the workspace's API keys.

The length of this list is what a plan's member limit is checked against — see GET /entitlements for the limit itself.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Path parameters

organizationIdstringRequired

At least 1 character.

Responses

200WorkspaceMembers

The workspace's members

Response attributes
membersWorkspaceMember[]Required
Child attributes
idstringRequired
userIdstringRequired
rolestringRequired
createdAtstringRequired
lastSeenAtstring | nullRequired

Last activity in this workspace, or null when none is on record. A member active within the last two minutes is online.

userobjectRequired
Child attributes
namestringRequired
emailstringRequired
imagestring | nullRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/workspaces/{organizationId}/members
curl -X GET "https://orbitwrite.com/api/v1/workspaces/{organizationId}/members" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "members": [
    {
      "id": "string",
      "userId": "string",
      "role": "string",
      "createdAt": "string",
      "lastSeenAt": "string",
      "user": {
        "name": "string",
        "email": "string",
        "image": "string"
      }
    }
  ]
}

Check whether a slug is free for this workspace#

GET/api/v1/workspaces/{organizationId}/slug-availability

Normalises slug the way PATCH /workspaces/{organizationId} does and reports whether that call would accept it. The workspace's own current slug is available.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

organizationIdstringRequired

At least 1 character.

Query parameters

slugstringRequired

At most 200 characters.

Responses

200WorkspaceSlugAvailability

Whether the slug is available

Response attributes
slugstringRequired
availablebooleanRequired
reasonstring | nullRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/workspaces/{organizationId}/slug-availability
curl -X GET "https://orbitwrite.com/api/v1/workspaces/{organizationId}/slug-availability?slug=slug" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "slug": "string",
  "available": true,
  "reason": "string"
}

Update workspace settings#

PATCH/api/v1/workspaces/{organizationId}

Partial update of the workspace name, slug, timezone and public-page fields. Owner/admin only; runs through Better Auth's organization plugin.

Changing slug moves the workspace's app URLs and its link-in-bio page (orbw.link/{slug}); links to the old slug stop working. A slug another workspace holds is a 409.

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

organizationIdstringRequired

At least 1 character.

Body application/json

namestring

Between 1 and 120 characters.

slugstring

The workspace's URL segment, in the app and at orbw.link. Changing it breaks existing links; the old slug does not redirect.

biostring

At most 500 characters.

websitestring

At most 300 characters.

publicProfileTitlestring

At most 120 characters.

publicProfileThemestring

At most 50 characters.

publicProfileCustomstring

At most 8000 characters.

timezonestring

Between 1 and 100 characters.

Responses

200WorkspaceSummary

The workspace after the update

Response attributes
idstringRequired
namestringRequired
slugstring | nullRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
409Error

Conflicts with an existing resource

Response attributes
errorstringRequired
issuesany[]
PATCH /api/v1/workspaces/{organizationId}
curl -X PATCH "https://orbitwrite.com/api/v1/workspaces/{organizationId}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "string",
  "slug": "acme",
  "bio": "string",
  "website": "string",
  "publicProfileTitle": "string",
  "publicProfileTheme": "string",
  "publicProfileCustom": "string",
  "publicProfileEnabled": true,
  "timezone": "string"
}'
Response
{
  "id": "string",
  "name": "string",
  "slug": "string"
}

Change a member's role#

PATCH/api/v1/workspaces/{organizationId}/members/{memberId}

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

organizationIdstringRequired

At least 1 character.

memberIdstringRequired

At least 1 character.

Body application/json

rolestringRequired
  • "owner"
  • "admin"
  • "manager"
  • "member"

Responses

200MemberRoleResult

The member's new role

Response attributes
memberIdstringRequired
rolestringRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
PATCH /api/v1/workspaces/{organizationId}/members/{memberId}
curl -X PATCH "https://orbitwrite.com/api/v1/workspaces/{organizationId}/members/{memberId}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "role": "owner"
}'
Response
{
  "memberId": "string",
  "role": "string"
}

Remove a member from the workspace#

DELETE/api/v1/workspaces/{organizationId}/members/{memberId}

Authentication

A signed-in session only. The Orbitwrite app calls this; an API key is refused.

Path parameters

organizationIdstringRequired

At least 1 character.

memberIdstringRequired

At least 1 character.

Responses

200MemberRemoved

The member was removed

Response attributes
memberIdstringRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
DELETE /api/v1/workspaces/{organizationId}/members/{memberId}
curl -X DELETE "https://orbitwrite.com/api/v1/workspaces/{organizationId}/members/{memberId}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "memberId": "string"
}