← Back to Docs

Organizations API

Manage organizations, teams, and settings programmatically.

Overview

The Organizations API lets you manage your organization settings, team members, and plan information programmatically. All endpoints require JWT authentication via the dashboard's BFF proxy.

Get Current Organization

Retrieve details about your current organization.

GET /api/organizations/current

Response:
{
  "id": "uuid",
  "name": "My Company",
  "slug": "my-company",
  "plan": "professional",
  "max_websites": 5,
  "created_at": "2024-01-01T00:00:00Z"
}

List Team Members

Get all team members in your organization with their roles.

GET /api/organizations/current/members

Response:
[
  {
    "id": "uuid",
    "email": "admin@example.com",
    "role": "owner",
    "joined_at": "2024-01-01T00:00:00Z"
  }
]

Invite a Team Member

Send an invitation to join your organization. The invitee will receive an email with a link to accept.

POST /api/organizations/current/members/invite

Body:
{
  "email": "newmember@example.com",
  "role": "member"
}

Response:
{
  "message": "Invitation sent"
}

Update Member Role

Change a team member's role. Only owners can perform this action.

PATCH /api/organizations/current/members/:member_id

Body:
{
  "role": "admin"
}

Response:
{
  "id": "uuid",
  "email": "member@example.com",
  "role": "admin"
}