> For the complete documentation index, see [llms.txt](https://docs.bloodbath.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bloodbath.io/getting-started/schedule-your-first-event.md).

# Schedule your first event

Go to your terminal and write the cURL instruction down

```
curl <https://api.bloodbath.io/rest/events/> \\
  -H "Authorization: Bearer <Replace this with your API key>" \\
  -d scheduled_for="<Replace with a date in the future>" \\
  -d headers="{}" \\
  -d body="{test: test}" \\
  -d method="post" \\
  -d endpoint="<https://dummy.bloodbath.io>"
```

You must change *\<Replace this with your API key>* with the key in your clipboard. Additionally, you have to **add a date in the future** for the event to be scheduled; change *\<Replace with a date in the future>* by any date using the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format, for example

```
2021-05-01T00:00:00Z
```

You should receive the information of created event with its id as a response immediately. One good practice if you're using this within any codebase is to **store this id somewhere, which will allow you to find or cancel the event easily.**

![](/files/-MkXttSqi5GkWhSNG0-5)

## Look it up through the dashboard

Once you reach the date you previously set, the event will be triggered and sent to the endpoint. You can immediately [check the dashboard](https://app.bloodbath.io/events)

![In this example, we've scheduled 5 events to be dispatched at the same time](/files/-MkXu4SJ5U9W17cygFvz)

### Check the details of your events

You can access the details directly through the dashboard. But also through our REST or GraphQL API directly.

![](/files/-MkXv9a5XoRA1uIQLQL2)

A few states are obvious, but you may wonder what the enqueue, lock and dispatch are

| **Name**          | Description                                                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------- |
| **Enqueued at**   | Time at which the event is pulled from the database and a process is scheduled internally for future spawning |
| **Locked at**     | The process is being run, you can't cancel the event from this point forward                                  |
| **Dispatched at** | Bloodbath sent the payload over                                                                               |

## Going further

Congratulation, you went through the basics of Bloodbath. Using our REST API through cURL is a good first step, but **we provide much more than that**. You can use our GraphQL API or the different language libraries to write up scripts or adding our service to your codebase.

{% hint style="info" %}
If your **favorite language** isn't present in our libraries, **don't hesitate to** [**contact us**](mailto:support@bloodbath.io) and we'll gladly add it.
{% endhint %}


---

# 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://docs.bloodbath.io/getting-started/schedule-your-first-event.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.
