Skip to main content
POST
/
v2
/
enroll
curl --request POST \
  --url 'https://api.glider.fi/v2/enroll' \
  --header 'x-api-key: gldr_sk_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "ownerAccountId": "eip155:0:0xabcdef0000000000000000000000000000000001",
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "chainIds": [1, 8453],
    "accountIndex": "7",
    "agentAccountId": "eip155:0:0x1111111111111111111111111111111111111111",
    "signature": "0x9412d70d539f889ecec2d3152b68af758d689a4325a43b07811ee708814527c72256fc749d7fd3745a07f0aaa84813955050c461392d9b9ee1f80e106fac39e01b",
    "flowId": "flow_abc123",
    "portfolioName": "Alice Portfolio"
  }'
{
  "success": true,
  "data": {
    "portfolioId": "a1b2c3d4",
    "portfolioName": "Alice Portfolio",
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "smartAccounts": [
      { "accountId": "eip155:1:0x2222222222222222222222222222222222222222" },
      { "accountId": "eip155:8453:0x3333333333333333333333333333333333333333" }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.glider.fi/llms.txt

Use this file to discover all available pages before exploring further.

Stage 2 of the two-stage enrollment flow. Takes the flowId, accountIndex, and agentAccountId returned by POST /v2/enroll/signature, plus the user’s signature, and provisions the portfolio: one smart account per requested chain, plus the rebalance schedule derived from your tenant’s execution config. The whole operation succeeds atomically — a failure anywhere rolls back cleanly.
  • Auth: x-api-key header (required)
  • Scope: enroll:write
The endpoint is idempotent on flowId (scoped to your API key) with a 24-hour TTL:
  • Replaying the same flowId with the same body returns the cached response.
  • Replaying with a different body returns 409 IDEMPOTENCY_KEY_CONFLICT.
  • Replaying while the original is still in-flight returns 409 IDEMPOTENCY_IN_PROGRESS.
  • Replaying after a typed error (e.g., signature mismatch) returns the same typed error so retries don’t get stuck.
The signature must be computed by signing message.raw from the stage-1 response with the user’s wallet, using viem’s signMessage({ message: { raw } }) or the equivalent wallet primitive. Wallet addresses are exchanged as CAIP-10 account identifiers. ownerAccountId and agentAccountId use the chain-agnostic EVM form eip155:0:<address>. Each element of the response smartAccounts array uses the chain-bound form eip155:<chainId>:<address>. Only EVM wallets are supported today. portfolioName is an optional display name for the portfolio. It is trimmed server-side, returned by portfolio read endpoints, and mutable via PATCH /v2/portfolios/{portfolioId}. Names may be up to 64 characters and may include Unicode letters, digits, spaces, and - _ . ' : ( ) & /. Common error responses:
  • 400 for an invalid request body, expired flow, mismatched signature, or invalid strategy ownership
  • 401 when x-api-key header is missing or the key is invalid
  • 403 when the API key lacks the enroll:write scope
  • 409 IDEMPOTENCY_IN_PROGRESS when an earlier request with the same flowId is still running
  • 409 IDEMPOTENCY_KEY_CONFLICT when the same flowId is reused with a different request body
  • 409 PORTFOLIO_ALREADY_EXISTS when the user is already enrolled at the given accountIndex
  • 500 on unexpected server errors
curl --request POST \
  --url 'https://api.glider.fi/v2/enroll' \
  --header 'x-api-key: gldr_sk_your_api_key' \
  --header 'Content-Type: application/json' \
  --data '{
    "ownerAccountId": "eip155:0:0xabcdef0000000000000000000000000000000001",
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "chainIds": [1, 8453],
    "accountIndex": "7",
    "agentAccountId": "eip155:0:0x1111111111111111111111111111111111111111",
    "signature": "0x9412d70d539f889ecec2d3152b68af758d689a4325a43b07811ee708814527c72256fc749d7fd3745a07f0aaa84813955050c461392d9b9ee1f80e106fac39e01b",
    "flowId": "flow_abc123",
    "portfolioName": "Alice Portfolio"
  }'
{
  "success": true,
  "data": {
    "portfolioId": "a1b2c3d4",
    "portfolioName": "Alice Portfolio",
    "strategyId": "01JWZEE2MF30KVRMRX53N88VA4",
    "smartAccounts": [
      { "accountId": "eip155:1:0x2222222222222222222222222222222222222222" },
      { "accountId": "eip155:8453:0x3333333333333333333333333333333333333333" }
    ]
  }
}