---
title: "Add the calling operator to a project's workspace, or change their role there"
method: PUT
path: "/api/admin/projects/{project_id}/membership"
tags: ["admin"]
---

# Add the calling operator to a project's workspace, or change their role there

`PUT /api/admin/projects/{project_id}/membership`

## Request

- Base URL: `https://api.hillstar.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.hillstar.ai/api/admin/projects/{project_id}/membership`
- Auth: none declared

The operator is the verified bearer identity, never the body. Writes a workspace audit row.

## Path parameters

- `project_id` integer, required

## Headers

- `Authorization` string: Bearer <Google Workspace ID token> of the operator

## Request body

- AdminProjectMembershipRequest
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `role` 'admin' | 'member' | 'viewer', required: Workspace role to hold

## Response `200`

OK

- AdminProjectMembershipResponse
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `changed` boolean, required: False when the operator already held this role
  - `project_id` integer, required
  - `project_url` string, required
  - `role` string, required
  - `workspace_id` integer, required

## Other responses

- `default`: Error

---

[API](https://skmtc.dev/hillstar/apis/rfpai-api-go.md) - [All operations](https://skmtc.dev/hillstar/apis/rfpai-api-go/llms.txt) - [OpenAPI document](https://skmtc.dev/hillstar/apis/rfpai-api-go/revisions/b2532dc47fc6?raw)
