Organizations
POST /organizations
Section titled “POST /organizations”Create a new organization. You become the admin automatically.
Body:
{ "name": "Acme Inc", "slug": "acme-inc", "description": "Optional"}Response: Organization object + JWT tokens (auto-switches to new org).
GET /organizations/:id
Section titled “GET /organizations/:id”Get organization details. You must be a member.
PATCH /organizations/:id
Section titled “PATCH /organizations/:id”Update organization name, slug, or description. You must be a member.
Body:
{ "name": "Updated Name", "slug": "updated-slug"}DELETE /organizations/:id
Section titled “DELETE /organizations/:id”Delete an organization. Requires Admin role.
POST /organizations/:id/invitations
Section titled “POST /organizations/:id/invitations”Invite a user to the organization. Requires Admin role.
Body:
{ "invitedEmail": "newuser@example.com", "desired_role": "user"}Response:
{ "id": 1, "code": "inv_abc123...", "invitedEmail": "newuser@example.com", "invite_role": "user", "status": "pending"}