> For the complete documentation index, see [llms.txt](https://docs.thewalletcrew.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thewalletcrew.io/api-reference/internal/access-and-security/users.md).

# Users

## List users

> Includes pending invitations (\`lastLogin\` null).

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.access:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"TenantUser":{"required":["email","id"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"User id, used as `userId` by the other endpoints."},"email":{"minLength":1,"type":"string","description":"Sign-in e-mail, shared across tenants."},"name":{"type":["null","string"],"description":"Display name, shared across tenants; null when none."},"blocked":{"type":"boolean","description":"Whether the account is blocked from signing in to any tenant. Read-only."},"lastLogin":{"type":["null","string"],"description":"Last sign-in to any tenant; null when never signed in (e.g. invitation not yet used).","format":"date-time"},"tenantRole":{"type":["null","string"],"description":"Role on this tenant (`administrator` for a tenant administrator); null when none."}},"additionalProperties":false,"description":"An admin console user, as seen from this tenant."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/users":{"get":{"tags":["Users"],"summary":"List users","description":"Includes pending invitations (`lastLogin` null).","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Users returned.","content":{"text/plain":{"schema":{"type":"array","items":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}}},"application/json":{"schema":{"type":"array","items":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}}},"text/json":{"schema":{"type":"array","items":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the `tenant.access:read` scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"The tenant does not exist.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Invite user

> Creates a user or attaches an existing one to this tenant. If the user already has access and has signed in, returns 409; if they never signed in, the role is updated and a new invitation e-mail is sent (retry or correct the role).\
> A new account, or one that has not been activated, gets an invitation e-mail (see the invitation endpoints); an activated account gets an "access granted" e-mail.\
> Example: \`{ "email": "<jane@example.com>", "role": "administrator" }\`.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.access:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"CreateTenantUserRequest":{"required":["email","role"],"type":"object","properties":{"email":{"minLength":1,"type":"string","description":"User e-mail. An existing account with this address is reused, otherwise one is created."},"name":{"maxLength":200,"type":["null","string"],"description":"Display name, up to 200 characters. Used only when a new account is created."},"role":{"minLength":1,"type":"string","description":"Role to grant on this tenant: `administrator` or a tenant role, case-insensitive. Else 400."},"language":{"type":["null","string"],"description":"Admin console language of the invitee, used only when no account exists yet. English when omitted or unsupported."}},"additionalProperties":false,"description":"Request body to invite a user."},"TenantUser":{"required":["email","id"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"User id, used as `userId` by the other endpoints."},"email":{"minLength":1,"type":"string","description":"Sign-in e-mail, shared across tenants."},"name":{"type":["null","string"],"description":"Display name, shared across tenants; null when none."},"blocked":{"type":"boolean","description":"Whether the account is blocked from signing in to any tenant. Read-only."},"lastLogin":{"type":["null","string"],"description":"Last sign-in to any tenant; null when never signed in (e.g. invitation not yet used).","format":"date-time"},"tenantRole":{"type":["null","string"],"description":"Role on this tenant (`administrator` for a tenant administrator); null when none."}},"additionalProperties":false,"description":"An admin console user, as seen from this tenant."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/users":{"post":{"tags":["Users"],"summary":"Invite user","description":"Creates a user or attaches an existing one to this tenant. If the user already has access and has signed in, returns 409; if they never signed in, the role is updated and a new invitation e-mail is sent (retry or correct the role).\nA new account, or one that has not been activated, gets an invitation e-mail (see the invitation endpoints); an activated account gets an \"access granted\" e-mail.\nExample: `{ \"email\": \"jane@example.com\", \"role\": \"administrator\" }`.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"Invitee e-mail, role and optional name and language.","content":{"application/json":{"schema":{"description":"Request body to invite a user.","$ref":"#/components/schemas/CreateTenantUserRequest"}},"text/json":{"schema":{"description":"Request body to invite a user.","$ref":"#/components/schemas/CreateTenantUserRequest"}},"application/*+json":{"schema":{"description":"Request body to invite a user.","$ref":"#/components/schemas/CreateTenantUserRequest"}}}},"responses":{"201":{"description":"User created or attached, and the e-mail sent.","content":{"text/plain":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}},"application/json":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}},"text/json":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}}}},"400":{"description":"E-mail or role missing, role unknown on this tenant, or name over 200 characters.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The role grants permissions the caller does not hold.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"The tenant does not exist.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"409":{"description":"User already has access and has signed in.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## GET /api/{tenantId}/admin/users/{userId}

> Get user

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.access:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"TenantUser":{"required":["email","id"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"User id, used as `userId` by the other endpoints."},"email":{"minLength":1,"type":"string","description":"Sign-in e-mail, shared across tenants."},"name":{"type":["null","string"],"description":"Display name, shared across tenants; null when none."},"blocked":{"type":"boolean","description":"Whether the account is blocked from signing in to any tenant. Read-only."},"lastLogin":{"type":["null","string"],"description":"Last sign-in to any tenant; null when never signed in (e.g. invitation not yet used).","format":"date-time"},"tenantRole":{"type":["null","string"],"description":"Role on this tenant (`administrator` for a tenant administrator); null when none."}},"additionalProperties":false,"description":"An admin console user, as seen from this tenant."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/users/{userId}":{"get":{"tags":["Users"],"summary":"Get user","parameters":[{"name":"userId","in":"path","description":"User id, as returned in `id`.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"User returned.","content":{"text/plain":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}},"application/json":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}},"text/json":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the `tenant.access:read` scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No such user, or no access to this tenant.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Update user

> Replaces the role on this tenant and, when \`name\` is sent, the display name on every tenant. Sends no e-mail.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.access:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"UpdateTenantUserRequest":{"required":["role"],"type":"object","properties":{"name":{"maxLength":200,"type":["null","string"],"description":"New display name, up to 200 characters. Null keeps the current one; the name changes on every tenant."},"role":{"minLength":1,"type":"string","description":"Role to hold on this tenant, replacing the current one: `administrator` or a tenant role, case-insensitive. Else 400."}},"additionalProperties":false,"description":"Request body to update a user."},"TenantUser":{"required":["email","id"],"type":"object","properties":{"id":{"minLength":1,"type":"string","description":"User id, used as `userId` by the other endpoints."},"email":{"minLength":1,"type":"string","description":"Sign-in e-mail, shared across tenants."},"name":{"type":["null","string"],"description":"Display name, shared across tenants; null when none."},"blocked":{"type":"boolean","description":"Whether the account is blocked from signing in to any tenant. Read-only."},"lastLogin":{"type":["null","string"],"description":"Last sign-in to any tenant; null when never signed in (e.g. invitation not yet used).","format":"date-time"},"tenantRole":{"type":["null","string"],"description":"Role on this tenant (`administrator` for a tenant administrator); null when none."}},"additionalProperties":false,"description":"An admin console user, as seen from this tenant."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/users/{userId}":{"put":{"tags":["Users"],"summary":"Update user","description":"Replaces the role on this tenant and, when `name` is sent, the display name on every tenant. Sends no e-mail.","parameters":[{"name":"userId","in":"path","description":"User id, as returned in `id`.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"description":"New role and optional display name.","content":{"application/json":{"schema":{"description":"Request body to update a user.","$ref":"#/components/schemas/UpdateTenantUserRequest"}},"text/json":{"schema":{"description":"Request body to update a user.","$ref":"#/components/schemas/UpdateTenantUserRequest"}},"application/*+json":{"schema":{"description":"Request body to update a user.","$ref":"#/components/schemas/UpdateTenantUserRequest"}}}},"responses":{"200":{"description":"User updated.","content":{"text/plain":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}},"application/json":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}},"text/json":{"schema":{"description":"An admin console user, as seen from this tenant.","$ref":"#/components/schemas/TenantUser"}}}},"400":{"description":"Role missing or unknown on this tenant, or name over 200 characters.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The new or the current role grants permissions the caller does not hold.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"No such user, or no access to this tenant.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Remove user

> Removes the access to this tenant but keeps the account and its other tenants. A pending invitation stops working. Idempotent: an unknown id also returns 204.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.access:write"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/users/{userId}":{"delete":{"tags":["Users"],"summary":"Remove user","description":"Removes the access to this tenant but keeps the account and its other tenants. A pending invitation stops working. Idempotent: an unknown id also returns 204.","parameters":[{"name":"userId","in":"path","description":"User id, as returned in `id`.","required":true,"schema":{"type":"string"}},{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"User removed, or no such user."},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The user's role grants permissions the caller does not hold.","content":{"text/plain":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}},"text/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"The tenant does not exist.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```

## Get my profile and permissions on this tenant

> Profile, role and expanded permissions of the signed-in user on this tenant.

```json
{"openapi":"3.1.1","info":{"title":"The Wallet Crew internal API","version":"v1"},"tags":[{"name":"Users"}],"servers":[{"url":"https://api.thewalletcrew.io","description":"Production Server"},{"url":"https://api-qa.thewalletcrew.io","description":"Staging Server"}],"security":[{"admin-bearer":["tenant.core:read"]},{"apiKey":[]}],"components":{"securitySchemes":{"admin-bearer":{"type":"oauth2","flows":{"implicit":{"authorizationUrl":"https://auth.neostore.cloud/authorize?audience=https://app.neostore.cloud/api/","scopes":{}}}},"apiKey":{"type":"apiKey","name":"X-API-KEY","in":"header"}},"schemas":{"CurrentTenantUser":{"required":["email","permissions","userId"],"type":"object","properties":{"userId":{"minLength":1,"type":"string","description":"User id."},"email":{"minLength":1,"type":"string","description":"Sign-in e-mail."},"displayName":{"type":["null","string"],"description":"Display name; null when none."},"role":{"type":["null","string"],"description":"Role on this tenant: `globalAdministrator` for a global administrator, `administrator` for a tenant administrator."},"permissions":{"type":"array","items":{"type":"string"},"description":"Every scope held on this tenant, sorted, wildcards expanded: role permissions plus individual grants."}},"additionalProperties":false,"description":"The signed-in user, as seen from this tenant."},"ProblemDetails":{"type":"object","properties":{"type":{"type":["null","string"]},"title":{"type":["null","string"]},"status":{"type":["null","integer"],"format":"int32"},"detail":{"type":["null","string"]},"instance":{"type":["null","string"]}},"additionalProperties":{}},"HttpValidationProblemDetails":{"type":"object","allOf":[{"$ref":"#/components/schemas/ProblemDetails"}],"properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"additionalProperties":{}}}},"paths":{"/api/{tenantId}/admin/users/me":{"get":{"tags":["Users"],"summary":"Get my profile and permissions on this tenant","description":"Profile, role and expanded permissions of the signed-in user on this tenant.","parameters":[{"name":"tenantId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Profile and permissions returned.","content":{"text/plain":{"schema":{"description":"The signed-in user, as seen from this tenant.","$ref":"#/components/schemas/CurrentTenantUser"}},"application/json":{"schema":{"description":"The signed-in user, as seen from this tenant.","$ref":"#/components/schemas/CurrentTenantUser"}},"text/json":{"schema":{"description":"The signed-in user, as seen from this tenant.","$ref":"#/components/schemas/CurrentTenantUser"}}}},"401":{"description":"The caller is not authenticated.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"403":{"description":"The caller lacks the `tenant.core:read` scope.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"404":{"description":"The tenant does not exist.","content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}},"429":{"description":"Over 1200 requests per minute to this endpoint for the tenant (default limit); retry after `Retry-After`.","headers":{"Retry-After":{"description":"Seconds to wait before retrying. Sent when the limiter knows it.","schema":{"type":"integer"}}},"content":{"application/problem+json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ProblemDetails"},{"$ref":"#/components/schemas/HttpValidationProblemDetails"}]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.thewalletcrew.io/api-reference/internal/access-and-security/users.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
