---
title: "Create sponsored transaction"
method: POST
path: "/v1/transaction-blocks/sponsor"
---

# Create sponsored transaction

`POST /v1/transaction-blocks/sponsor`

## Request

- Base URL: `http://api.enoki.mystenlabs.com`
- URL: `http://api.enoki.mystenlabs.com/v1/transaction-blocks/sponsor`
- Auth: HTTP bearer

Creates sponsored transaction

## Headers

- `zklogin-jwt` string: The JWT of the user signed in with zkLogin.

## Request body

- CreateSponsoredTransactionRequest
  - `network` 'testnet' | 'mainnet' | 'devnet': The Sui network you wish to use. Defaults to `mainnet`.
  - `transactionBlockKindBytes` string, required: Bytes of the transaction with the `onlyTransactionKind` flag set to true.
  - `sender` string: The address sending the transaction. Include this parameter if not including the `zklogin-jwt` header. This option is only supported when calling the API from a backend service using a private key.
  - `allowedAddresses` string[]: List of Sui addresses that can be present in the transaction. These addresses are combined with the list configured in the Enoki Developer Portal. Transactions attempting to refer to or transfer assets outside of these addresses are rejected.
  - `allowedMoveCallTargets` string[]: List of permitted Move targets the sponsored user's transactions can call.

## Response `200`

Successful response

- CreateSponsoredTransactionResponse
  - `data` object, required
    - `digest` string, required
    - `bytes` string, required

---

[API](https://skmtc.dev/mystenlabs/apis/enoki-api-specification.md) - [All operations](https://skmtc.dev/mystenlabs/apis/enoki-api-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/mystenlabs/apis/enoki-api-specification/revisions/2ac8d418823a?raw)
