> For the complete documentation index, see [llms.txt](https://developers.inevent.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.inevent.com/event-api/listing-events.md).

# Listing events

To list all events in your company environment you may use the `company.event.find` endpoint with multiple filters and pagination. The required query attributes for this endpoint are `tokenID`, `companyID` and `selection`, and we have several optional attributes for filtering and pagination.

#### `Selection` query attribute

The `selection` query attribute accepts the following values:

```json
{
    "my-events-created": "Events I've created",
    "my-events": "Events I'm the host",
    "next-events": "Next events",
    "past-events": "Past events",
    "current-events": "Current events",
    "single-day-events": "Single day events",
    "multi-day-events": "Multi day events",
    "online-events": "Online events",
    "presential-events": "Presential events",
    "tags": "Tags",
    "archived": "Archived",
    "not-archived": "Not archived",
    "all": "All",
    "best-fit": "Best fit",
    "approved": "Approved",
    "enrolled": "Enrolled",
    "denied": "Denied",
    "paid": "Paid",
    "present": "Present",
    "working": "Working"
}
```

The `selection` query attribute allows *stacking* (AND operation) by separating values with a pipe. Example: `selection=my-events|next-events`. It also allows complex stacking for a certain key, like `tags`. Example: `selection=my-events|next-events|tags:29124,4255`.

#### Key-value filtering

We also have the following optional query attributes as filters:

```json
{
    "name": "event name",
    "city": "city name",
    "dateBegin": "event's begin date",
    "dateEnd": "event's end date",
    "presential": "face-to-face event",
    "public": "public event",
    "visible": "visible event",
    "archived": "show archived events",
    "templateID": "template event",
    "placeID": "place for event",
    "order": "results order",
    "timezone": "timezone to search the dates of the event",
    "tags": "tag ids separated by commas"
}
```

You can also use `query` and `queryKey` instead of using the field name as the query attribute directly if you prefer.

#### Pagination

To paginate you can use `limit` and `offset` query attributes and to get the total amount of events listed in your account (used to build pagination UI and calculate the amount of pages) you should send the `paginated` query attribute with value `1`.

#### Ordering

To order the events you can use the following query attributes: `order` and `orderOrientation`. The `orderOrientation` attribute accepts `ASC` (ascending) and `DESC` (descending) as values\
and the `order` query attribute accepts the following values:

```json
[
    "eventID",
    "name",
    "nickname",
    "dateBegin",
    "dateEnd",
    "city",
    "entries",
    "approved",
    "placeName"
]
```

#### Example

Here is an example of this API call:

```sh
curl --request GET \
     --url 'https://api.inevent.com/?action=company.event.find&tokenID=YOUR_TOKEN_HERE&companyID=YOUR_COMPANY_ID_HERE&limit=100&offset=0&paginated=1' \
     --header 'Accept: application/json'
```

#### Spreadsheet reports

To generate a spreadsheet report out of that API call, you can send the `format` attribute with the value `excel-daemon`. Excel spreadsheets takes a while to generate and they will show up in your `Report center`, but you can also retrieve them using the `download.find` endpoint.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developers.inevent.com/event-api/listing-events.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
