Skip to content

Mobile App — Users

Management endpoints for mobile app users — the per-workspace staff/operator accounts that pair devices to the in-store mobile app. These endpoints are used by the web dashboard to create users, send pairing codes, and manage active device sessions.

Auth: All endpoints on this page require a Bearer token belonging to a member of the target workspace (createWorkspaceGuard, path-sourced workspaceId). They are distinct from the mobile-app session endpoints in Config & Runtime and Authentication, which use the X-Mobile-Token header.

A mobile app user moves through statuses: pendingpaired (after a successful pairing-code exchange) / active, and may be suspended. Users may be created standalone or linked to an existing Directus workspace user (linked_user_id).

SDK methods live on wh.mobileAppUsers (MobileAppUsersService).


List mobile app users

GET /wallethero-api/workspace/:workspaceId/mobile-app-users

Lists mobile app users for a workspace, newest first, with a total count in meta.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier

Query Parameters

ParameterTypeRequiredDefaultDescription
limitnumberNo50Max items to return
offsetnumberNo0Pagination offset
searchstringNoFree-text search across user fields
statusstringNoFilter by status (pending | paired | active | suspended)

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users?limit=25&status=active" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": [
    {
      "id": "9d1b...",
      "workspace_id": "WORKSPACE_ID",
      "email": "[email protected]",
      "phone": null,
      "first_name": "Sam",
      "last_name": "Taylor",
      "status": "active",
      "linked_user_id": null,
      "paired_at": "2026-06-10T08:30:00.000Z",
      "last_login": "2026-06-16T09:00:00.000Z"
    }
  ],
  "meta": { "total": 1, "limit": 25, "offset": 0 }
}

SDK

typescript
const res = await wh.mobileAppUsers.list(workspaceId, { limit: 25, status: "active" });

Create a mobile app user

POST /wallethero-api/workspace/:workspaceId/mobile-app-users

Creates a standalone mobile app user in the workspace with status pending. At least one of email or phone is required. Rejects duplicates that share an email or phone with an existing user in the same workspace.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier

Request Body

FieldTypeRequiredDescription
emailstring (email)ConditionalRequired if phone is omitted
phonestringConditionalRequired if email is omitted
first_namestringNoFirst name
last_namestringNoLast name
metadataobjectNoArbitrary metadata

Example Request

bash
curl -X POST "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "email": "[email protected]", "first_name": "Sam", "last_name": "Taylor" }'

Response (201)

json
{
  "data": {
    "id": "9d1b...",
    "workspace_id": "WORKSPACE_ID",
    "email": "[email protected]",
    "first_name": "Sam",
    "last_name": "Taylor",
    "status": "pending"
  }
}

SDK

typescript
const res = await wh.mobileAppUsers.create(workspaceId, {
  email: "[email protected]",
  first_name: "Sam",
  last_name: "Taylor",
});

Get a mobile app user

GET /wallethero-api/workspace/:workspaceId/mobile-app-users/:userId

Returns a single mobile app user scoped to the workspace.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier
userIdstring (UUID)Mobile app user identifier

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/USER_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{ "data": { "id": "USER_ID", "email": "[email protected]", "status": "active" } }

SDK

typescript
const res = await wh.mobileAppUsers.get(workspaceId, userId);

Update a mobile app user

PATCH /wallethero-api/workspace/:workspaceId/mobile-app-users/:userId

Updates a mobile app user's profile or status. All fields optional.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier
userIdstring (UUID)Mobile app user identifier

Request Body

FieldTypeRequiredDescription
emailstring (email)NoEmail
phonestringNoPhone
first_namestringNoFirst name
last_namestringNoLast name
statusstringNoOne of pending | paired | active | suspended
metadataobjectNoArbitrary metadata

Example Request

bash
curl -X PATCH "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/USER_ID" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "status": "suspended" }'

Response (200)

json
{ "data": { "id": "USER_ID", "status": "suspended" } }

SDK

typescript
const res = await wh.mobileAppUsers.update(workspaceId, userId, { status: "suspended" });
// Convenience: wh.mobileAppUsers.suspend(workspaceId, userId) / .activate(workspaceId, userId)

Delete a mobile app user

DELETE /wallethero-api/workspace/:workspaceId/mobile-app-users/:userId

Deletes the user and cascades: all of their sessions and pairing codes are removed first.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier
userIdstring (UUID)Mobile app user identifier

Example Request

bash
curl -X DELETE "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/USER_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{ "message": "Mobile app user deleted successfully" }

SDK

typescript
await wh.mobileAppUsers.delete(workspaceId, userId);

Send a pairing code

POST /wallethero-api/workspace/:workspaceId/mobile-app-users/:userId/send-pairing-code

Generates a fresh 6-digit pairing code for the user and (optionally) delivers it by SMS and/or email. Any pending codes for the user are revoked first. Rate-limited to a maximum number of codes per hour per user. When delivery_method is none, the plaintext code is returned in the response (for manual entry). The code is later exchanged at POST /mobile-app/auth/pair (see Authentication).

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier
userIdstring (UUID)Mobile app user identifier

Request Body

FieldTypeRequiredDefaultDescription
delivery_methodstringNoemailOne of sms | email | both | none. sms/both require the user to have a phone; email/both require an email.

Example Request

bash
curl -X POST "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/USER_ID/send-pairing-code" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "delivery_method": "email" }'

Response (200)

json
{
  "message": "Pairing code sent",
  "pairing_code_id": "abc1...",
  "delivery_results": { "email": true },
  "expires_at": "2026-06-16T09:15:00.000Z"
}

With delivery_method: "none" the response additionally includes "code": "482915".

SDK

typescript
const res = await wh.mobileAppUsers.sendPairingCode(workspaceId, userId, { delivery_method: "email" });

List sessions for a user

GET /wallethero-api/workspace/:workspaceId/mobile-app-users/:userId/sessions

Lists the user's active (non-revoked) device sessions, most recently active first.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier
userIdstring (UUID)Mobile app user identifier

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/USER_ID/sessions" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": [
    {
      "id": "sess1...",
      "mobile_app_user_id": "USER_ID",
      "workspace_id": "WORKSPACE_ID",
      "device_name": "Front Desk iPad",
      "device_os": "iPadOS 17",
      "last_active_at": "2026-06-16T09:00:00.000Z",
      "expires_at": "2026-07-16T08:30:00.000Z"
    }
  ]
}

SDK

typescript
const res = await wh.mobileAppUsers.listSessions(workspaceId, userId);

Revoke a session

DELETE /wallethero-api/workspace/:workspaceId/mobile-app-users/:userId/sessions/:sessionId

Revokes a single device session (sets revoked_at). The session must belong to the given user and workspace.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier
userIdstring (UUID)Mobile app user identifier
sessionIdstring (UUID)Session identifier

Example Request

bash
curl -X DELETE "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/USER_ID/sessions/SESSION_ID" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{ "message": "Session revoked successfully" }

SDK

typescript
await wh.mobileAppUsers.revokeSession(workspaceId, userId, sessionId);
// Convenience: wh.mobileAppUsers.revokeAllSessions(workspaceId, userId)

Create a user from an existing workspace user

POST /wallethero-api/workspace/:workspaceId/mobile-app-users/from-workspace-user

Creates a mobile app user linked (linked_user_id) to an existing Directus workspace member, copying their email and name. The target must be a member of the workspace and must not already be linked to a mobile app user. The new user starts as pending.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier

Request Body

FieldTypeRequiredDescription
workspace_user_idstring (UUID)YesDirectus user id of the workspace member to link

Example Request

bash
curl -X POST "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/mobile-app-users/from-workspace-user" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "workspace_user_id": "DIRECTUS_USER_ID" }'

Response (201)

json
{
  "data": {
    "id": "9d1b...",
    "workspace_id": "WORKSPACE_ID",
    "email": "[email protected]",
    "linked_user_id": "DIRECTUS_USER_ID",
    "status": "pending"
  }
}

SDK

typescript
const res = await wh.mobileAppUsers.createFromWorkspaceUser(workspaceId, {
  workspace_user_id: "DIRECTUS_USER_ID",
});

List linkable workspace users

GET /wallethero-api/workspace/:workspaceId/linkable-users

Lists workspace members who are not yet linked to a mobile app user — i.e. candidates for from-workspace-user.

Auth: Bearer token — workspace member.

Path Parameters

ParameterTypeDescription
workspaceIdstring (UUID)Workspace identifier

Example Request

bash
curl "https://api.wallethero.app/wallethero-api/workspace/WORKSPACE_ID/linkable-users" \
  -H "Authorization: Bearer YOUR_TOKEN"

Response (200)

json
{
  "data": [
    { "id": "DIRECTUS_USER_ID", "email": "[email protected]", "first_name": "Alex", "last_name": "Lee" }
  ]
}

SDK

typescript
const res = await wh.mobileAppUsers.listLinkableUsers(workspaceId);

WalletHero Documentation