Change a collaborator's role
const url = 'https://api.aetherpush.com/v1/apps/example/collaborators/hello%40example.com';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"permission":"Viewer"}'};
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.aetherpush.com/v1/apps/example/collaborators/hello%40example.com \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "permission": "Viewer" }'Updates the role of an existing collaborator. Requires the collaborators.manage permission (Owner or Admin). The owner’s role cannot be changed here; use an ownership transfer instead.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
New role for the collaborator. The owner’s role can only change through an ownership transfer.
Example
{ "permission": "Viewer"}Responses
Section titled “Responses”Role updated.
Invalid email parameter or non-assignable role.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}Insufficient permissions (collaborators.manage required).
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}App not found, or target email is not a collaborator.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}The target is the owner, whose role can only change through an ownership transfer.
object
Human-readable error message.
Unique identifier for the request, also exposed as the X-Request-Id response header.
Example
{ "error": "The requested resource was not found.", "requestId": "req_abc123"}