Skip to content
GurtOS

Add or change a person

POST
/people
curl --request POST \
--url http://127.0.0.1:7700/api/people \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "Rosa Delgado", "role": "approver", "title": "Controller", "limitCents": 5000000, "approvesFor": [ "Controller" ] }'

Preview. For an admin or the owner; only the owner adds or changes an owner. With the id of someone who exists, the fields you send change and the rest stay. An approver needs limitCents.

Media typeapplication/json
object
id

Optional for a new person: made from the first name.

string
/^[a-z][a-z0-9-]{0,30}$/
name
required
string
<= 60 characters
role
required

owner everything an admin may, plus the owner’s controls. admin people, the policy, pairing phones and the kill switch. approver answers what the policy sends to them, up to limitCents. requester starts tasks and sees their own requests. auditor reads everything and changes nothing.

string
Allowed values: owner admin approver requester auditor
title
string
<= 40 characters
email
string
<= 120 characters
limitCents

The most this person may approve, in US cents. null for no limit.

integer | null
approvesFor

Names the policy uses, such as Controller.

Array<string>
<= 10 items

Example

{
"name": "Rosa Delgado",
"role": "approver",
"title": "Controller",
"limitCents": 5000000,
"approvesFor": [
"Controller"
]
}

The person.

Media typeapplication/json
object
id
required
string
name
required
string
role
required

owner everything an admin may, plus the owner’s controls. admin people, the policy, pairing phones and the kill switch. approver answers what the policy sends to them, up to limitCents. requester starts tasks and sees their own requests. auditor reads everything and changes nothing.

string
Allowed values: owner admin approver requester auditor
title
string
limitCents
required

The most this person may approve, in US cents. null for no limit.

integer | null
approvesFor
required

The names in the policy this person approves for.

Array<string>
email

Their work address from a sign-in. Kept in the box’s state only

string

Example

{
"id": "rosa",
"role": "owner"
}

A bad field, with the reason.

Media typeapplication/json
object
error
required

What went wrong

string

Example generated

{
"error": "example"
}

The owner’s route, called by someone who is not the box’s own screen or a device paired as the owner.

Media typeapplication/json
object
error
required

What went wrong

string

Example

{
"error": "only this computer's own screen or the owner's paired device can do this"
}