Skip to main content
POST
/
v1
/
projects
/
{projectId}
/
alerts
/
preview
cURL
curl -X POST \
  -H "X-API-Key: $PARTICLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}' \
  "https://api.particle.pro/v1/projects/{projectId}/alerts/preview"
{
  "preview_id": "<string>",
  "window_days": 123
}

Authorizations

X-API-Key
string
header
required

Pass your API key in the X-API-Key header (recommended).

Path Parameters

projectId
string
required

Project ID.

Query Parameters

window_days
integer<int64>

Number of days back to sweep. Defaults to 7; capped at 30.

Example:

7

Body

application/json
entities
object[] | null
required

Same as CreateAlertBody.entities.

Required array length: 1 - 100 elements
kind
enum<string>

Same as CreateAlertBody.kind. Defaults to ENTITY_MENTION.

Available options:
ENTITY_MENTION,
PODCAST_SPEAKER

Response

OK

preview_id
string
required

Deterministic preview ID — repeating the same body within the TTL returns the same ID. Poll GET /v1/alerts/preview/{previewId} when status is 'in_progress'.

status
enum<string>
required

'in_progress' means a sweep is running (or was just started); 'completed' means an earlier identical preview is still cached and the result is ready to fetch via GET. A 'failed' prior preview is treated as a cache miss and a fresh sweep is started — callers never see 'failed' on this endpoint.

Available options:
in_progress,
completed
window_days
integer<int64>
required