Skip to content

Members API

The Members API lets you manage who has access to your organizations and projects. You can invite new members, assign roles, update permissions, and remove members programmatically.

Comvi uses a unified role hierarchy across organizations and projects:

RoleDescription
ownerFull control, including billing and member management
managerManage projects, members, and settings
editorEdit translations and keys
translatorTranslate content in assigned languages
viewerRead-only access

Returns all members of an organization with their roles.

GET /api/v1/organizations/:orgId/members

Path parameters

ParameterTypeRequiredDescription
orgIdintegerYesOrganization ID

Example request

Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/organizations/1/members

Example response

[
{
"userId": 42,
"email": "jane@example.com",
"name": "Jane Smith",
"role": "owner",
"joinedAt": "2025-01-10T08:00:00Z",
"accessScope": "organization",
"projectCount": 5
},
{
"userId": 43,
"email": "bob@example.com",
"name": "Bob Johnson",
"role": "translator",
"joinedAt": "2025-02-15T14:30:00Z",
"accessScope": "project",
"projectCount": 2
}
]

Response fields

FieldTypeDescription
userIdintegerUser ID
emailstringMember’s email address
namestringMember’s display name
rolestringOrganization role (owner, manager, editor, translator, viewer)
joinedAtstringISO 8601 timestamp of when the member joined
accessScopestring"organization" (access to all projects) or "project" (access to specific projects only)
projectCountintegerNumber of projects the member has access to

Invite a user to the organization by email. If the user already has a Comvi account, they are added directly. Otherwise, an invitation email is sent.

POST /api/v1/organizations/:orgId/members/invite

Path parameters

ParameterTypeRequiredDescription
orgIdintegerYesOrganization ID

Request body

FieldTypeRequiredDescription
emailstringYesEmail address of the person to invite
rolestringYesRole to assign (owner, manager, editor, translator, viewer)
projectIdintegerNoAssign to a specific project on join
languageRestrictionsstring[]NoRestrict to specific locale codes (e.g., ["fr", "de"])

Example request

Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "translator@example.com",
"role": "translator",
"projectId": 5,
"languageRestrictions": ["fr", "de"]
}' \
https://api.comvi.io/api/v1/organizations/1/members/invite

Example response

{
"id": 12,
"email": "translator@example.com",
"role": "translator",
"projectId": 5,
"languageRestrictions": ["fr", "de"],
"token": "abc123...",
"expiresAt": "2025-04-01T08:00:00Z",
"createdAt": "2025-03-25T08:00:00Z"
}

Update an organization member’s role. You cannot change the role of the last remaining owner.

PATCH /api/v1/organizations/:orgId/members/:userId

Path parameters

ParameterTypeRequiredDescription
orgIdintegerYesOrganization ID
userIdintegerYesUser ID of the member to update

Request body

FieldTypeRequiredDescription
rolestringYesNew role to assign

Example request

Terminal window
curl -X PATCH \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"role": "editor"}' \
https://api.comvi.io/api/v1/organizations/1/members/43

Response

Returns 204 No Content on success.


Remove a user from the organization. This also removes them from all projects within the organization.

DELETE /api/v1/organizations/:orgId/members/:userId

Path parameters

ParameterTypeRequiredDescription
orgIdintegerYesOrganization ID
userIdintegerYesUser ID of the member to remove

Example request

Terminal window
curl -X DELETE \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/organizations/1/members/43

Response

Returns 204 No Content on success.


Returns all members of a project with their organization and project roles.

GET /api/v1/projects/:projectId/members

Path parameters

ParameterTypeRequiredDescription
projectIdintegerYesProject ID

Example request

Terminal window
curl -X GET \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/projects/5/members

Example response

[
{
"userId": 42,
"email": "jane@example.com",
"name": "Jane Smith",
"organizationRole": "owner",
"projectRole": "owner",
"languageRestrictions": null,
"addedAt": "2025-01-10T08:00:00Z"
},
{
"userId": 44,
"email": "maria@example.com",
"name": "Maria Garcia",
"organizationRole": "translator",
"projectRole": "translator",
"languageRestrictions": ["es", "pt"],
"addedAt": "2025-03-01T12:00:00Z"
}
]

Response fields

FieldTypeDescription
userIdintegerUser ID
emailstringMember’s email address
namestringMember’s display name
organizationRolestringThe member’s role at the organization level
projectRolestringThe member’s role at the project level
languageRestrictionsstring[] | nullLocale codes the member can work with, or null for all languages
addedAtstringISO 8601 timestamp of when the member was added to the project

Add an existing organization member to a project. The user must already belong to the organization.

POST /api/v1/projects/:projectId/members

Path parameters

ParameterTypeRequiredDescription
projectIdintegerYesProject ID

Request body

FieldTypeRequiredDescription
userIdintegerYesUser ID of the organization member to add
rolestringYesProject role (owner, manager, editor, translator, viewer)
languageRestrictionsstring[]NoRestrict to specific locale codes

Example request

Terminal window
curl -X POST \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"userId": 44,
"role": "translator",
"languageRestrictions": ["es", "pt"]
}' \
https://api.comvi.io/api/v1/projects/5/members

Response

Returns 201 Created on success.


Update a project member’s role or language restrictions.

PATCH /api/v1/projects/:projectId/members/:userId

Path parameters

ParameterTypeRequiredDescription
projectIdintegerYesProject ID
userIdintegerYesUser ID of the member to update

Request body

FieldTypeRequiredDescription
rolestringYesNew project role
languageRestrictionsstring[]NoUpdated locale code restrictions, or null for all languages

Example request

Terminal window
curl -X PATCH \
-H "X-API-Key: tlk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"role": "editor",
"languageRestrictions": null
}' \
https://api.comvi.io/api/v1/projects/5/members/44

Response

Returns 204 No Content on success.


Remove a user from a project. This does not remove them from the organization.

DELETE /api/v1/projects/:projectId/members/:userId

Path parameters

ParameterTypeRequiredDescription
projectIdintegerYesProject ID
userIdintegerYesUser ID of the member to remove

Example request

Terminal window
curl -X DELETE \
-H "X-API-Key: tlk_your_api_key" \
https://api.comvi.io/api/v1/projects/5/members/44

Response

Returns 204 No Content on success.


StatusError CodeDescription
400CANNOT_REMOVE_LAST_OWNERCannot remove or demote the last owner of an organization
400ROLE_HIERARCHY_VIOLATIONCannot assign a role higher than your own
403FORBIDDENMissing required permission (organization.manage_members or project.manage_members)
404USER_NOT_FOUNDThe specified user does not exist
404ORGANIZATION_NOT_FOUNDThe specified organization does not exist
404PROJECT_NOT_FOUNDThe specified project does not exist
409USER_ALREADY_IN_ORGANIZATIONThe user is already a member of this organization
409INVITATION_ALREADY_SENTAn invitation has already been sent to this email