> For the complete documentation index, see [llms.txt](https://dreetje-1.gitbook.io/eventlink/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dreetje-1.gitbook.io/eventlink/endpoints.md).

# Endpoints

## Return a Tana Paste or JSON representation of your calendar

<mark style="color:blue;">`GET`</mark> `http://localhost:PORT/events.format`

The default endpoint supports both JSON and Tana Paste output. Replace 'format' with either tana or json to get the desired results. Use the parameters to customize the output.

#### Path Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| format<mark style="color:red;">\*</mark> | String | Either tana or json |

#### Query Parameters

| Name               | Type    | Description                                                                                                                                                                         |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filterField        | String  | Filters specific fields from the output (comma separated)                                                                                                                           |
| filterTitle        | String  | Filters events with these titles (comma separated)                                                                                                                                  |
| filterAttendee     | String  | Filters attendees with these names (comma separated)                                                                                                                                |
| filterStatus       | String  | <p>Filters events with these statuses (comma separated)<br><br>Options: Canceled, Confirmed, None, Tentative, Unknown</p>                                                           |
| filterCalendar     | String  | Filters events from these calendars (comma separated)                                                                                                                               |
| tag                | String  | Customize the tag (default: meeting)                                                                                                                                                |
| date               | String  | Specify a specific date (default is today). Format: YYYY-MM-DDD                                                                                                                     |
| offset             | Integer | How many days to return events for (default is 1).                                                                                                                                  |
| truncate           | Bool    | Truncate the notes field to remove content from video calls                                                                                                                         |
| filterAvailability | String  | <p>Filters events with these availabilities (comma separated)<br><br>Options: Free, Busy, Not Supported, Tentative, Unavailable, Unknown</p>                                        |
| selectCalendar     | String  | Select events from these calendars (comma separated)                                                                                                                                |
| filterAllDay       | Bool    | <p>Filters events that are all day or not all day<br><br>Options: true, false</p>                                                                                                   |
| \*-tag             | String  | <p>One or more url-encoded regexes (split by \_\_) that when successfully matched against the event title, use the specified tag.<br><br>i.e 1-1-tag=.%2A%20-%20.%2A\_\_Sync%24</p> |
| timingField        | String  | Customize the name of the timing field (default: Timing)                                                                                                                            |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token |

{% tabs %}
{% tab title="200: OK Default JSON/Tana Paste response" %}

{% endtab %}

{% tab title="401: Unauthorized Incorrect Bearer token in the authorization header" %}

{% endtab %}
{% endtabs %}

## Fill a custom template with your calendar information

<mark style="color:green;">`POST`</mark> `http://localhost:PORT/events`

Post an event template and the API will return it filled for each event. You can use the variables named under 'Body' in your template.

Example:

&#x20;\- {Title} ({Start} - {End})

#### Query Parameters

| Name               | Type    | Description                                                                                                                                                                         |
| ------------------ | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filterTitle        | String  | Filters events with these titles (comma separated)                                                                                                                                  |
| filterAttendee     | String  | Filters attendees with these names (comma separated)                                                                                                                                |
| filterStatus       | String  | <p>Filters events with these statuses (comma separated)<br><br>Options: Canceled, Confirmed, None, Tentative, Unknown</p>                                                           |
| filterCalendar     | String  | Filters events from these calendars (comma separated)                                                                                                                               |
| tag                | String  | Customize the tag (default: meeting)                                                                                                                                                |
| date               | String  | Specify a specific date (default is today). Format: YYYY-MM-DDD                                                                                                                     |
| offset             | Integer | How many days to return events for (default is 1).                                                                                                                                  |
| truncate           | Bool    | Truncate the notes field to remove content from video calls                                                                                                                         |
| filterAvailability | String  | <p>Filters events with these availabilities (comma separated)<br><br>Options: Free, Busy, Not Supported, Tentative, Unavailable, Unknown</p>                                        |
| selectCalendar     | String  | Select events from these calendars (comma separated)                                                                                                                                |
| filterAllDay       | Bool    | <p>Filters events that are all day or not all day<br><br>Options: true, false</p>                                                                                                   |
| \*-tag             | String  | <p>One or more url-encoded regexes (split by \_\_) that when successfully matched against the event title, use the specified tag.<br><br>i.e 1-1-tag=.%2A%20-%20.%2A\_\_Sync%24</p> |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token |

#### Request Body

| Name       | Type   | Description                                                                    |
| ---------- | ------ | ------------------------------------------------------------------------------ |
| {Title}    | String | Title of the event                                                             |
| {Location} | String | Location of the event                                                          |
| {Status}   | String | Status of the event                                                            |
| {Attendee} | String | Attendee of the event (the line will be multiplied per attendee)               |
| {Start}    | String | Start datetime of the event                                                    |
| {End}      | String | End datetime of the event                                                      |
| {Notes}    | String | The notes of the event                                                         |
| {Tag}      | String | The matched tag from the \*-tag attributes in the query, defaults to 'meeting' |

{% tabs %}
{% tab title="200: OK The filled template per event" %}

{% endtab %}

{% tab title="401: Unauthorized Incorrect Bearer token in the authorization header" %}

{% endtab %}
{% endtabs %}

## Create events

<mark style="color:green;">`POST`</mark> `http://localhost:PORT/events/create`

Create event in the default (or specfied calendar) from the posted JSON body.

Example:

`{ "title": "${name}", "startDate": "${Timing.start}", "endDate": "${Timing.end}", "notes": "${Notes}"}`

#### Query Parameters

| Name     | Type   | Description                              |
| -------- | ------ | ---------------------------------------- |
| calendar | String | Name of the calendar to add the event to |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer token |

{% tabs %}
{% tab title="200: OK Event created" %}

{% endtab %}

{% tab title="400: Bad Request Error with creating the event" %}

{% endtab %}
{% endtabs %}


---

# 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://dreetje-1.gitbook.io/eventlink/endpoints.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.
