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

# Events

API Documentation for the BugSplat Events Endpoint

Get a list of events, or post a new event for a given Crash ID or Crash Group (Stack Key) ID.

## Get Events

<mark style="color:blue;">`GET`</mark> `https://app.bugsplat.com/api/events`

Get all events associated with a Crash Group (Stack Key).

#### Query Parameters

| Name       | Type   | Description                                                                        |
| ---------- | ------ | ---------------------------------------------------------------------------------- |
| database   | string | Name of the database containing the specified Crash Id or Crash Group (Stack Key). |
| crashId    | number | Crash to fetch events for.                                                         |
| stackKeyId | number | Crash group to fetch events for.                                                   |

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

```json
{
  "status": "success",
  "events": [
    {
      "id": "118",
      "type": "Comment",
      "timestamp": "2022-02-02T19:25:11Z",
      "uId": "27581",
      "username": "bobby@bugsplat.com",
      "firstName": "Bobby",
      "lastName": "",
      "message": "testing 123"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

### Curl Example

```bash
curl --location 'https://app.bugsplat.com/api/events?database=fred&stackKeyId=10315' \
--header 'Authorization: Bearer ••••••'
```

## Add Comment

<mark style="color:green;">`POST`</mark> `https://app.bugsplat.com/api/events/comment`

Post a new comment for a given Crash Group (Stack Key).

#### Query Parameters

| Name                                      | Type   | Description                                                                           |
| ----------------------------------------- | ------ | ------------------------------------------------------------------------------------- |
| database                                  | string | Name of the database that contains the specified Crash Id or Crash Group (Stack Key). |
| crashId                                   | number | Crash to comment on                                                                   |
| message<mark style="color:red;">\*</mark> | string | Markdown string containing the body of the comment to post.                           |
| stackKeyId                                | number | Crash group to comment on                                                             |

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

```json
{
    "status": "success",
    "messageId": 127
}
```

{% endtab %}
{% endtabs %}

### Curl Example

```bash
curl --location --request POST 'https://app.bugsplat.com/api/events/comment?database=fred&stackKeyId=10315&message=hello%20from%20**postman**!%20%F0%9F%91%8B' \
--header 'Authorization: Bearer ••••••' 
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.bugsplat.com/api-reference/api/events.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
