# Construct **POST /shared-wallets/{walletId}/transactions-construct**
status: stable
Create a transaction to be signed from the shared wallet. Works for the following fields: - payments - metadata - validity_interval ## Servers - https://localhost:8090/v2: https://localhost:8090/v2 () ## Parameters ### Path parameters - **walletId** (string(hex)) ### Body: application/json (object) - **payments** (array[object]) A list of target outputs with amounts specified. When creating a new transaction, the wallet software ensures that all user-specified transaction outputs have ada amounts that satisfy the ledger minimum UTxO rule: - If a user-specified transaction output has an ada `amount` that is **zero**, the wallet software will automatically assign a minimal amount of ada to the output so that it satisfies the ledger minimum UTxO rule. - If a user-specified transaction output has an ada `amount` that is **non-zero**, the wallet software will verify that the specified amount is large enough to satisfy the ledger minimum UTxO rule. If the amount is not large enough, the wallet software will return a `utxo_too_small` error, together with a revised ada amount that does satisfy the minimum UTxO rule. - **withdrawal** (string) When provided, instruments the server to automatically withdraw rewards from the source wallet when they are deemed sufficient (i.e. they contribute to the balance for at least as much as they cost). As a consequence, the resulting transaction may or may not have a withdrawal object. Summarizing: withdrawal field | reward balance | result --- | --- | --- `null` | too small | ✓ no withdrawals generated `null` | big enough | ✓ no withdrawals generated `"self"` | too small | ✓ no withdrawals generated `"self"` | big enough | ✓ withdrawal generated - **metadata** (object | null) - **encrypt_metadata** (object) If used then metadata in transaction is going to be encrypted via AEAD scheme using ChaCha20 and Poly1305 (see RFC 7539). PBKDF2 password stretching is used to get a 32-byte symmetric key. PBKDF2 encryption using HMAC with the hash algorithm SHA512 is employed here. The encrypted metadata is going to be stored in blockchain as a consequence. - **mint_burn** (array[object]) An entry for each unique asset to be minted and/or burned, containing helpful information. - **vote** (string | string(bech32)) - **delegations** (array[object]) A delegation action for a given stake key denoted by its soft index. Pool id is only required for "join". Stake key index are required for both actions. - **validity_interval** (object) Specify only invalid_before or invalid_hereafter or both. Please note that, if not set, the default values are: - `"invalid_before": {"quantity":0, "unit":"slot"}` - `"invalid_hereafter":{"quantity":7200, "unit":"second"}` Which translates to 2h transaction TTL. - **reference_policy_script_template** (string | object) - **encoding** (string) Encoding of transaction CBOR returned in response (base64 by default). ## Responses ### 400 Bad Request #### Body: 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) ### 403 Forbidden #### Body: application/json (object) - **message** (string) May occur when trying to perform an operation not supported by this type of wallet. - **code** (string) ### 404 Not Found #### Body: application/json (object) - **message** (string) May occur when a given walletId does not match with any known wallets (because it has been deleted, or has never existed). - **code** (string) ### 406 Not Acceptable #### Body: application/json (object) - **message** (string) May occur when providing an invalid 'Accept' header. - **code** (string) ### 415 Unsupported Media Type #### Body: application/json (object) - **message** (string) May occur when providing an invalid 'Content-Type' header. - **code** (string) ### 202 Accepted #### Body: application/json (object) - **transaction** (string(base64|base16)) The CBOR-encoded transaction, represented in either hex or base64 encoding. This always includes the transaction body and the witness set, even if the latter is empty. - **coin_selection** (object) - **fee** (object) Coins, in Lovelace. Only relates to 'Ada'. Refer to `assets` for multi-assets wallets instead. [Powered by Bump.sh](https://bump.sh)