Skip to main content Skip to content

Users & Teams

Manage users within your organization and organize them into teams with resource assignments. Endpoints for user invites, team creation, membership, and resource assignment.

4 min read Last updated: 

Manage users within your organization and organize them into teams with resource assignments.

Users

List Users

GET /users

List all users in your organization. Supports ?search= (case-insensitive substring over name/email, paginated), ?page= / ?limit= (default 20, max 100), and ?email= for a server-side exact-email lookup that returns the single matching member (use ?email= rather than ?search= when you need one specific member, since substring search can push the exact address past the requested page).

Invite User

POST /users

Invite a new user to your organization by email.

Update User

PATCH /users/{email}

Update a user's display name or email. To change a user's role, use Role Assignments.

Remove User

DELETE /users/{email}

Remove a user from your organization.

Teams

List Teams

GET /teams

List all teams in your organization.

Create Team

POST /teams

Create a new team.

Request
curl -X POST https://api.zop.dev/teams \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"name": "Platform Engineering",
"description": "Manages shared infrastructure and developer tooling"
}'
Response
{
"data": {
"id": "4d2b6e8a-3c1f-4b5d-8a7e-9f0c1b2d3e4f",
"orgId": "3f6c2a9e-8b1d-4c7e-9f2a-1d5e6b7c8a90",
"name": "Platform Engineering",
"description": "Manages shared infrastructure and developer tooling",
"memberCount": 0,
"createdAt": "2025-03-10T09:00:00Z",
"updatedAt": "2025-03-10T09:00:00Z"
}
}

Get Team

GET /teams/{teamID}

Get a team. Members and assigned resources are listed by their own endpoints below.

Update Team

PUT /teams/{teamID}

Update team name or description.

Delete Team

DELETE /teams/{teamID}

Delete a team. Members and resource assignments are removed.

Team Members

List Members

GET /teams/{teamID}/members

List all members of a team with their team roles.

Add Member

In the team detail page, Add Member opens a picker of existing organization users rather than a free-text email field. Each user is listed with their name, email, and the teams they already belong to, so you can confirm who you’re adding. Users who are already on the team are filtered out, so you can’t add a duplicate, and you can add several members at once. Selecting a user and a team role calls the endpoint below. The email is taken from the chosen user, never typed by hand.

POST /teams/{teamID}/members

Add a user to a team by email, with a team role. roleId is required.

Request
curl -X POST https://api.zop.dev/teams/4d2b6e8a-3c1f-4b5d-8a7e-9f0c1b2d3e4f/members \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"email": "engineer@company.com",
"roleId": "5b2c8e4a-1f3d-4a7b-9c6e-8d0f2a4b6c8e"
}'
Response
{
"data": {
"email": "engineer@company.com",
"roleId": "5b2c8e4a-1f3d-4a7b-9c6e-8d0f2a4b6c8e"
}
}

Change Member Role

PUT /teams/{teamID}/members/{email}

Change a member's team role. Body: {roleId}.

Remove Member

DELETE /teams/{teamID}/members/{email}

Remove a member from a team.

Team Resources

List Assigned Resources

GET /teams/{teamID}/resources

List all resources assigned to a team.

Assign Resource

POST /teams/{teamID}/resources

Assign a cloud resource to a team.

Request
curl -X POST https://api.zop.dev/teams/4d2b6e8a-3c1f-4b5d-8a7e-9f0c1b2d3e4f/resources \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"resourceUid": "i-0abc123def456"
}'
Response
{
"data": {
"teamId": "4d2b6e8a-3c1f-4b5d-8a7e-9f0c1b2d3e4f",
"resourceUid": "i-0abc123def456"
}
}

resourceUid is the resource’s uid as returned by GET /resources.

Unassign Resource

DELETE /teams/{teamID}/resources

Remove a resource assignment from a team. The resource is identified in the body, because some cloud UIDs contain slashes.

Request
curl -X DELETE https://api.zop.dev/teams/4d2b6e8a-3c1f-4b5d-8a7e-9f0c1b2d3e4f/resources \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{ "resourceUid": "i-0abc123def456" }'

Team Object

FieldTypeDescription
idstringUnique team ID
orgIdstringOrganization ID
namestringTeam display name
descriptionstringOptional description
memberCountintegerNumber of members
resourceCountintegerNumber of assigned resources, when included
groupCountintegerNumber of assigned resource groups, when included
metadataobjectOptional extra data
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp
Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console· Multi-cloud automation· Production-ready in 30 min· SOC 2 · ISO 27001· 20–60% off the bill, first month· 4 platforms · 1 console·