API docs / API reference / Portal logins
Choose a password from a link
POST /v1/portal/password-set
Uses the link once, ends the login’s other sessions, and signs it in: the same answer as /v1/portal/login.
Body
| token required string | — |
| password required string | At least 10 characters. |
Errors
| 410 link_expired |
Send an Idempotency-Key header to make a retry safe: the same key within 24 hours returns the first answer and is never charged twice.
Request
curl -X POST "https://amarkos.com/api/v1/portal/password-set" \ -H "Authorization: Bearer $AMARKOS_KEY"
Response · 200
{
"token": "amk_cs_…",
"expires_at": "2027-01-01T09:00:00Z",
"user": {
"id": "cu_3c4d5e6f7a8b49c0d1e2f3a4b5c6d7e8",
"email": "dana@acme-tools.com"
},
"client": {
"id": "cl_8a1b2c3d4e5f40a1b2c3d4e5f6a7b8c9",
"name": "Acme Tools"
}
}