Link a deposit address to a routing policy
/ uda/ {id}Point the address at a shared routing policy, or clear the link so it inherits the environment's default rule list again.
The act belongs to the address, not to the policy.
A policy does not know which addresses hold it, and linking answers with the whole address rather than with the policy, so this is an edit of the address and lives on its own path.
The link is consulted at settlement time rather than copied at link time, so the change applies to the next deposit immediately and there is no backfill and no version to pick. The address's own
routing_rulesare unaffected: they are evaluated first and the policy is only reached when they all fall through.The refusals.
routing_policyis required, and a body without it answers422parameter_missingnaming it; a value that is neither a non-blank string nornullanswers422parameter_invalidnaming it, and a member the body does not declare answers400parameter_unknownnaming it. A policy name no policy in this environment carries answers404resource_missingnamingrouting_policy, which is also the answer for a policy that exists in another environment.
Show 3 more detailsShow fewer details
Who may.
In live it is an owner's alone: a developer or a viewer answers
403permission_denied, checked before the step-up. In a sandbox an owner and a developer may, and a viewer answers403permission_denied. A secret key of the environment may too when it was minted withuda.write; one without it answers403permission_denied,uda.createamong them. A key links to a policy the environment already holds and never edits one.Step-up.
In live, a person needs a fresh step-up (
totporbackup_code, neveremail) no older than 15 minutes, which the act renews; without one it answers403step_up_required, and an owner with no authenticator is answeredenrolment_required: true. A sandbox never asks, and neither does a key: the person who mints a live key holdinguda.writeshows the same step-up.A resetting sandbox.
While a sandbox's reset runs it answers
409environment_resetting.
Parameters
Path
- idstring <uuid>required
The deposit address being addressed. A value that is not a UUID answers
422parameter_invalidnamingid.
Headers
- 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.
Request body
- routing_policystring | nullrequired
The policy's name, or
nullto clear the link. A name no policy in this environment carries answers404.
Responses
The address as it now stands.
- 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
- 400422parameter_invalidInvalid parameter
- 400parameter_unknownUnknown parameter
- 401api_key_not_acceptedAPI key not accepted
- 401authentication_requiredAuthentication required
- 401publishable_key_not_acceptedPublishable key not accepted
- 401token_invalidInvalid or expired token
- 403membership_suspendedMembership suspended
- 403permission_deniedPermission denied
- 403step_up_requiredStep-up required
- 404environment_not_foundEnvironment not found
- 404resource_missingNo such object
- 409environment_provisioningEnvironment provisioning
- 409environment_resettingEnvironment resetting
- 413body_too_largeRequest body too large
- 415media_type_unsupportedUnsupported media type
- 422parameter_missingMissing parameter
- 429rate_limitedToo many requests