---
title: "Grant a partner staff member a role in the client, or change it (partner admins only)"
method: PUT
path: "/partner/clients/{clientId}/grants/{userId}"
tags: ["Partners"]
---

# Grant a partner staff member a role in the client, or change it (partner admins only)

`PUT /partner/clients/{clientId}/grants/{userId}`

The grant and its Core access commit first, then the Clerk membership is created or updated. A Clerk failure answers 200 with syncState failed and syncError; retry it with the retry route. The same role again changes nothing (a grant keeps a narrower Core role it was moved in with). 422 NOT_PARTNER_STAFF when the user is not a member of the partner's organization. 409 GRANT_REVOKING while the grant is being revoked; 409 ALREADY_DIRECT_MEMBER when the user is already a member of the client without a partner grant (the client admin removes that membership first); 409 GRANT_CONFLICT when another request created the user's grant at the same time (read the grants and try again). 403 IMPERSONATED_SESSION for an impersonated session.

## Path parameters

- `clientId` string, required
- `userId` string, required

## Request body

- PartnerGrantRequest
  - `role` 'admin' | 'member' | 'viewer', required

## Response `200`

The grant

- PartnerGrantResponse
  - `data` PartnerGrant, required
    - `email` string, required
    - `grantedAt` string, date-time, required
    - `name` string, required
    - `revokedAt` string, date-time
    - `role` 'admin' | 'member' | 'viewer', required
    - `syncError` string
    - `syncState` 'pending' | 'active' | 'failed' | 'revoking' | 'revoked', required
    - `userId` string, required

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `409` — GRANT_REVOKING, ALREADY_DIRECT_MEMBER or GRANT_CONFLICT
- `422` — The user is not partner staff

## Changes

- **2026-10-06** `461a0ebc7731` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/greentally/apis/esgai-api/changes/partner/clients/:clientId/grants/:userId/put.md)

---

[API](https://skmtc.dev/greentally/apis/esgai-api.md) · [All operations](https://skmtc.dev/greentally/apis/esgai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/greentally/apis/esgai-api/revisions/461a0ebc7731?raw)
