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

# Create a Contract Call

> Submit an arbitrary contract call from a vault, such as EVM call data, an ICP canister call, a raw-signing message, or an Alephium method.

**POST** `/api/external/transactions/`

Use a contract call for arbitrary contract execution. These transactions can have chain-specific data requirements and may require approval before broadcast.

## Request body

<ParamField body="vaultId" type="string" required>
  Vault that signs and submits the call.
</ParamField>

<ParamField body="blockChain" type="string" required>
  Blockchain identifier.
</ParamField>

<ParamField body="amount" type="string">
  Decimal amount of native asset sent with the call.
</ParamField>

<ParamField body="category" type="string" required>
  Must be `"CONTRACT_CALL"`.
</ParamField>

<ParamField body="data" type="object">
  Chain-specific call payload. Use one of the following shapes.

  <Expandable title="Shapes">
    <ParamField body="EVM call data" type="{ callData: string; toAddress?: string }">
      Encoded call data and the target contract address.
    </ParamField>

    <ParamField body="ICP canister call" type="{ canisterId: string; method: string; arg: string }">
      Canister ID, method name, and encoded argument.
    </ParamField>

    <ParamField body="Raw signing" type="{ messageHex: string }">
      Hex-encoded message to sign.
    </ParamField>

    <ParamField body="Alephium method" type="{ method: string; params: Record<string, unknown> }">
      Method name and parameters.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="externalId" type="string">
  Client reference.
</ParamField>

<ParamField body="gasParams" type="object">
  Gas settings for the call.

  <Expandable title="Properties">
    <ParamField body="gasParams.feeTier" type="string">
      One of `HIGH`, `MEDIUM`, or `LOW`.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="creationOptions" type="object">
  Creation options.

  <Expandable title="Properties">
    <ParamField body="creationOptions.skipPreprocessSimulation" type="boolean">
      Set only when your integration has an explicit reason to bypass supported preprocessing or simulation.
    </ParamField>
  </Expandable>
</ParamField>

<Note>
  The SDK accepts `chain` and serializes it as `blockChain`. It injects `category: "CONTRACT_CALL"`.
</Note>

## Response

Returns a [Transaction](/api-basics/data-models#transaction). Its `status` is the lifecycle source of truth.

## Approve the transaction

New transactions return `status: "PENDING"` and wait for approval. [Get the approval message](/approvals/get-approval-message) for the transaction `id`, sign it with your API user's key, then [submit the approval](/approvals/submit-approval-action). See [Approvals](/approvals/overview).

With the SDK, call `approveChangeRequest({ entityId: transaction.id, action: "approve" })` after this call.

<RequestExample dropdown>
  ```json Request example theme={null}
  {
    "vaultId": "vault_123",
    "blockChain": "ETHEREUM",
    "amount": "0",
    "category": "CONTRACT_CALL",
    "data": {
      "callData": "0xa9059cbb000000000000000000000000...",
      "toAddress": "0xTokenContract1234567890abcdef"
    },
    "externalId": "contract-call-1001",
    "gasParams": {
      "feeTier": "MEDIUM"
    },
    "creationOptions": {
      "skipPreprocessSimulation": false
    }
  }
  ```

  ```bash cURL theme={null}
  # Sample only. Generate a new signed token for each request
  # (see Authentication). Tokens expire after 120 seconds.
  curl --request POST \
    --url "https://api.primevault.com/api/external/transactions/" \
    --header "Authorization: Bearer <signed JWT>" \
    --header "Api-Key: <API key>" \
    --header "Content-Type: application/json" \
    --data '{
      "vaultId": "vault_123",
      "blockChain": "ETHEREUM",
      "amount": "0",
      "category": "CONTRACT_CALL",
      "data": {
        "callData": "0xa9059cbb000000000000000000000000...",
        "toAddress": "0xTokenContract1234567890abcdef"
      },
      "externalId": "contract-call-1001",
      "gasParams": { "feeTier": "MEDIUM" },
      "creationOptions": { "skipPreprocessSimulation": false }
    }'
  ```

  ```typescript JavaScript SDK theme={null}
  const tx = await apiClient.createContractCallTransaction({
    vaultId: "vault_123",
    chain: "ETHEREUM",
    amount: "0",
    data: {
      callData: "0xa9059cbb000000000000000000000000...",
      toAddress: "0xTokenContract1234567890abcdef",
    },
    externalId: "contract-call-1001",
    gasParams: { feeTier: "MEDIUM" },
    creationOptions: { skipPreprocessSimulation: false },
  });
  console.log(tx.id, tx.status);
  ```
</RequestExample>

<ResponseExample>
  ```json JSON example theme={null}
  {
    "id": "transaction_contract_123",
    "orgId": "org_456",
    "vaultId": "vault_123",
    "status": "PENDING",
    "transactionType": "OUTGOING",
    "category": "CONTRACT_CALL",
    "subCategory": "CONTRACT_CALL",
    "createdAt": "2026-08-04T11:00:00Z",
    "updatedAt": "2026-08-04T11:00:00Z",
    "isDeleted": false,
    "externalId": "contract-call-1001",
    "source": {
      "type": "VAULT",
      "id": "vault_123",
      "name": "Treasury Vault"
    },
    "blockChain": "ETHEREUM",
    "amount": "0"
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.