API docs / API reference / Portal logins
Sign a customer in
POST /v1/portal/login
Called by your portal’s server with your key. Answers a session token (amk_cs_…) valid 30 days while used. With it as the bearer, /v1 reaches only that client’s audits and link campaigns, as far as its access allows, with prices and credits left out; anything else answers 403. Eight wrong passwords lock the login for 15 minutes.
Body
| email required string | — |
| password required string | — |
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/login" \
-H "Authorization: Bearer $AMARKOS_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "dana@acme-tools.com",
"password": "a-long-password"
}'Response · 200
{
"token": "amk_cs_…",
"expires_at": "2027-01-01T09:00:00Z",
"user": {
"id": "cu_3c4d5e6f7a8b49c0d1e2f3a4b5c6d7e8",
"client_id": "cl_8a1b2c3d4e5f40a1b2c3d4e5f6a7b8c9",
"email": "dana@acme-tools.com",
"name": "Dana Reed",
"access": {
"audits": "run",
"links": "act",
"scans_per_month": 4,
"max_pages": 200
},
"status": "active",
"last_login_at": null,
"created_at": "2026-12-02T09:00:00Z"
},
"client": {
"id": "cl_8a1b2c3d4e5f40a1b2c3d4e5f6a7b8c9",
"name": "Acme Tools"
}
}