> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snek.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Sign and submit

> Attach a witness and submit in one call

Attaches the provided witness to a transaction and submits it to the Cardano network in a single round-trip. Use this endpoint when you want signing and submission handled in one call.

Use [`/sign`](/api-reference/transaction-builder/sign) if you want the signed CBOR back without submission, or [`/submit`](/api-reference/transaction-builder/submit) if the transaction is already fully signed.

**Auth:** Public

## Request body

<ParamField body="cbor" type="string" required>
  Hex-encoded unsigned transaction CBOR.
</ParamField>

<ParamField body="witness" type="string" required>
  Hex-encoded transaction witness-set CBOR.
</ParamField>

<ParamField body="changeAddress" type="string" required>
  Bech32 change address.
</ParamField>

## Response

<ResponseField name="txHash" type="string">
  Hash of the submitted transaction.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://builder.snek.fun/sign-and-submit \
    --header 'Content-Type: application/json' \
    --data '{
      "cbor": "84a500...",
      "witness": "...",
      "changeAddress": "addr1..."
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  { "txHash": "..." }
  ```
</ResponseExample>

## Error response

<ResponseField name="cause" type="string">
  Machine-readable error code.
</ResponseField>

<ResponseField name="message" type="string">
  Human-readable error message.
</ResponseField>

Possible errors:

* `400 INVALID_PARAMS` — one or more required fields are missing or have the wrong type.
* `500 SERVER_ERROR` — the transaction CBOR or witness CBOR could not be processed, or relay submission failed.

<ResponseExample>
  ```json 400 theme={null}
  {
    "cause": "INVALID_PARAMS",
    "message": "Invalid input"
  }
  ```
</ResponseExample>
