Endpoints
Call these through the okoro proxy at https://okoro.ai/p/google-workspace-admin
| Action | Method | Path | Min scope |
|---|---|---|---|
| List users | GET | read | |
| Read user | GET | read | |
| Create user | POST | write | |
| Update user | PUT | update | |
| Patch user | PATCH | update | |
| Delete user | DELETE | delete | |
| List groups | GET | read | |
| Read group | GET | read | |
| Create group | POST | write | |
| Update group | PUT | update | |
| Delete group | DELETE | delete | |
| List org units | GET | read | |
| Read org unit | GET | read | |
| Create org unit | POST | write | |
| Update org unit | PATCH | update | |
| Delete org unit | DELETE | delete |
Examples
Every request requires a short-lived operation token scoped to a single action.
1. Get an operation token
Exchange your service token for a short-lived operation token scoped to a single action.
TOKEN=$(curl -sX POST "https://okoro.ai/t/tokens" \
-H "Authorization: Bearer $OKORO_SERVICE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"provider": "google-workspace-admin", "scope": "read", "intent": "describe what you are doing"}' \
| jq -r '.token')2. Call the API
Use the operation token as a Bearer token. The proxy forwards the request to Google Workspace Admin and logs the action.
List users
curl -X GET "https://okoro.ai/p/google-workspace-admin/users" \
-H "Authorization: Bearer $TOKEN"Read user
curl -X GET "https://okoro.ai/p/google-workspace-admin/users/{id}" \
-H "Authorization: Bearer $TOKEN"Create user
curl -X POST "https://okoro.ai/p/google-workspace-admin/users" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Update user
curl -X PUT "https://okoro.ai/p/google-workspace-admin/users/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Patch user
curl -X PATCH "https://okoro.ai/p/google-workspace-admin/users/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Delete user
curl -X DELETE "https://okoro.ai/p/google-workspace-admin/users/{id}" \
-H "Authorization: Bearer $TOKEN"List groups
curl -X GET "https://okoro.ai/p/google-workspace-admin/groups" \
-H "Authorization: Bearer $TOKEN"Read group
curl -X GET "https://okoro.ai/p/google-workspace-admin/groups/{id}" \
-H "Authorization: Bearer $TOKEN"Create group
curl -X POST "https://okoro.ai/p/google-workspace-admin/groups" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Update group
curl -X PUT "https://okoro.ai/p/google-workspace-admin/groups/{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Delete group
curl -X DELETE "https://okoro.ai/p/google-workspace-admin/groups/{id}" \
-H "Authorization: Bearer $TOKEN"List org units
curl -X GET "https://okoro.ai/p/google-workspace-admin/customer/{id}/orgunits" \
-H "Authorization: Bearer $TOKEN"Read org unit
curl -X GET "https://okoro.ai/p/google-workspace-admin/customer/{id}/orgunits/{id}{id}" \
-H "Authorization: Bearer $TOKEN"Create org unit
curl -X POST "https://okoro.ai/p/google-workspace-admin/customer/{id}/orgunits" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Update org unit
curl -X PATCH "https://okoro.ai/p/google-workspace-admin/customer/{id}/orgunits/{id}{id}" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Delete org unit
curl -X DELETE "https://okoro.ai/p/google-workspace-admin/customer/{id}/orgunits/{id}{id}" \
-H "Authorization: Bearer $TOKEN"Scopes
Your service token must be configured with at least the required scope level.
readGET/users
/users/*
/groups
/groups/*
/customer/*/orgunits
/customer/*/orgunits/**writeGET
POST/users
/users/*
/groups
/groups/*
/customer/*/orgunits
/customer/*/orgunits/**updateGET
POST
PUT
PATCH/users
/users/*
/groups
/groups/*
/customer/*/orgunits
/customer/*/orgunits/**deleteGET
POST
PUT
PATCH
DELETE/users
/users/*
/groups
/groups/*
/customer/*/orgunits
/customer/*/orgunits/**allGET
POST
PUT
PATCH
DELETE/**