Skip to content

Make a person staff, by id

PUT
/staff/people/{id}
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.

id
required

The person

string
Example
c1d2e3f4

The person

Now staff.

Media typeapplication/json
object
person
required
object
id
required
string
email
required
string
name
required
string
createdAt
required
string
Examplegenerated
{
"person": {
"id": "example",
"email": "example",
"name": "example",
"createdAt": "example"
}
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
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).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such person, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Already staff (code: ALREADY_STAFF).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

Report a problem with this page