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

# Event by Index

> Look up an event name by its position in your configuration

<span style={{display:"none"}}>For the complete documentation index, see [llms.txt](/llms.txt).</span>

Returns the name of the event at the given index. Loop from `0` to `event_count - 1` to enumerate every event you've configured.

### Query Parameters

<ParamField query="index" type="integer" required>
  0-based event index (less than `event_count` from [`/event-counter`](/api-reference/tokens/events/event-counter))
</ParamField>

### Response

<ResponseField name="event_name" type="string">
  Lowercase event identifier
</ResponseField>

```javascript theme={null}
for (let i = 0; i < eventCount; i++) {
  const res = await fetch(
    `https://tokens.shakesco.com/event-by-index?index=${i}`,
    { headers: { Authorization: `Bearer ${API_KEY}` } }
  );
  const { event_name } = await res.json();
}
```

<ResponseExample>
  ```json 200 OK theme={null}
  { "event_name": "signup" }
  ```
</ResponseExample>
