Register an account
POST/v1/accounts
Register one of your bank's core banking system (CBS) accounts with the Lyriq Connector for a root settlement asset, so that it can be used in transfers and position reads.
Required scope: connector:accounts:create.
What happens. The request is validated and, if accepted, the Lyriq Connector
creates an asynchronous operation and returns 202 Accepted with that operation.
The operation first waits in PENDING_REVIEW for one approval by a user with the
approver role in your bank (see Reviews). After approval the platform opens the ledger
account and maps it to your external_account_id.
When the account is usable. Poll GET /v1/operations/{operation_id} (the URL in
data.links.self; this response carries no Location header) until the state is
terminal. Once it is
SUCCEEDED the account can be read at the URL in
data.relationships.resource.links.related, which is
/v1/accounts/{external_account_id}?asset_id={asset_id} with external_account_id
percent-encoded. Before that, GET on that URL returns 404 Not Found.
Identity. An account is identified by your bank, asset_id and
external_account_id. The JSON:API id of the future account is returned in
data.relationships.resource.data.id and is derived deterministically as
v1:{bank_id}:{asset_id}:{external_account_id} with each component percent-encoded
(see the Account schema for a worked example).
Duplicates and retries. The Idempotency-Key header is required. Repeating the
request with the same key and the same body returns the original 202 response
without registering again; the same key with a different body returns
409 Conflict (IDEMPOTENCY_CONFLICT), and a retry while the first request is still
being processed returns 409 Conflict (IDEMPOTENCY_PENDING). Registering an
account that already exists (same asset_id and external_account_id) under a new
key returns 409 Conflict with title account already exists.
Validation. Errors are returned before anything is created:
external_account_idempty:400, codeMISSING_FIELD.external_account_idlonger than 34 characters or containing a character not allowed in XML 1.0:400, codeINVALID_FIELD_FORMAT.asset_idempty or whitespace:400, codeMISSING_FIELD.display_namepresent but blank:400.- Unknown attribute, wrong type or missing required attribute in the body:
422 Unprocessable Entity. - Your bank is not
ACTIVE:400with titleInvalid bank: the owning bank does not exist or is not active. asset_idis not enabled for your bank:400with titlethe requested asset is not in bank {bank_id}'s enabled set.
Request
Responses
- 202
- 400
- 401
- 403
- 409
- 422
- 429
- 503
Registration accepted. The body is the operation that tracks it; its
relationships.resource identifies the account that will exist once the operation
succeeds.
The request failed validation, the Idempotency-Key header is missing, your bank
is not active, or the asset is not enabled for your bank.
The bearer token is missing, malformed, expired, signed by an unknown key, or was not issued by the platform IAM for the Lyriq Connector. Obtain a new token and retry. See the Authentication section.
The token is valid but may not perform this request: it lacks the required scope, has
no bank membership, needs an x-dan-bank-id header to choose between several
memberships, names a bank in x-dan-bank-id it has no membership for, or the caller's
bank is suspended or terminated. A new token with the same configuration fails the same
way. See the Authentication section.
The account is already registered, or the Idempotency-Key was already used with a
different body or is still being processed.
The request is well-formed JSON but cannot be processed: the body does not match the
expected shape (a missing or unknown member, a wrong type, or a wrong data.type), or it
breaks a business or cross-field rule. Correct the request before retrying.
The request was refused because a rate limit was reached (code RATE_LIMITED). No
Retry-After header is sent; retry with exponential backoff.
The request could not be served right now. Either the network is not fully operational
(OUTBOUND_HALTED or READ_ONLY: mutations are refused while read endpoints keep
working; OPERATIONAL_STATE_UNKNOWN: the state could not be determined), or a platform
dependency is temporarily unavailable. No Retry-After header is sent; retry later with
backoff. When retrying a mutation, reuse the same Idempotency-Key and body.