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/healthHealth check
/healthExample 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/healthHealth check (versioned)
/v1/healthExample 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/loginSign in with email and password
/v1/auth/loginExample 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/refreshRotate a refresh token
/v1/auth/refreshExample 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/logoutRevoke a refresh token
/v1/auth/logoutExample 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-resetValidate a password reset token
/v1/auth/password-resetExample 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
| Name | In | Type | Description |
|---|---|---|---|
| token* | query | string | — |
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-resetRequest a password reset
/v1/auth/password-resetExample 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/confirmConfirm a password reset
/v1/auth/password-reset/confirmExample 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/inviteValidate an invite token
/v1/auth/inviteExample 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
| Name | In | Type | Description |
|---|---|---|---|
| token* | query | string | — |
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/acceptAccept an invite and create a session
/v1/auth/invite/acceptExample 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/meCurrent account, user profile, and service memberships
/v1/meExample 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
| Name | In | Type | Description |
|---|---|---|---|
| app | query | string | Optional 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/organisationsList organisations visible to the current account
/v1/organisationsExample 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
| Name | In | Type | Description |
|---|---|---|---|
| limit | query | integer | — |
| cursor | query | string | — |
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/organisationsCreate an organisation
/v1/organisationsExample 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
/v1/organisations/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/organisations/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/organisations/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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/organisationGet the current organisation context
/v1/organisationExample 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/organisationUpdate the current organisation
/v1/organisationExample 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/usersList people
/v1/usersExample 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
| Name | In | Type | Description |
|---|---|---|---|
| limit | query | integer | — |
| cursor | query | string | — |
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/usersCreate a person
/v1/usersExample 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}/inviteResend invite (set password)
/v1/users/{id}/inviteExample 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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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}/inviteRevoke a pending invite
/v1/users/{id}/inviteExample 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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/users/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/users/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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-groupsList location groups
/v1/location-groupsExample 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
| Name | In | Type | Description |
|---|---|---|---|
| limit | query | integer | — |
| cursor | query | string | — |
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-groupsCreate a location group
/v1/location-groupsExample 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
/v1/location-groups/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/location-groups/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/location-groups/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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/locationsList locations
/v1/locationsExample 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
| Name | In | Type | Description |
|---|---|---|---|
| limit | query | integer | — |
| cursor | query | string | — |
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/locationsCreate a location
/v1/locationsExample 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
/v1/locations/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/locations/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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
/v1/locations/{id}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
| Name | In | Type | Description |
|---|---|---|---|
| id* | path | string | — |
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/membershipsList service roles for the current user
/v1/membershipsExample 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
| Name | In | Type | Description |
|---|---|---|---|
| userId | query | string | — |
| service | query | string | — |
| orgId | query | string | — |
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/membershipsAssign a service role
/v1/membershipsExample 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/rosterList service roles for all users (paginated)
/v1/memberships/rosterExample 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
| Name | In | Type | Description |
|---|---|---|---|
| limit | query | integer | — |
| cursor | query | string | — |
| service | query | string | — |
| orgId | query | string | Filter 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/auditAudit trail
/v1/auditExample 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
| Name | In | Type | Description |
|---|---|---|---|
| limit | query | integer | — |
| cursor | query | string | — |
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