Skip to content

Organizations

Organizations are the top-level workspace container in GEN. Every agent, project, credit balance, and team member belongs to an organization. When you create a new organization, you automatically become its owner and a system agent is provisioned for it.

Returns all organizations where the authenticated user is a member, along with their role in each.

GET /v1/organizations

None.

[
{
"id": 10,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"organization_id": 10,
"name": "My Workspace",
"avatar": {
"url": "https://cdn.gen.pro/avatars/org-10.png",
"thumbnail_url": "https://cdn.gen.pro/avatars/org-10-thumb.png"
},
"user_role": "owner",
"credit": "250.0",
"available_credit": {
"generic": "200.0",
"aura": "50.0"
},
"total_members": 3,
"credit_plan": {
"id": 1,
"name": "Pro",
"cycle": "MONTHLY"
}
}
]
Terminal window
curl https://api.gen.pro/v1/organizations \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.

Creates a new organization. The authenticated user is assigned the owner role automatically.

POST /v1/organizations
ParameterTypeRequiredDescription
organization[name]stringYesDisplay name for the organization.
organization[avatar]fileNoAvatar image (JPEG, PNG, WebP, GIF).
{
"organization_id": 42
}
Terminal window
curl https://api.gen.pro/v1/organizations \
-H "X-API-Key: your-api-key" \
-X POST \
-d '{"organization":{"name":"New Workspace"}}' \
-H "Content-Type: application/json"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
422validation_errorValidation failed (e.g. missing name).

Returns a single organization by ID, including the authenticated user’s role.

GET /v1/organizations/:organization_id
ParameterTypeRequiredDescription
organization_idintegerYesThe organization ID (path parameter).
{
"id": 10,
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"organization_id": 10,
"name": "My Workspace",
"avatar": {
"url": "https://cdn.gen.pro/avatars/org-10.png",
"thumbnail_url": "https://cdn.gen.pro/avatars/org-10-thumb.png"
},
"user_role": "owner",
"credit": "250.0",
"available_credit": {
"generic": "200.0",
"aura": "50.0"
},
"total_members": 3,
"credit_plan": {
"id": 1,
"name": "Pro",
"cycle": "MONTHLY"
}
}
Terminal window
curl https://api.gen.pro/v1/organizations/10 \
-H "X-API-Key: your-api-key"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
422organization_not_foundOrganization ID is missing or does not exist.

Updates an organization’s name or avatar. Requires owner or manager role.

PATCH /v1/organizations/:organization_id
ParameterTypeRequiredDescription
organization_idintegerYesThe organization ID (path parameter).
organization[name]stringNoNew display name.
organization[avatar]fileNoNew avatar image (JPEG, PNG, WebP, GIF).
{
"organization_id": 10
}
Terminal window
curl https://api.gen.pro/v1/organizations/10 \
-H "X-API-Key: your-api-key" \
-X PATCH \
-d '{"organization":{"name":"Renamed Workspace"}}' \
-H "Content-Type: application/json"
StatusError codeDescription
401unauthorizedMissing or invalid API key.
403forbiddenUser does not have owner or manager role.
422organization_not_foundOrganization ID is missing or does not exist.
422validation_errorValidation failed (e.g. blank name).

Permanently deletes an organization and all associated data (agents, projects, jobs, credit history). Requires owner role.

DELETE /v1/organizations/:organization_id
ParameterTypeRequiredDescription
organization_idintegerYesThe organization ID (path parameter).

Returns HTTP 200 OK with an empty body on success.

Terminal window
curl https://api.gen.pro/v1/organizations/10 \
-H "X-API-Key: your-api-key" \
-X DELETE
StatusError codeDescription
401unauthorizedMissing or invalid API key.
403forbiddenUser does not have owner role.
422organization_not_foundOrganization ID is missing or does not exist.