API docs / API reference / Portal logins

Give a client a portal login

POST /v1/clients/{client_id}/users

Emails are unique across your clients. Either give a password (never shown again; send it to them yourself) or send_invite: they get an email from your portal mailbox (GET /v1/portal/settings) to choose one. The login is kept even if the email fails; the answer’s invite says why.

Path parameters

client_id required
string
—

Body

email required
string
—
password
string
At least 10 characters. Required unless send_invite.
send_invite
boolean
Email an invitation (a 7-day link) instead.
portal_url
https url
With send_invite: your portal’s address; the link goes to {portal_url}/#/set-password?token=….
product_name
string
What your portal is called, for the email.
name
string
—
access
object
What the login may do: audits none | view | run, links none | view | act, scans_per_month (0–1000), max_pages (10–5000). Default: view and view, 4 scans, 200 pages.

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/clients/{client_id}/users" \
  -H "Authorization: Bearer $AMARKOS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "dana@acme-tools.com",
    "name": "Dana Reed",
    "password": "a-long-password",
    "access": {
      "audits": "run",
      "links": "act"
    }
  }'

Response · 201

{
  "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"
}

← List a client's portal logins · Change a portal login →