# Create Transaction Create a new spot swap. Endpoint: POST /api/v1/swaps Version: 0.2.0 Security: bearerAuth ## Header parameters: - `x-signature` (string) Signature of the body. Base64 encoded string. If the request is made programatically by an API user, signing of the request is required and is intended to protect you from malicious backends. Example: "SGVsbG8=" - `x-timestamp` (integer) Timestamp of the signature. Integer. Specify an Epoch date. If the request is made programatically by an API user, the timestamp of the request is required and is intended to protect you from replay attacks. ## Request fields (application/json): - `quote_id` (string, required) The ID of the quote. - `vault_id` (string, required) The unique identifier of the vault. - `input_asset_identifier` (any, required) - `output_asset_identifier` (any, required) - `amount` (string, required) The amount to swap. Example: "1000000000000000000" - `slippage_bps` (string) The slippage tolerance in basis points. Example: "1000000000000000000" - `fee` (any) - `signer_type` (string) The signer of the swap request. Can be: : The creator of the swap request (default).: A service that you run on your own network or cloud environment. Enum: "initiator", "api_signer", "end_user", "multiple_signers" - `fail_on_prediction_failure` (boolean) if transaction creation should fail in case prediction failed, otherwise. In case simulation has failed upon continuation, the expected result of the transaction will be partial and policy will be applied on information that can be extracted statically from the transaction only. This might result in falling back to the default policy rule. ## Response 201 fields (application/json): - `transactions` (array, required) The created transactions. ## Response 400 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. - `system_error_code` (string) An additional system error code in Fordefi. - `error_type` (string) Enum: "revoke_allowance_first", "quote_not_found" ## Response 401 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 403 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 408 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 422 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (array, required) - `detail.loc` (array, required) - `detail.msg` (string, required) - `detail.type` (string, required) - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes. ## Response 500 fields (application/json): - `title` (string, required) Human-readable error message. - `detail` (string, required) Detailed error message. - `full_detail` (string) Full error message with additional details, if available. - `request_id` (string) Request ID - for debugging purposes.