Quickstart
A token, a request, and a ticket. About two minutes.
Mint a token
Open Shaire, click your avatar, and go to Profile → API tokens. The tab is on your profile rather than in workspace settings, because a token can never do more than you can and you should be able to revoke your own without finding an admin.
Give it a name you will recognise in six months, then tick the scopes it needs. For this page,
tickets:read and tickets:write are enough. Reading and writing are separate everywhere: a
token that can create tickets cannot list them unless you say so.
The token is shown once. We store a hash of it, so it cannot be shown again, and if you lose it you revoke that one and mint another.
export SHAIRE_TOKEN="shr_pat_..."
Check who you are
The fastest way to know a token works, and what it can reach:
curl https://api.shairelabs.com/api/access/me \
-H "Authorization: Bearer $SHAIRE_TOKEN"
The response says which workspace the token is bound to, what role you hold in it, and what you may do. A script that reads this once at startup can fail with a useful message instead of collecting 403s.
Note what the request does not carry. There is no workspace header, because the token already names a workspace. If you belong to three workspaces, you hold three tokens.
Read something
curl "https://api.shairelabs.com/api/tickets?limit=5" \
-H "Authorization: Bearer $SHAIRE_TOKEN"
GET /api/tickets takes the same filters the saved views in the app use, and limit caps the
response. It is a cap rather than a page size: there is no cursor and no page two, so narrow with
filters rather than paging. Pagination covers the two endpoints that do page.
You will need a list to write into. GET /api/lists returns the ones you can see.
Write something
curl https://api.shairelabs.com/api/tickets \
-X POST \
-H "Authorization: Bearer $SHAIRE_TOKEN" \
-H "Content-Type: application/json" \
-d '{"listId":"...","title":"Filed from a script"}'
The ticket appears in the app immediately, attributed to you, because that is what the token means: it acts as its owner. Anyone watching the list is notified the same way they would be if you had typed it.
Next
Scopes to decide what a token should carry. Errors before you write a retry. The reference for everything else, with a copyable command on every endpoint.