PasskeyBase

API Reference

The Management API lets you programmatically manage users, passkeys, OAuth clients, and tenant settings. All requests require a Management API key.


Authentication

All Management API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_MANAGEMENT_API_KEY

You can create and manage API keys from the dashboard.


Base URL

https://{your-tenant}.auth.ing/api/v1

Users

List Users

Request
GET https://myapp.auth.ing/api/v1/users
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Response - 200 OK
{
  "data": [
    {
      "id": "usr_abc123",
      "external_id": "user_123",
      "display_name": "Jane Doe",
      "passkey_count": 2,
      "created_at": "2025-01-15T10:30:00Z",
      "last_login_at": "2025-03-20T14:22:00Z"
    }
  ],
  "pagination": {
    "total": 1,
    "page": 1,
    "per_page": 20
  }
}

Get User

Request
GET https://myapp.auth.ing/api/v1/users/usr_abc123
Authorization: Bearer YOUR_MANAGEMENT_API_KEY

Delete User

Deletes a user and all their associated passkeys.

Request
DELETE https://myapp.auth.ing/api/v1/users/usr_abc123
Authorization: Bearer YOUR_MANAGEMENT_API_KEY

Passkeys

List Passkeys

List all passkeys for a specific user.

Request
GET https://myapp.auth.ing/api/v1/users/usr_abc123/passkeys
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Response - 200 OK
{
  "data": [
    {
      "id": "pk_xyz789",
      "user_id": "usr_abc123",
      "credential_id": "base64url-encoded-id",
      "device_name": "iPhone 15 Pro",
      "authenticator_type": "platform",
      "created_at": "2025-01-15T10:35:00Z",
      "last_used_at": "2025-03-20T14:22:00Z"
    }
  ]
}

Delete Passkey

Revoke a specific passkey. The credential will no longer be accepted for authentication.

Request
DELETE https://myapp.auth.ing/api/v1/users/usr_abc123/passkeys/pk_xyz789
Authorization: Bearer YOUR_MANAGEMENT_API_KEY

Clients

List Clients

Request
GET https://myapp.auth.ing/api/v1/clients
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Response - 200 OK
{
  "data": [
    {
      "id": "pk_live_abc123",
      "name": "My Web App",
      "redirect_uris": [
        "https://myapp.com/callback",
        "http://localhost:3000/callback"
      ],
      "created_at": "2025-01-10T08:00:00Z"
    }
  ]
}

Create Client

Request
POST https://myapp.auth.ing/api/v1/clients
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Content-Type: application/json

{
  "name": "My Mobile App",
  "redirect_uris": [
    "myapp://callback"
  ]
}

Enrollment Tokens

Create Enrollment Token

Create a one-time token for enrolling a passkey for an existing user. See the Enrollment guide for the full flow.

Request
POST https://myapp.auth.ing/api/v1/enrollment-tokens
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Content-Type: application/json

{
  "external_id": "user_123",
  "display_name": "Jane Doe",
  "expires_in": 3600
}
Response - 201 Created
{
  "token": "enroll_tok_abc123...",
  "expires_at": "2025-03-20T15:22:00Z"
}

Settings

Get Tenant Settings

GET https://myapp.auth.ing/api/v1/settings
Response - 200 OK
{
  "tenant_id": "ten_abc123",
  "domain": "myapp.auth.ing",
  "display_name": "My App",
  "logo_url": "https://myapp.com/logo.png",
  "primary_color": "#1a56db",
  "custom_domain": null,
  "created_at": "2025-01-10T08:00:00Z"
}

Update Tenant Settings

Request
PATCH https://myapp.auth.ing/api/v1/settings
Authorization: Bearer YOUR_MANAGEMENT_API_KEY
Content-Type: application/json

{
  "display_name": "My App",
  "logo_url": "https://myapp.com/logo.png",
  "primary_color": "#1a56db",
  "custom_domain": "auth.myapp.com"
}

Errors

All errors return a JSON object with error,message, andstatus fields.

Error Response
{
  "error": "not_found",
  "message": "User not found",
  "status": 404
}
StatusErrorDescription
400bad_requestInvalid request parameters
401unauthorizedMissing or invalid API key
403forbiddenInsufficient permissions
404not_foundResource not found
429rate_limitedToo many requests
500internal_errorServer error