Create a deposit address
/ udaCreate a universal deposit address for an owner: one address family payable on every chain the environment's deposit addresses accept, whose money settles at destination.
The create is idempotent on the owner and the destination.
When the environment already holds an address for the same
ownersettling at the same destination, the call answers200with it and creates nothing;201answers an address this request created. Both answer theUdaAddressitself, the shape the list carries. A200changes nothing on the address it answers: the request'saccepted_assets,routing_policyandrouting_rulesdo not replace the address's own, though a member the create refuses is refused all the same.What it refuses.
A missing
ownerordestinationanswers422parameter_missingnaming it. A destination in both forms or neither, an address not valid on its chain, an asset the chain does not carry, a treasury or routing policy the environment does not hold, and a routing rule that matches nothing answer422parameter_invalidnaming the member. A body that is not a JSON object of these members answers400body_invalid.
Show 3 more detailsShow fewer details
A deposit address may not be ready yet.
When none is ready to hand out, the call answers
503uda_wallet_pool_exhaustedwithRetry-After; retrying with the sameIdempotency-Keycreates the address once one is ready. An address is answered only once a deposit to it is detected on every chain it is payable on: when it cannot be readied for that yet, the call answers503uda_address_not_readywithRetry-After, and retrying the same request answers the address, with200, once it is.From a browser
(the gateway,
preview) the publishable key and a session token withdepositenabled create the session's customer's address:owneris the session's customer anddestinationthe one itsdepositcomponent fixes, and the request may sendaccepted_assetsalone (anything else, anownerincluded, answers400naming it). A token withoutdepositanswers403component_not_enabled.Who may.
In live it is an owner's; in a sandbox an owner's or a developer's. Anyone else answers
403permission_denied. A secret key of the environment may when it holdsuda.create. It asks no step-up.
Header parameters
- X-Stridge-Environmentstring <uuid>optional
Which environment the request acts inside, on an operation a session and an API key both call. Learn more
Show full descriptionShow less
It is required under a person's session, exactly as
EnvironmentHeaderdescribes: a session request that omits it answers400withenvironment required, and one naming an environment the caller holds no membership of answers404.An API key names its own environment, so a request made with one omits this header. A key request that sends it answers
400withenvironment header not accepted, whatever it names, rather than having the header ignored: a header that is silently ignored hides the integration bug that sent it. - Idempotency-Keystringoptional
A caller-chosen key making this request safe to retry. Sent, the server remembers what the first request with it produced; omitted, every request is a new one. Learn more
Show full descriptionShow less
The same key with the same parameters returns the first result, status and body both, and does nothing a second time. So a retry after a dropped connection is safe whether or not the first attempt landed. The parameters are compared as parsed, not as bytes: the query with its names sorted and the JSON body decoded, so member order, spacing and escaping never make two requests differ, while any changed value does.
What is remembered is the answer of an attempt that began execution, success or failure, a
500included. A refusal made before execution is not remembered, so a retry with the same key runs afresh once its cause is fixed: a validation error (400,422), a409conflict, a429, a403step_up_required, and any answer carryingRetry-After. An answer whose body is larger than 64 KiB is not remembered either, and an operation may say that its500is not; a retry of either runs the request again. What the first attempt did stands, so a create that took a unique value answers that value's conflict on the retry: a payout whose first attempt took itsreference_idanswers409payout_reference_taken.The same key with different parameters answers
400withidempotency key replayed with a different body: a key names one request, and reusing it for another is a client bug rather than a retry. A replay while the first request is still in flight answers409at once witha request with this idempotency key is still in flight, and the remedy is to retry once the first has answered.Keys are scoped to the environment the request acts inside, and to its reset: one environment's key never answers another environment's request, and a key used before a sandbox reset runs afresh after it.
An operation that acts on a workspace or on the account rather than inside an environment, such as creating a workspace or requesting go-live in the dashboard, scopes its keys to the caller and to its path, so the same key sent for another workspace is a separate request and never a replay.
Request body
- ownerstring
Who the address is for, as the caller names them. The environment holds one address per owner and destination, so creating it again answers the address it holds.
Where a new address's money settles, in exactly one of two forms: a named
treasury, whose destination the address follows when the treasury moves, or an inlinenetwork_idandaddress(withasset_symbol, the chain's own coin when absent). Both forms in one request, or neither, answer422.- treasurystring
The name of one of the environment's treasuries.
- network_idinteger <int32>
The destination chain, by its numeric identifier.
- addressstring
The address the money settles at, valid on
network_id. - asset_symbolstring
The asset the money settles in, as the network catalogue names it on
network_id.
- treasurystring
- accepted_assetsarray<string>
The asset symbols the address accepts. Absent or empty, it accepts every asset.
- routing_policystring
The name of the shared routing policy the address consults when its own rules fall through. Absent, the address takes the environment's default policy. A name no policy in this environment carries answers
422. The address's own ordered overrides, at most five.
What a rule matches: a chain, an asset, or both. A match stating neither answers
422.Where a new address's money settles, in exactly one of two forms: a named
treasury, whose destination the address follows when the treasury moves, or an inlinenetwork_idandaddress(withasset_symbol, the chain's own coin when absent). Both forms in one request, or neither, answer422.
Responses
The environment already holds this address for the owner and destination; it is answered.
- idstring <uuid>required
The address family's opaque identifier.
- objectstringrequired
The object's type, always
uda_address. - environment_idstring <uuid>required
The environment this address is scoped to. It is carried on the object rather than implied by the request, so the scope a client rendered is the scope the server answered in.
- livemodebooleanrequired
truewhenenvironment_idnames aliveenvironment andfalsein a sandbox. It is carried on the object itself, so a payload read on its own, a logged response or a webhook body, still says which side of the boundary it came from. - ownerstringrequired
Who the address was assigned to, as the caller named them at assignment. It is the caller's own identifier for a customer rather than anything this API mints, so it is free text.
- statusstringrequiredenum active · retired
Whether the address still accepts deposits. A retired address keeps its history and its settlements; it simply stops being handed out.
Show 5 more fieldsShow fewer fields
Where money swept from the address ends up: an address on a chain, denominated in one asset, held either inline or by a named treasury.
- addressstringrequired
The address the money settles at.
- network_idinteger <int32>required
The destination chain, as the chain's own numeric identifier.
- eip155_idstring | nullrequired
The destination chain's EIP-155 identifier, or
nullwhere the chain is not EVM. - network_namestringrequired
The destination chain's name.
- asset_symbolstringrequired
The asset the destination is denominated in.
- asset_addressstringrequired
The asset's contract on the destination chain, or empty where it is the chain's own coin.
- asset_decimalsinteger <int32>required
How many decimal places the destination asset carries.
- treasurystring | nullrequired
The treasury holding the destination, or
nullwhere the destination is an inline address the caller stated directly. A named treasury is a level of indirection: its address can move without every address that settles into it being rewritten.
- addressstringrequired
Every chain the family is observed on. It is empty on an address minted before any chain was configured for it.
- network_idinteger <int32>required
The chain, as the chain's own numeric identifier. It is not a UUID and it addresses nothing in this API: a client resolves it against the network catalogue.
- eip155_idstring | nullrequired
The chain's EIP-155 identifier, or
nullwhere the chain is not EVM and has none. It is a second identifier for the same chain rather than a second chain:network_idis what this API keys on, andeip155_idis what a wallet'schainIdfield wants. - network_namestringrequired
The chain's name.
- addressstringrequired
The address a payer sends to on this chain.
Every asset a deposit on this chain is credited for, the chain's native coin first. It is empty on a chain observed before any asset was configured for it.
- network_idinteger <int32>required
The address's own ordered overrides, first match wins. Empty where it states none.
What a rule matches on. A rule fires when EVERY stated clause matches the deposit; a clause left empty matches anything, so an all-empty match is the catch-all.
Where money swept from the address ends up: an address on a chain, denominated in one asset, held either inline or by a named treasury.
- routing_policy_idstring | null <uuid>required
The shared rule list this address consults when its own rules all fall through, or
nullwhere it states none and inherits the environment's default. - created_atstring <date-time>required
When the address was minted. RFC3339 UTC,
Zsuffixed. The list is ordered on it, newest first, and the details aggregate buckets on it.
Errors
The error.code values this operation can return. Each one links to its entry in the error catalogue, which explains the cause and the fix.
- 400body_invalidInvalid request body
- 400environment_requiredEnvironment required
- 400header_invalidInvalid header
- 400idempotency_key_reusedIdempotency key reused
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401client_secret_expiredClient secret expired
- 401client_secret_invalidInvalid client secret
- 401client_secret_requiredClient secret required
- 401client_secret_unclaimedClient secret not claimed
- 401publishable_key_not_acceptedPublishable key not accepted
- 401secret_key_in_browserSecret key exposed in a browser
- 401token_invalidInvalid or expired token
- 403component_not_enabledComponent not enabled
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 404environment_not_foundEnvironment not found
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 409idempotency_key_in_useIdempotency key in use
- 413body_too_largeRequest body too large
- 415media_type_unsupportedUnsupported media type
- 422parameter_missingMissing parameter
- 429rate_limitedToo many requests
- 503uda_address_not_readyDeposit address not ready
- 503uda_wallet_pool_exhaustedNo deposit address ready