Add a project person
OpenAPI contract
- Method
- POST
- Path
/api/v1/projects/{id}/people- Security
- jwtBearer (bearer)
- Response status
- 201 400 401 403 404 409 429 500
Request and response schemas
JSON
{
"requestBody": {
"application/json": {
"$ref": "#/components/schemas/UpsertProjectGrantRequest"
}
},
"responses": {
"201": {
"description": "Project person added",
"content": {
"application/json": {
"$ref": "#/components/schemas/ProjectGrantResponse"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"404": {
"description": "Requested project or build was not found",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"409": {
"description": "Request conflicts with current project state",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
},
"429": {
"description": "HTTP rate limit or API-key NCU usage limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/RateLimitError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}POST /api/v1/projects/{id}/people is JWT-only and requires project-management capability. Send the userId of an active member of the project's workspace and a role: ADMIN, MAINTAINER, BUILDER, VIEWER, or ARTIFACT_CONSUMER.
The target must already be an active workspace member. A missing or outside-workspace user is reported as not found, and an existing direct grant returns a conflict. The response contains the created grant.
json
{"userId":42,"role":"ARTIFACT_CONSUMER"}