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

# Bulk Create Disbursements

To create multiple disbursements at once, use the bulk creation mutation. This mutation processes all disbursements synchronously and returns the results immediately.

Each disbursement created will trigger a `disbursement.created` webhook event.

## Create Multiple Disbursements

Use the following mutation to create multiple disbursements:

```graphql theme={"system"}
mutation DisbursementsCreateBulk($createInputs: [DisbursementCreateInput!]!) {
  disbursementsCreateBulk(createInputs: $createInputs) {
    disbursements {
      id
      amount
      expiresAt
      publicKey
      status
      url
    }
  }
}
```

**Example variables:**

```json theme={"system"}
{
  "createInputs": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "amount": 100,
      "authorizedIdentities": [
        {
          "type": "EMAIL",
          "value": "myemail@example.com"
        }
      ],
      "fundingAccountId": "the_bank_account_id"
    }
  ]
}
```

**Example response:**

```json theme={"system"}
{
  "data": {
    "disbursementsCreateBulk": {
      "disbursements": [
        {
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "amount": 100,
          "expiresAt": "2024-12-31T23:59:59Z",
          "publicKey": "abc123xyz",
          "status": "DRAFT",
          "url": "https://pay.confidolegal.com/d/abc123xyz"
        }
      ]
    }
  }
}
```

<Tip>
  You can provide a client-generated id for each disbursement in the
  createInputs. If you provide an id, it must be a valid UUID v4. This id will
  become the disbursement.id, allowing you to associate results with records in
  your own system for better traceability.
</Tip>

## Response Fields

The mutation returns a `DisbursementsCreateBulkResult` object containing:

* **disbursements**: An array of `DisbursementsCreateBulkResultItem` objects, each containing:
  * **id**: The disbursement ID
  * **amount**: The disbursement amount
  * **expiresAt**: When the disbursement expires (nullable)
  * **publicKey**: The public key for the disbursement (nullable)
  * **status**: The current status of the disbursement
  * **url**: The URL where the disbursement can be accessed (nullable)

## Additional notes

* Each successful disbursement will emit a `disbursement.created` webhook event.
* The mutation processes all disbursements synchronously and returns immediately with the results.
