> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /v1/webhook/situation

Handle situation-monitor webhook trigger (situation.created)

` POST /v1/webhook/situation `

Handle situation-monitor webhook trigger (situation.created)

## Request body (required)

Content type: ` application/json `

Situation event

- ` value `: type ` unknown `

  - ` oneOf alternative 1 `: type ` object `

  - ` oneOf alternative 2 `: type ` object `

    - ` situation `: type ` object `

      - ` asset_class `: type ` string `

      - ` cluster_id `: type ` string `

      - ` confidence `: type ` number `

      - ` confidence_tier `: type ` string `

      - ` event_at `: type ` string `

      - ` event_subtype `: type ` string `

      - ` event_type `: type ` string `

      - ` id `: type ` string `

      - ` impact `: type ` integer `

      - ` observed_at `: type ` string `

      - ` schedule_kind `: type ` string `

      - ` scope `: type ` string `

      - ` sentiment_label `: type ` string `

      - ` sentiment_score `: type ` number `

      - ` summary `: type ` string ` — Summary is the classifier's one-sentence headline for the event — the catalyst, actor, and key numbers. This is the actual news text.

    - ` sources `: type ` array ` — Source articles/posts behind the situation (situation_sources rows). Optional — absent on older worker builds that don't send it.

      - ` array item `: type ` object `

        - ` observed_at `: type ` string `

        - ` source_id `: type ` string `

        - ` url `: type ` string `

    - ` tickers `: type ` array ` — Outer envelope fields (worker `WebhookPayload` shape).

      - ` array item `: type ` object `

        - ` asset_class `: type ` string `

        - ` symbol `: type ` string `

## Responses

### ` 200 ` — OK

Content type: ` application/json `

- ` value `: type ` object `

  - ` action `: type ` string ` — "triggered", "resumed", "skipped"

  - ` eventId `: type ` string ` — Webhook event ID for audit

  - ` reason `: type ` string ` — If skipped, the reason

  - ` runIds `: type ` array ` — Multiple if fan-out (platform) or single (generic)

    - ` array item `: type ` string `

### ` 400 ` — Bad Request

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

### ` 401 ` — Unauthorized

Content type: ` application/json `

- ` value `: type ` object `

  - ` code `: type ` integer `

  - ` details `: type ` array `

    - ` array item `: type ` unknown `

  - ` message `: type ` string `

  - ` requestId `: type ` string `

## Request examples

### cURL

```curl
curl -X POST 'https://api.example.com/v1/webhook/situation' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

### JavaScript

```javascript
const response = await fetch('https://api.example.com/v1/webhook/situation', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN",
      "Content-Type": "application/json"
  },
  body: JSON.stringify({})
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://api.example.com/v1/webhook/situation', headers=headers, json={})
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{}`)
	req, _ := http.NewRequest("POST", "https://api.example.com/v1/webhook/situation", body)
	req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
	req.Header.Set("Content-Type", "application/json")

	resp, _ := http.DefaultClient.Do(req)
	defer resp.Body.Close()
	result, _ := io.ReadAll(resp.Body)
	fmt.Println(string(result))
}
```