Organizations API
Organizations are company-level entities that own and group workspaces. They provide a higher level of administration for teams that manage multiple workspaces (e.g., production, staging, sandbox environments).
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /api/v1/organizations | List organizations |
POST | /api/v1/organizations | Create an organization |
GET | /api/v1/organizations/{orgId} | Get an organization |
PUT | /api/v1/organizations/{orgId} | Update an organization |
DELETE | /api/v1/organizations/{orgId} | Delete an organization |
GET | /api/v1/organizations/{orgId}/workspaces | List org workspaces |
POST | /api/v1/organizations/{orgId}/workspaces | Create workspace in org |
GET | /api/v1/organizations/{orgId}/members | List org members |
POST | /api/v1/organizations/{orgId}/members | Add a member |
PUT | /api/v1/organizations/{orgId}/members/{accountId} | Update member role |
DELETE | /api/v1/organizations/{orgId}/members/{accountId} | Remove a member |
POST | /api/v1/organizations/{orgId}/invitations | Send an invitation |
GET | /api/v1/organizations/{orgId}/invitations | List invitations |
DELETE | /api/v1/organizations/{orgId}/invitations/{inviteId} | Cancel an invitation |
POST | /api/v1/organizations/invitations/{inviteId}/accept | Accept an invitation |
List Organizations
GET /api/v1/organizations
Returns all organizations the authenticated user is a member of. Does not require the X-Workspace-ID header.
Response
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Acme Corp",
"slug": "acme-corp",
"avatar_url": "",
"settings": {},
"created_by": "660e8400-e29b-41d4-a716-446655440000",
"workspace_count": 3,
"member_count": 15,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T09:30:00Z"
}
]Example
curl -X GET https://your-instance.signalsmith.io/api/v1/organizations \
-H "Authorization: Bearer <token>"Create Organization
POST /api/v1/organizations
Creates a new organization. The authenticated user becomes the organization owner.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Organization display name |
slug | string | Yes | URL-safe identifier (must be globally unique) |
{
"name": "Acme Corp",
"slug": "acme-corp"
}Response
Returns the created organization with status 201 Created.
Example
curl -X POST https://your-instance.signalsmith.io/api/v1/organizations \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"slug": "acme-corp"
}'Get Organization
GET /api/v1/organizations/{orgId}
Returns a single organization by ID.
Update Organization
PUT /api/v1/organizations/{orgId}
Updates organization details. Requires org_owner or org_admin role.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | Updated display name |
slug | string | No | Updated slug |
avatar_url | string | No | Updated avatar URL |
settings | object | No | Updated org settings |
Delete Organization
DELETE /api/v1/organizations/{orgId}
Deletes an organization. Requires org_owner role. All workspaces under the organization must be deleted first.
Response
{
"status": "deleted"
}Workspace Management
List Org Workspaces
GET /api/v1/organizations/{orgId}/workspaces
Returns all workspaces belonging to the organization.
Create Workspace in Org
POST /api/v1/organizations/{orgId}/workspaces
Creates a new workspace under the organization.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Workspace display name |
slug | string | Yes | URL-safe identifier |
{
"name": "Production",
"slug": "production"
}Member Management
Organization Roles
| Role | Description |
|---|---|
org_owner | Full access to org settings, billing, and all workspaces |
org_admin | Can manage org members and create workspaces |
org_member | Can access assigned workspaces |
List Members
GET /api/v1/organizations/{orgId}/members
Returns all organization members with their roles and account details.
Response
[
{
"organization_id": "550e8400-e29b-41d4-a716-446655440000",
"account_id": "660e8400-e29b-41d4-a716-446655440000",
"role": "org_owner",
"email": "alice@example.com",
"name": "Alice Smith",
"avatar_url": "https://...",
"created_at": "2024-01-01T00:00:00Z"
}
]Add Member
POST /api/v1/organizations/{orgId}/members
Adds an existing account to the organization.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
account_id | string (UUID) | Yes | Account to add |
role | string | No | Role to assign (defaults to org_member) |
Update Member Role
PUT /api/v1/organizations/{orgId}/members/{accountId}
Changes a member’s organization role.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
role | string | Yes | New role (org_owner, org_admin, org_member) |
Remove Member
DELETE /api/v1/organizations/{orgId}/members/{accountId}
Removes a member from the organization. Also removes them from all workspaces under the organization.
Invitations
Send Invitation
POST /api/v1/organizations/{orgId}/invitations
Sends an email invitation to join the organization.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Email address to invite |
role | string | No | Role to assign on acceptance (defaults to org_member) |
{
"email": "newuser@example.com",
"role": "org_member"
}List Invitations
GET /api/v1/organizations/{orgId}/invitations
Returns all pending invitations.
Response
[
{
"id": "770e8400-e29b-41d4-a716-446655440000",
"organization_id": "550e8400-e29b-41d4-a716-446655440000",
"email": "newuser@example.com",
"role": "org_member",
"invited_by": "660e8400-e29b-41d4-a716-446655440000",
"inviter_name": "Alice Smith",
"status": "pending",
"expires_at": "2024-02-15T00:00:00Z",
"created_at": "2024-01-15T09:30:00Z",
"updated_at": "2024-01-15T09:30:00Z"
}
]Cancel Invitation
DELETE /api/v1/organizations/{orgId}/invitations/{inviteId}
Cancels a pending invitation.
Accept Invitation
POST /api/v1/organizations/invitations/{inviteId}/accept
Accepts an invitation. The authenticated user is added to the organization with the invited role.
Organization Object
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier |
name | string | Display name |
slug | string | URL-safe identifier |
avatar_url | string | Avatar image URL |
settings | object | Organization settings |
created_by | string (UUID) | Account that created the org |
workspace_count | integer | Number of workspaces |
member_count | integer | Number of members |
created_at | string (ISO 8601) | Creation timestamp |
updated_at | string (ISO 8601) | Last update timestamp |
Organization Member Object
| Field | Type | Description |
|---|---|---|
organization_id | string (UUID) | Organization ID |
account_id | string (UUID) | Account ID |
role | string | org_owner, org_admin, or org_member |
email | string | Member email |
name | string | Member display name |
avatar_url | string | Member avatar URL |
created_at | string (ISO 8601) | When the member was added |
Organization Invite Object
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier |
organization_id | string (UUID) | Organization ID |
email | string | Invited email address |
role | string | Role to assign on acceptance |
invited_by | string (UUID) | Account that sent the invite |
inviter_name | string | Name of the inviter |
status | string | pending, accepted, or expired |
expires_at | string (ISO 8601) | Invitation expiry time |
created_at | string (ISO 8601) | Creation timestamp |
updated_at | string (ISO 8601) | Last update timestamp |