Skip to main content
POST /api/v1/projects/{project_id}/members Requires project_members.write permission. The user must already be a member of the organization before they can be added to a project.

Path parameters

project_id
string
required
UUID of the project.

Request body

user_id
string
required
UUID of the organization member to add.
role_id
string
required
UUID of the role to assign to this member within the project.

Response

member
object
required
The newly created project membership.

Errors

StatusWhen
400Request body is invalid or missing required fields
403Caller lacks project_members.write permission
404Project or role not found, or user is not an organization member
409User is already a member of this project

Example

curl -X POST http://localhost:8080/api/v1/projects/p1b2c3d4-e5f6-7890-abcd-ef1234567890/members \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "u1b2c3d4-e5f6-7890-abcd-ef1234567890", "role_id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890"}'
{
  "member": {
    "id": "mb1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "project_id": "p1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "user_id": "u1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "role_id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "role": {
      "id": "r1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "key": "developer",
      "name": "Developer",
      "is_system": true,
      "permissions": ["flags.read", "flags.write", "rules.read", "rules.write"]
    },
    "created_at": "2026-03-21T10:00:00Z"
  }
}

Build docs developers (and LLMs) love