# 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.**

![](https://3110190463-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkRmbYl9DJxiNaCmViE%2F-MkXtndK6iBn18uvNiVL%2F-MkXttSqi5GkWhSNG0-5%2Fdummy-bloodbath-console_\(1\).gif?alt=media\&token=2b9c42d1-7a87-4391-b767-13c91ec48d66)

## 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](https://3110190463-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkRmbYl9DJxiNaCmViE%2F-MkXtndK6iBn18uvNiVL%2F-MkXu4SJ5U9W17cygFvz%2FScreen_Shot_2021-06-05_at_9.12.04_PM.png?alt=media\&token=9a873b2d-f30b-4a02-91ee-734975b9b4c1)

### Check the details of your events

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

![](https://3110190463-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MkRmbYl9DJxiNaCmViE%2F-MkXuoUbabImPI6bkcaH%2F-MkXv9a5XoRA1uIQLQL2%2FScreen_Shot_2021-06-05_at_9.12.40_PM.png?alt=media\&token=d83c6980-3183-4867-8bf9-1014f5f3d550)

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 %}
