Skip to content

Organizations API

Organizations are the top-level entity in Comvi. Every project, team member, and billing plan belongs to an organization. Users can belong to multiple organizations.

Retrieve all organizations the authenticated user belongs to.

GET /api/v1/organizations
Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/organizations
[
{
"id": 1,
"name": "Acme Corp",
"createdAt": "2025-01-10T08:00:00.000Z",
"updatedAt": "2025-01-10T08:00:00.000Z"
},
{
"id": 2,
"name": "Side Project",
"createdAt": "2025-02-01T12:00:00.000Z",
"updatedAt": "2025-02-01T12:00:00.000Z"
}
]
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication

Retrieve a single organization by its ID. The caller must be a member of the organization.

GET /api/v1/organizations/:id
ParameterTypeRequiredDescription
idintegerYesOrganization ID
Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/organizations/1
{
"id": 1,
"name": "Acme Corp",
"createdAt": "2025-01-10T08:00:00.000Z",
"updatedAt": "2025-01-10T08:00:00.000Z"
}
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
404ORGANIZATION_NOT_FOUNDOrganization does not exist, or the caller is not a member

Create a new organization. The authenticated user is automatically assigned as the owner.

POST /api/v1/organizations
FieldTypeRequiredDescription
namestringYesOrganization name (1-255 characters)
Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp"}' \
https://api.comvi.io/api/v1/organizations
{
"id": 1,
"name": "Acme Corp",
"createdAt": "2025-01-10T08:00:00.000Z",
"updatedAt": "2025-01-10T08:00:00.000Z"
}
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication

Update an organization’s name. Requires the org.edit permission.

PATCH /api/v1/organizations/:id
ParameterTypeRequiredDescription
idintegerYesOrganization ID
FieldTypeRequiredDescription
namestringNoUpdated organization name (1-255 characters)
Terminal window
curl -X PATCH \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corporation"}' \
https://api.comvi.io/api/v1/organizations/1
{
"id": 1,
"name": "Acme Corporation",
"createdAt": "2025-01-10T08:00:00.000Z",
"updatedAt": "2025-01-15T14:30:00.000Z"
}
StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to edit this organization

Permanently delete an organization and all its data. Requires the org.delete permission.

DELETE /api/v1/organizations/:id
ParameterTypeRequiredDescription
idintegerYesOrganization ID
Terminal window
curl -X DELETE \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/organizations/1

Returns 204 No Content with an empty body on success.

StatusErrorDescription
401UNAUTHORIZEDMissing or invalid authentication
403FORBIDDENNo permission to delete this organization