MeVault пользователя

Vault пользователя

Возвращает Vault, в группах которого состоит пользователь, со структурой routes (только enabled-варианты). Если членства в нескольких Vault'ах — возвращается первый найденный (MVP: считаем что юзер в одном Vault). Используется landing-страницей юзера.

curl -X GET "https://policy-engine-rest.ezig.workers.dev/api/v1/me/vault" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "code": "example_string",
  "name": "John Doe",
  "description": "example_string",
  "walletServiceUrl": "example_string",
  "lockedAt": "2026-07-02T11:25:15.134Z",
  "networks": [
    {
      "id": "cmr3f41z20001psp7phmyapw3",
      "coinType": 195,
      "code": "tron_network",
      "name": "Tron"
    }
  ],
  "routes": [
    {
      "id": "cmr3f41z20001psp7phmyapw3",
      "vaultId": "example_string",
      "order": 0,
      "code": "purpose",
      "name": "John Doe",
      "description": "example_string",
      "dynamic": true,
      "createdAt": "2026-07-02T11:25:15.134Z",
      "updatedAt": "2026-07-02T11:25:15.134Z",
      "variants": [
        {
          "id": "cmr3f41z20001psp7phmyapw3",
          "routeId": "example_string",
          "pathId": 1,
          "code": "usdt",
          "name": "John Doe",
          "description": "example_string",
          "enabled": true,
          "tokenId": "example_string",
          "createdAt": "2026-07-02T11:25:15.134Z",
          "updatedAt": "2026-07-02T11:25:15.134Z"
        }
      ]
    }
  ]
}
GET
/api/v1/me/vault
GET
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token
Bearer Tokenstring
Required

better-auth session token. Мобилка/сервисы. Веб использует cookie.

better-auth session token. Мобилка/сервисы. Веб использует cookie.
API Key (cookie: better-auth.session_token)
Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token. better-auth session token. Мобилка/сервисы. Веб использует cookie.

path
parameterstring
Required

API Key for authentication. Provide your API key in the cookie.

Responses

idstring
Required

cuid

codestring
Required
namestring
Required
descriptionstring
Required
walletServiceUrlstring
Required
lockedAtstring
Required
networksarray
Required
routesarray
Required

Только enabled-варианты