# Construct Address **POST /addresses**

status: stable

Construct any address by specyfying credential for payment or delegation. In Cardano, Addresses are made of three parts: ``` *---------*---------*-----------* | NETWORK | PAYMENT | DELEGATION | *---------*---------*-----------* ``` The `NETWORK` part allows for distinguishing addresses between different networks like the mainnet or the testnet. It is implicitly handled by the server without you having to worry about it. The `PAYMENT` and `DELEGATION` parts however can be constructed similarly, using either: - A public key - A script The script itself is either constructed out of a public key, one of two timelocks, or one of the three following primitives: - all - any - some The timelock can determine validity as respect to the slot. `active_from slot` means the script is valid from the specified slot and onward. `active_until slot` means the script is valid until (not included) the specified slot. Each of which contains one or more script(s) that can be either keys or primitives, and so on. Schematically: ``` ┏─────────┓ SCRIPT = ──┬───────────────────────┤ pub key ├─────────────────────┬── │ ┗─────────┛ │ │ ┏──────────────────┓ │ ├───────────────────────┤ ACTIVE_FROM slot ├──── ───────┤ │ ┗──────────────────┛ │ │ ┏───────────────────┓ │ ├───────────────────────┤ ACTIVE_UNTIL slot ├───────────┤ │ ┗───────────────────┛ │ │ │ │ ╭─────╮ ╭────────╮ │ ├──┤ ALL ├───┤ SCRIPT ├─┬───────────────────────────────┤ │ ╰─────╯ ^ ╰────────╯ │ │ │ │ ╭───╮ │ │ │ └───┤ , ├────┘ │ │ ╰───╯ │ │ ╭─────╮ ╭────────╮ │ ├──┤ ANY ├───┤ SCRIPT ├─┬───────────────────────────────┤ │ ╰─────╯ ^ ╰────────╯ │ │ │ │ ╭───╮ │ │ │ └───┤ , ├────┘ │ │ ╰───╯ │ │ ╭──────╮ ╭──────────╮ ┏───┓ ╭──────╮ ╭────────╮ │ └──┤ SOME ├─┤ AT_LEAST ├─┤ n ├─┤ FROM ├───┤ SCRIPT ├─┬──┘ ╰──────╯ ╰──────────╯ ┗───┛ ╰──────╯ ^ ╰────────╯ │ │ ╭───╮ │ └───┤ , ├────┘ ╰───╯ ``` ## Servers - https://localhost:8090/v2: https://localhost:8090/v2 () ## Parameters ## Body parameters Content-type: application/json - **payment** (string(bech32) | object) - **stake** (string(bech32) | object) - **validation** (string) Script validation level. Required validation sifts off scripts that would not be accepted by the ledger. Recommended level filters out scripts that do not pass required validation and additionally when: * 'all' is non-empty * there are redundant timelocks in a given level * there are no duplicated verification keys in a given level * 'at_least' coefficient is positive * 'all', 'any' are non-empty and `'at_least' has no less elements in the list than the coefficient after timelocks are filtered out. ## Responses ### 415: Unsupported Media Type #### Body Parameters: application/json (object) - **message** (string) A descriptive error message. - **code** (string) A specific error code for this error, more precise than HTTP ones. ### 406: Not Acceptable #### Body Parameters: application/json (object) - **message** (string) May occur when providing an invalid 'Accept' header. - **code** (string) ### 400: Bad Request #### Body Parameters: application/json (object) - **message** (string) May occur when a request is not well-formed; that is, it fails to parse successfully. This could be the case when some required parameters are missing or, when malformed values are provided. - **code** (string) ### 202: Accepted #### Body Parameters: application/json (object) - **address** (string(bech32)) A Shelley address representing either enterprise, reward account or delegating address [Powered by Bump.sh](https://bump.sh)