Introduction

Directory API

Overview

Source of truth for people, locations, login, and per-service roles.

Authenticate with Authorization: Bearer <jwt>. Claims: actorId.

Domain Workers resolve actorType from GET /v1/memberships?service=....

Integration guide: Directory service docs

OpenAPI v0.1.0 · source openapi/directory.json

OpenAPI 3.0.0 · v0.1.0 · 38 operations

Operations

System

Liveness and generated documentation.

get/health

Health check

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/health"

Unauthenticated liveness probe.

Operation ID: getHealth

Responses

  • 200

    Service is running

    application/json

get/v1/health

Health check (versioned)

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/health"

Operation ID: getHealthV1

Responses

  • 200

    Service is running

    application/json

Auth

Login, refresh, password reset, and current session.

post/v1/auth/login

Sign in with email and password

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/auth/login"

Operation ID: login

Request body(required)

  • application/jsonLoginRequest

Responses

  • 200

    Session

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/auth/refresh

Rotate a refresh token

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/auth/refresh"

Operation ID: refresh

Request body(required)

  • application/jsonRefreshRequest

Responses

  • 200

    New session

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/auth/logout

Revoke a refresh token

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/auth/logout"

Operation ID: logout

Request body

  • application/jsonLogoutRequest

Responses

  • 200

    Signed out

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/auth/password-reset

Validate a password reset token

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/auth/password-reset"

Operation ID: validatePasswordReset

Parameters

NameInTypeDescription
token*querystring—

Responses

  • 200

    Reset token is valid

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/auth/password-reset

Request a password reset

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/auth/password-reset"

Operation ID: requestPasswordReset

Request body(required)

  • application/jsonPasswordResetRequest

Responses

  • 200

    Always ok

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/auth/password-reset/confirm

Confirm a password reset

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/auth/password-reset/confirm"

Operation ID: confirmPasswordReset

Request body(required)

  • application/jsonPasswordResetConfirm

Responses

  • 200

    Password updated

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/auth/invite

Validate an invite token

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/auth/invite"

Operation ID: validateInvite

Parameters

NameInTypeDescription
token*querystring—

Responses

  • 200

    Invite token is valid

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/auth/invite/accept

Accept an invite and create a session

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/auth/invite/accept"

Operation ID: acceptInvite

Request body(required)

  • application/jsonInviteAccept

Responses

  • 200

    Session

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/me

Current account, user profile, and service memberships

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/me"

Session context for the bearer JWT. Optional `?app=` applies the same product access check as login (for debugging); clients normally use login/refresh with `app` instead.

Operation ID: getMe

Parameters

NameInTypeDescription
appquerystringOptional product id; when present, returns 403 if this account cannot use that app.

Responses

  • 200

    Current session context

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

Organisations

Tenant organisations and current-org context.

get/v1/organisations

List organisations visible to the current account

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/organisations"

Operation ID: listOrganisations

Parameters

NameInTypeDescription
limitqueryinteger—
cursorquerystring—

Responses

  • 200

    Organisations

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/organisations

Create an organisation

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/organisations"

Operation ID: createOrganisation

Request body(required)

  • application/jsonOrganisationWrite

Responses

  • 201

    Created organisation

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/organisations/{id}

Get an organisation

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/organisations/example-id"

Operation ID: getOrganisation

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Organisation

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

patch/v1/organisations/{id}

Update an organisation

Example request

curl -sS \
  -X PATCH \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{
  
}' \
  "https://api.mayawealth.co.uk/directory/v1/organisations/example-id"

Operation ID: patchOrganisation

Parameters

NameInTypeDescription
id*pathstring—

Request body(required)

  • application/jsonobject

Responses

  • 200

    Updated organisation

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

delete/v1/organisations/{id}

Delete an organisation

Example request

curl -sS \
  -X DELETE \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/organisations/example-id"

Operation ID: deleteOrganisation

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Deleted

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/organisation

Get the current organisation context

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/organisation"

Operation ID: getCurrentOrganisation

Responses

  • 200

    Current organisation

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

put/v1/organisation

Update the current organisation

Example request

curl -sS \
  -X PUT \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/organisation"

Operation ID: updateCurrentOrganisation

Request body(required)

  • application/jsonOrganisationWrite

Responses

  • 200

    Updated organisation

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

Users

People records shared by domain APIs.

get/v1/users

List people

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/users"

Operation ID: listUsers

Parameters

NameInTypeDescription
limitqueryinteger—
cursorquerystring—

Responses

  • 200

    People

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/users

Create a person

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/users"

Creates a person record. When `email` is set and `password` is omitted, sends an invite so they can set their password (same flow as POST /v1/users/{id}/invite). Pass `invite: false` to create a roster-only person with no email step. Pass `password` only for local bootstrap/dev.

Operation ID: createUser

Request body(required)

  • application/jsonUserCreate

Responses

  • 201

    Created person

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/users/{id}/invite

Resend invite (set password)

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/users/example-id/invite"

Resends the invite email for an existing person (same token flow as create-with-email). Use after create or when an invite expired.

Operation ID: inviteUser

Parameters

NameInTypeDescription
id*pathstring—

Request body(required)

  • application/jsonInviteRequest

Responses

  • 200

    Invite queued

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

delete/v1/users/{id}/invite

Revoke a pending invite

Example request

curl -sS \
  -X DELETE \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/users/example-id/invite"

Operation ID: revokeInvite

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Updated person

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/users/{id}

Get a person

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/users/example-id"

Operation ID: getUser

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Person

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

patch/v1/users/{id}

Update a person

Example request

curl -sS \
  -X PATCH \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/users/example-id"

Operation ID: patchUser

Parameters

NameInTypeDescription
id*pathstring—

Request body(required)

  • application/jsonUserPatch

Responses

  • 200

    Updated person

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

Location groups

get/v1/location-groups

List location groups

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/location-groups"

Operation ID: listLocationGroups

Parameters

NameInTypeDescription
limitqueryinteger—
cursorquerystring—

Responses

  • 200

    Location groups

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/location-groups

Create a location group

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/location-groups"

Operation ID: createLocationGroup

Request body(required)

  • application/jsonLocationGroupWrite

Responses

  • 201

    Created location group

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/location-groups/{id}

Get a location group

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/location-groups/example-id"

Operation ID: getLocationGroup

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Location group

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

patch/v1/location-groups/{id}

Update a location group

Example request

curl -sS \
  -X PATCH \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{
  
}' \
  "https://api.mayawealth.co.uk/directory/v1/location-groups/example-id"

Operation ID: patchLocationGroup

Parameters

NameInTypeDescription
id*pathstring—

Request body(required)

  • application/jsonobject

Responses

  • 200

    Updated location group

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

delete/v1/location-groups/{id}

Delete a location group

Example request

curl -sS \
  -X DELETE \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/location-groups/example-id"

Operation ID: deleteLocationGroup

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Deleted

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

Locations

Physical places (kind: workplace, venue, construction_site, shop, other).

get/v1/locations

List locations

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/locations"

Operation ID: listLocations

Parameters

NameInTypeDescription
limitqueryinteger—
cursorquerystring—

Responses

  • 200

    Locations

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

post/v1/locations

Create a location

Example request

curl -sS \
  -X POST \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/locations"

Operation ID: createLocation

Request body(required)

  • application/jsonLocationWrite

Responses

  • 201

    Created location

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/locations/{id}

Get a location

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/locations/example-id"

Operation ID: getLocation

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Location

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

patch/v1/locations/{id}

Update a location

Example request

curl -sS \
  -X PATCH \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{
  
}' \
  "https://api.mayawealth.co.uk/directory/v1/locations/example-id"

Operation ID: patchLocation

Parameters

NameInTypeDescription
id*pathstring—

Request body(required)

  • application/jsonobject

Responses

  • 200

    Updated location

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

delete/v1/locations/{id}

Delete a location

Example request

curl -sS \
  -X DELETE \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/locations/example-id"

Operation ID: deleteLocation

Parameters

NameInTypeDescription
id*pathstring—

Responses

  • 200

    Deleted

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

Memberships

Per-service roles.

get/v1/memberships

List service roles for the current user

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/memberships"

Returns Directory service memberships. Callers see their own rows. `admin` may pass `userId` to inspect another person. Filter with `service` (hr, venue, training, planning, tickets, expense, signage).

Operation ID: listMyMemberships

Parameters

NameInTypeDescription
userIdquerystring—
servicequerystring—
orgIdquerystring—

Responses

  • 200

    Memberships

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

put/v1/memberships

Assign a service role

Example request

curl -sS \
  -X PUT \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  "https://api.mayawealth.co.uk/directory/v1/memberships"

Operation ID: upsertMembership

Request body(required)

  • application/jsonMembershipWrite

Responses

  • 200

    Memberships

    application/json

  • 400

    Malformed request. `error.code` is typically INVALID_REQUEST.

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 404

    The requested resource was not found. `error.code` is NOT_FOUND or a resource-specific *_NOT_FOUND value.

    application/json

  • 409

    Conflict. `error.code`: CONFLICT or EMAIL_IN_USE.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

get/v1/memberships/roster

List service roles for all users (paginated)

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/memberships/roster"

Returns service membership rows for every organisation you can manage (admin, manager, or area-manager). Omit `orgId` to aggregate across all accessible orgs. Platform administrators see all active orgs.

Operation ID: listOrgMembershipRoster

Parameters

NameInTypeDescription
limitqueryinteger—
cursorquerystring—
servicequerystring—
orgIdquerystringFilter to one organisation. Omit to include every org you can manage.

Responses

  • 200

    Membership roster

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json

Audit

Audit trail for directory changes.

get/v1/audit

Audit trail

Example request

curl -sS \
  -X GET \
  -H "Accept: application/json" \
  -H "Authorization: Bearer <jwt>" \
  "https://api.mayawealth.co.uk/directory/v1/audit"

Lists audit events for the organisation in the JWT (`orgId`).

Operation ID: listDirectoryAudit

Parameters

NameInTypeDescription
limitqueryinteger—
cursorquerystring—

Responses

  • 200

    Audit events

    application/json

  • 401

    Missing or invalid JWT. `error.code`: UNAUTHORIZED. Send `Authorization: Bearer <jwt>`.

    application/json

  • 403

    Authenticated but not permitted. `error.code`: FORBIDDEN. Roles: admin, area-manager, manager, member.

    application/json

  • 422

    Validation failed. `error.code`: VALIDATION_ERROR.

    application/json

  • 429

    Rate limit exceeded. `error.code`: RATE_LIMITED.

    application/json

  • 500

    Unexpected server error. `error.code`: INTERNAL.

    application/json