V2 Integrator API
Enroll User (Stage 2)
Stage 2 of the two-stage enrollment flow — commits the user’s signed session-key and creates the portfolio.
POST
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.
- Auth:
x-api-keyheader (required) - Scope:
enroll:write
flowId (scoped to your API key) with a
24-hour TTL:
- Replaying the same
flowIdwith 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.
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:
400for an invalid request body, expired flow, mismatched signature, or invalid strategy ownership401whenx-api-keyheader is missing or the key is invalid403when the API key lacks theenroll:writescope409IDEMPOTENCY_IN_PROGRESSwhen an earlier request with the sameflowIdis still running409IDEMPOTENCY_KEY_CONFLICTwhen the sameflowIdis reused with a different request body409PORTFOLIO_ALREADY_EXISTSwhen the user is already enrolled at the givenaccountIndex500on unexpected server errors