# createAction

> For the complete documentation index, see [llms.txt](https://bsvblockchain.com/docs/llms.txt).

**POST** `/createAction`

Base URL: `http://localhost:3321`

Creates a new Bitcoin transaction

## Body

Content type: `application/json`

- `description` (string)
- `inputBEEF` (number[])
- `inputs` (object[])
  - `outpoint` (string)
  - `inputDescription` (string)
  - `unlockingScript` (string)
  - `unlockingScriptLength` (number)
  - `sequenceNumber` (number)
- `outputs` (object[])
  - `lockingScript` (string)
  - `satoshis` (number)
  - `outputDescription` (string)
  - `basket` (string)
  - `customInstructions` (string)
  - `tags` (string[])
- `lockTime` (number)
- `version` (number)
- `labels` (string[])
- `options` (object)
  - `signAndProcess` (boolean)
  - `acceptDelayedBroadcast` (boolean)
  - `trustSelf` ("known")
  - `knownTxids` (string[])
  - `returnTXIDOnly` (boolean)
  - `noSend` (boolean)
  - `noSendChange` (string[])
  - `sendWith` (string[])
  - `randomizeOutputs` (boolean)

Example:

```json
{
  "description": "string",
  "inputBEEF": [
    0
  ],
  "inputs": [
    {
      "outpoint": "string",
      "inputDescription": "string",
      "unlockingScript": "string",
      "unlockingScriptLength": 0,
      "sequenceNumber": 0
    }
  ],
  "outputs": [
    {
      "lockingScript": "string",
      "satoshis": 0,
      "outputDescription": "string",
      "basket": "string",
      "customInstructions": "string",
      "tags": [
        "string"
      ]
    }
  ],
  "lockTime": 0,
  "version": 0,
  "labels": [
    "string"
  ],
  "options": {
    "signAndProcess": true,
    "acceptDelayedBroadcast": true,
    "trustSelf": "known",
    "knownTxids": [
      "string"
    ],
    "returnTXIDOnly": true,
    "noSend": true,
    "noSendChange": [
      "string"
    ],
    "sendWith": [
      "string"
    ],
    "randomizeOutputs": true
  }
}
```

## Responses

### 200

The created transaction result

- `txid` (string)
- `tx` (number[])
- `noSendChange` (string[])
- `sendWithResults` (object[])
  - `txid` (string)
  - `status` ("unproven" | "sending" | "failed")
- `signableTransaction` (object)
  - `tx` (number[])
  - `reference` (string)

Example:

```json
{
  "txid": "string",
  "tx": [
    0
  ],
  "noSendChange": [
    "string"
  ],
  "sendWithResults": [
    {
      "txid": "string",
      "status": "unproven"
    }
  ],
  "signableTransaction": {
    "tx": [
      0
    ],
    "reference": "string"
  }
}
```

### 400

Invalid input

### 500

Internal server error