Stage 2 of the two-stage enrollment flow — commits the user’s signed session-key and creates the portfolio.
Stage 2 of the two-stage enrollment flow. Takes theDocumentation Index
Fetch the complete documentation index at: https://docs.glider.fi/llms.txt
Use this file to discover all available pages before exploring further.
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.
x-api-key header (required)enroll:writeflowId (scoped to your API key) with a
24-hour TTL:
flowId with the same body returns the cached response.409 IDEMPOTENCY_KEY_CONFLICT.409 IDEMPOTENCY_IN_PROGRESS.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.
Common error responses:
400 for an invalid request body, expired flow, mismatched signature, or
invalid strategy ownership401 when x-api-key header is missing or the key is invalid403 when the API key lacks the enroll:write scope409 IDEMPOTENCY_IN_PROGRESS when an earlier request with the same flowId
is still running409 IDEMPOTENCY_KEY_CONFLICT when the same flowId is reused with a
different request body409 PORTFOLIO_ALREADY_EXISTS when the user is already enrolled at the
given accountIndex500 on unexpected server errors