> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/Nectr-AI/nectr-ai-pr-review-agent/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Event Details

> Retrieve detailed information about a specific webhook event including debug data

## Get Event by ID

```
GET /api/v1/events/{event_id}
```

Retrieves detailed information about a specific webhook event.

### Path Parameters

<ParamField path="event_id" type="integer" required>
  The unique identifier of the event
</ParamField>

### Response

<ResponseField name="id" type="integer">
  Unique event identifier
</ResponseField>

<ResponseField name="event_type" type="string">
  GitHub event type (e.g., `pull_request`)
</ResponseField>

<ResponseField name="status" type="string">
  Processing status: `pending`, `completed`, or `failed`
</ResponseField>

<ResponseField name="payload" type="object">
  Complete GitHub webhook payload
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 timestamp when event was received
</ResponseField>

<ResponseField name="processed_at" type="string">
  ISO 8601 timestamp when processing completed
</ResponseField>

## Debug Event

```
GET /api/v1/events/{event_id}/debug
```

Debug endpoint that shows the event payload and associated workflow run errors.

### Path Parameters

<ParamField path="event_id" type="integer" required>
  The unique identifier of the event
</ParamField>

### Response

<ResponseField name="event" type="object">
  Event summary information

  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Event ID
    </ResponseField>

    <ResponseField name="event_type" type="string">
      Event type
    </ResponseField>

    <ResponseField name="status" type="string">
      Current status
    </ResponseField>

    <ResponseField name="created_at" type="string">
      Creation timestamp
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="workflows" type="array">
  Associated workflow runs

  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Workflow run ID
    </ResponseField>

    <ResponseField name="status" type="string">
      Workflow status
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message if failed (null otherwise)
    </ResponseField>

    <ResponseField name="started_at" type="string">
      When workflow started
    </ResponseField>

    <ResponseField name="completed_at" type="string">
      When workflow completed (null if running)
    </ResponseField>
  </Expandable>
</ResponseField>

## Example Requests

<CodeGroup>
  ```bash Get Event theme={null}
  curl https://your-backend.railway.app/api/v1/events/42 \
    -H "Cookie: access_token=your_jwt_token"
  ```

  ```bash Debug Event theme={null}
  curl https://your-backend.railway.app/api/v1/events/42/debug \
    -H "Cookie: access_token=your_jwt_token"
  ```

  ```python Python theme={null}
  import httpx

  async with httpx.AsyncClient() as client:
      # Get event details
      event = await client.get(
          "https://your-backend.railway.app/api/v1/events/42",
          cookies={"access_token": "your_jwt_token"}
      )
      
      # Get debug info
      debug = await client.get(
          "https://your-backend.railway.app/api/v1/events/42/debug",
          cookies={"access_token": "your_jwt_token"}
      )
  ```
</CodeGroup>

## Example Debug Response

```json theme={null}
{
  "event": {
    "id": 42,
    "event_type": "pull_request",
    "status": "failed",
    "created_at": "2026-03-10T14:30:00Z"
  },
  "workflows": [
    {
      "id": 15,
      "status": "failed",
      "error": "Neo4j connection timeout",
      "started_at": "2026-03-10T14:30:01Z",
      "completed_at": "2026-03-10T14:30:45Z"
    }
  ]
}
```

## Use Cases

* **Troubleshooting**: Investigate why a specific PR review failed
* **Debugging**: Examine the raw GitHub payload for a webhook event
* **Monitoring**: Track workflow execution status and errors
* **Development**: Test webhook processing locally with real payloads

## Error Responses

<CodeGroup>
  ```json 404 Not Found theme={null}
  {
    "detail": "Event not found"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "detail": "Not authenticated"
  }
  ```
</CodeGroup>

## Related Endpoints

<CardGroup cols={2}>
  <Card title="List Events" icon="list" href="/api/events/list">
    Browse all webhook events
  </Card>

  <Card title="Review Details" icon="file-lines" href="/api/reviews/details">
    View the PR review generated from an event
  </Card>
</CardGroup>
