Change a project member's role
PATCH
/api/v1/projects/{projectId}/members/{userId}
const url = 'https://api.yggy.tech/api/v1/projects/example/members/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"role":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.yggy.tech/api/v1/projects/example/members/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "role": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” projectId
required
string
userId
required
string
Request Body
Section titled “Request Body ” Media type application/json
object
role
required
string
Example generated
{ "role": "example"}Responses
Section titled “ Responses ”Role updated
Media type application/json
object
member
required
object
id
required
string | null
userId
required
string
role
required
string
user
required
object
id
required
string
email
required
string
name
required
string | null
isOrgImplicit
required
boolean
Example generated
{ "member": { "id": "example", "userId": "example", "role": "example", "user": { "id": "example", "email": "example", "name": "example" }, "isOrgImplicit": true }}Bad request
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Forbidden
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Not found
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}Last owner
Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
details
Example
{ "success": false, "error": { "code": "INTERNAL_ERROR" }}