Make a person staff, by id
const url = 'https://api.sloose.com/staff/people/c1d2e3f4';const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.sloose.com/staff/people/c1d2e3f4 \ --header 'Authorization: Bearer <token>'Backoffice route: a staff session, or ADMIN_TOKEN. Gives the staff role to a person who already has an account, named by their id, as an org’s People list shows them. They are told by email where to sign in. A deleted person is not found: nothing is made for the address they had. To make somebody staff by address, who may never have signed in, POST /staff/people.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The person
Example
c1d2e3f4The person
Responses
Section titled “Responses”Now staff.
object
object
Examplegenerated
{ "person": { "id": "example", "email": "example", "name": "example", "createdAt": "example" }}A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}No such person, or it is not visible to this session.
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}Already staff (code: ALREADY_STAFF).
The error envelope every non-2xx answer uses.
object
Human-readable explanation.
Machine-readable reason. Absent on a few legacy 400s.
Examplegenerated
{ "error": "example", "code": "example"}