Redeem a one-time invite token and set a password
const url = 'http://localhost:3000/operator/invite/accept';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"token":"example","password":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/operator/invite/accept \ --header 'Content-Type: application/json' \ --data '{ "token": "example", "password": "example" }'Unauthenticated by nature — this route IS how a token is first obtained. Redemption is single-use: a replayed token, an expired one, or one for a since-disabled operator all fail identically.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "token": "example", "password": "example"}Responses
Section titled “Responses”A session token and the operator’s public profile.
object
Operator session token. Bearer-authenticate with it as operatorToken.
An operator as returned by login, invite acceptance, and GET /operator/me — the same shape everywhere so a dashboard hitting any of the three sees one model. Never carries password_hash.
object
Null for platform staff.
Example
{ "operator": { "role": "staff" }}Malformed body — missing or empty token, or a password shorter than 12 characters or longer than 1024.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}Invite token unknown, already used, or expired.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}Rate limit exceeded.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}