Skip to main content
TroopyDocs
Open Troopy
Troopy

API reference / Account

Invite an accountant

Invites an email to be the accountant of the company of the key. Troopy emails the link. The link works one time, for that email, for 7 days. The accountant reads the legal details, the money of each workspace and the reports, and nothing else. A company has 5 accountants at most, with the invites that wait. A person who is in the company already can't be its accountant. Needs an owner or admin.

post/api/v1/company/accountants

Authorization

HeaderAuthorization: Bearer <API key>
Or the headerX-API-Key: <API key>
API keyMake one in Troopy under Settings > API keys. It acts as you, in its workspace.

Other ways to call it

CLItroopy company invite-accountant
MCP tooltroopy_invite_accountant
Rate limit10 calls in 60 seconds, for each key
RetriesSend an Idempotency-Key header. A retry with the same key gets the first answer back, and the operation runs one time.

Body

application/json
email*string

The email of the accountant

At most 254 characters · email

Response

201 · application/json
data*object
3 properties
invite*object
4 properties
id*string

A 24-character id

email*string
invitedBy*string

The name of the person who sent it

expiresAt*string

ISO 8601 date and time

url*string

The link of the invite, to send when the email did not go. Troopy does not show it again

emailed*boolean

Whether the email went

Errors

400 invalid_inputFix the field named in detail. Each operation's schema is in /api/v1/openapi.json.
401 unauthorizedSend an API key as `Authorization: Bearer tr_live_...`. Create one in Troopy under Settings.
403 forbiddenThe key lacks a scope this operation needs, or its owner lacks the role. detail says which; create a key with the scope, or ask a company owner or admin.
409 conflictThis Idempotency-Key was used for a different request, or that request is still running. Use a new key for a new request.
429 rate_limitedWait the number of seconds in Retry-After, then retry.