loginos

Reference

Management API

Members, roles, blocking and account links, from your server with your app key and secret.

The Management API lets your server read and change your platform: list and search members, change roles, block people, link their loginos account to your own user ids, and manage any number of domains. The full specification is also available as OpenAPI 3.1.

Authentication

Use HTTP Basic auth with your app key as the user name and your app secret as the password. Only call the API from your server.

curl
curl https://loginos.io/api/v1/users -u "YOUR_APP_KEY:YOUR_APP_SECRET"
  • Answers are JSON with snake_case fields. Times are ISO 8601 in UTC.
  • Errors look like { "error": "not_found", "error_description": "No member with this id." }, with a matching HTTP status.
  • Each platform can make 600 requests a minute. Beyond that you get 429 rate_limited and a Retry-After header.
  • A member’s id is their loginos sub.

The member object

Member
{
  "id": "9b1f6c2e-5d1a-4b7e-9a51-0e6f3f6c1d2a",
  "external_id": "u_1842",
  "external_label": "jane@example.com",
  "linked_at": "2026-10-09T13:29:33.997Z",
  "username": "jane",
  "name": "Jane Doe",
  "picture": "https://loginos.io/api/avatars/9b1f6c2e-…?v=…",
  "email": "jane@example.com",
  "roles": ["member"],
  "first_domain": "app.example.com",
  "last_domain": "example.net",
  "sign_in_count": 12,
  "joined_at": "2026-09-01T08:12:44.120Z",
  "last_sign_in_at": "2026-10-09T13:29:31.002Z",
  "blocked": false,
  "removed_access": false
}
Field
external_idYour own id for this person, once their accounts are linked. null otherwise. See Link existing accounts.
emailnull unless the person shared their email with your platform.
removed_accessThe person removed your platform from their loginos dashboard. They can’t sign in until they approve you again.
blockedYou blocked them.

Members

GET/api/v1/users

Your members, newest first, 25 per page.

Query
qSearch by name, username, shared email, or exact external_id.
filterall (default), active, blocked or revoked (removed access).
external_idOnly the member linked to this id of yours.
pageFrom 0.
Response
{
  "data": [
    { "id": "9b1f6c2e-…", "external_id": "u_1842", "username": "jane", "roles": ["member"] }
  ],
  "page": 0,
  "has_more": false
}

GET/api/v1/users/{id}

One member, with permissions (from their roles) and the scopes they shared with you. 404 not_found if they never joined your platform.

PUT/api/v1/users/{id}/roles

Replaces the member’s roles. Body: { "roles": ["editor"] } with role keys. Answers { "id": "…", "roles": ["editor"] }. Unknown keys: 400 unknown_role. The change shows in tokens from their next sign-in.

POST/api/v1/users/{id}/block

Signs them out of your platform and keeps them out. Optional body: { "reason": "Spam" } (only you see it). Answers { "id": "…", "blocked": true }.

DELETE/api/v1/users/{id}/block

Lets them sign in again. Answers { "id": "…", "blocked": false }.

PUT/api/v1/users/{id}/external-id

Puts your own user id on a member, so their tokens carry it as external_id: for people who joined with loginos before you had an account for them.

Body
{ "external_id": "u_1843", "external_label": "sam@example.com" }

external_id is 1 to 128 visible characters; external_label is optional, up to 120. Answers { "id", "external_id", "external_label" }. If another member already has that id: 409 external_id_taken.

DELETE/api/v1/users/{id}/external-id

Removes the link; the person stays a member. Answers { "id": "…", "external_id": null }.

Domains

A platform can have any number of domains. Register them from your server as your customers bring their own, cover every subdomain at once with a wildcard, or let your server confirm new ones as people sign in (see Domains).

GET/api/v1/domains

Your domains, 50 per page, newest first with wildcards on top. Query: q (search) and page. automatic marks domains loginos added after your server said yes; confirmed_at is when it last did.

Response
{
  "data": [
    {
      "host": "*.shops.example",
      "wildcard": true,
      "verified": false,
      "verified_at": null,
      "created_at": "2026-10-09T14:15:47.255Z",
      "verification": { "type": "TXT", "name": "_loginos.shops.example", "value": "loginos-verify=mNP1oHKAr8…" },
      "automatic": false,
      "confirmed_at": null
    },
    { "host": "tenant42.example.com", "wildcard": false, "verified": true, "verified_at": null, "created_at": "…", "verification": null, "automatic": true, "confirmed_at": "…" }
  ],
  "page": 0,
  "has_more": true,
  "total": 5007
}

POST/api/v1/domains

Adds one domain, { "host": "tenant42.example.com" }, or up to 1,000 at once, { "hosts": [...] }. Hosts that are already there are fine, so you can call it every time a customer connects a domain; an automatic one becomes a regular domain. Answers 201 when something was added:

Response
{ "added": ["tenant42.example.com"], "existing": [], "invalid": [], "data": [ { "host": "tenant42.example.com", "…": "…" } ] }

A wildcard (*.example.com) comes back with the TXT record that verifies it. Until it is verified it matches nothing.

GET/api/v1/domains/{host}

One domain. A wildcard can be written as is or URL-encoded: /api/v1/domains/%2A.shops.example.

POST/api/v1/domains/{host}/verify

Looks up a wildcard’s TXT record now and answers with verified: true once it is found. DNS changes can take a few minutes to show up; up to 30 checks a minute.

DELETE/api/v1/domains/{host}

Sign-ins from that domain stop at once. The last domain can’t be removed (409 last_domain).

Roles

GET/api/v1/roles

Your roles and permissions:

Response
{
  "data": [
    { "key": "editor", "name": "Editor", "description": null, "default": false, "members": 4, "permissions": ["posts:read", "posts:write"] }
  ],
  "permissions": [
    { "key": "posts:read", "description": "Read posts" },
    { "key": "posts:write", "description": null }
  ]
}

Roles and permissions themselves are created in the console.

Errors

StatuserrorWhen
400invalid_requestA missing or malformed parameter or body.
400unknown_roleA role key that doesn’t exist on your platform.
401invalid_clientWrong or missing app key or secret.
404not_foundNo member with this id, or no such domain, on your platform.
409external_id_takenAnother member already has this external_id.
409last_domainThe platform’s only domain can’t be removed.
503dns_unavailableDNS couldn’t be reached to verify a wildcard. Try again in a minute.
429rate_limitedMore than 600 requests in a minute. Wait for Retry-After seconds.