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

# Send events in bulk

> Send up to 1,000 events to a goal's cases in one request

> [!NOTE]
>
> Every wallet’s goals run on the agent loop and can use cases.

The same events as [Send an event](https://docs.oneshotagent.com/api-reference/compute/events.md#send-an-event), up to 1,000 in one request. The goal is woken once for the whole request.

## Authentication

A signed **write proof** or an access token: see [Authentication schemes](https://docs.oneshotagent.com/api-reference/openapi.md#authentication-schemes).

## Request body

```json theme={null}
{
  "events": [
    { "event_id": "inv-1001", "case_key": "shipment-1", "task": "Freight invoice 1001: 1,240.00 USD" },
    { "event_id": "inv-1002", "case_key": "shipment-2", "task": "Freight invoice 1002: 310.00 USD" }
  ]
}
```

Each event has the fields of a single event: `event_id`, `case_key`, `task`, `budget_usdc`, `step_limit`. An `event_id` sent before, in this request or an earlier one, is one event. Events are handled in order.

## Response

`202` with:

**accepted** `number`

Events taken.

**outcomes** `object`

How many events had each outcome: `created`, `already_open`, `reopened`, `sent_to_root`, `duplicate`.

**refused** `array`

`{ event_id, reason }` for each event not taken, such as a case past the goal's scoped units or a budget the goal cannot fund. Fix and send those again.

## Limits

60 requests per minute for each goal, separate from other routes' limits. Over it, `429` with `Retry-After`.

## Errors

| Status | `error` | Meaning |
| - | - | - |
| `400` | `invalid_request` | Not 1 to 1,000 events, or an event is malformed. |
| `404` | `not_found` | No such goal for this agent. |
| `409` | `goal_not_running`, `not_on_the_agent_loop`, `run_not_due` | The goal takes no events now. |
| `429` | `rate_limit_exceeded` | 60 requests this minute for this goal. |


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