Assign user to project
const url = 'https://localhost:8080/api/v1/organizations/example/projects/example/members/example';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"roles":["project_owner","implementer"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://localhost:8080/api/v1/organizations/example/projects/example/members/example \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "roles": [ "project_owner", "implementer" ] }'Assign a user to a project within an organization with the specified project roles
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Organization ID or UUID (bare or urn:uuid)
Project ID, UUID (bare or urn:uuid), or slug:my-project
User UUID (bare or urn:uuid) or did:key
Request Body
Section titled “Request Body ”Roles to assign
object
At least one project-level role
Example
[ "project_owner", "implementer"]Responses
Section titled “ Responses ”User added successfully
A user’s assignment to a single project, and the roles it grants
object
Example generated
{ "assignedAt": "2026-04-15T12:00:00Z", "organizationId": 1, "projectId": 1, "roles": [ "example" ], "status": "example", "userId": "example"}Invalid request
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Unauthorized
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Forbidden - requires Organization Owner or Project Owner role
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Organization, project, or user not found
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}Internal server error
Error body returned across the auth endpoints; the message is human-readable and not a stable identifier
object
Example
{ "error": "Unauthorized", "error_description": "Invalid token"}