Monitors

Create a monitor

Create a monitor that polls a watchable source on a schedule.

POST/v1/monitors
0credits
x-api-keystringheader

API key (`sfk_...`)

Parameters
1
dryRunbooleanquery

When true, validates the monitor and returns a cost preview without creating anything or running the baseline check.

Request body

application/json
Response fields
23

Endpoint-specific response payload.

dataid
string

Stable identifier for the monitor.

min 1 chars

dataname
string

Display name for the monitor.

dataoperationId
string

Watchable public API operation this monitor polls.

dataparams
object

Canonicalized parameters used for each poll.

dataschedule

Polling schedule for a monitor: a fixed interval or a cron expression.

datanextRunAt
string

ISO-8601 timestamp for the monitor's next scheduled poll.

Estimated credit cost preview for this monitor's schedule.

datacostPreviewperCheckCredits
integer

Credits charged per poll.

≥ 0

datacostPreviewperDayCredits
integer

Estimated credits charged per day at this schedule.

≥ 0

datacostPreviewperMonthCredits
integer

Estimated credits charged per 30-day month at this schedule.

≥ 0

Result of the synchronous baseline check run at creation time. Omitted for dry runs.

databaselineoutcome
string

Outcome of the synchronous baseline check.

Preview of items observed by the baseline check.

databaselinepreviewItems[]
nullableoptional

Webhook endpoint created inline for this monitor, when `webhook.url` was given.

datawebhookEndpointid
string

Newly created webhook endpoint id.

datawebhookEndpointsecret
string

One-time signing secret for the new webhook endpoint. Shown only in this response — store it now.

Metadata describing the request and billing outcome.

metarequestId
string

Unique request identifier for tracing this API call.

min 1 chars

metacreditsCharged
integer

Credits charged for this request.

≥ 0

metaversion
string

Public API version that served the response.

one of: v1

metacached
booleanoptional

True when served from shared response cache. Credits still apply (full endpoint price); Age header may be present.

Code example

curl "https://api.socialfetch.dev/v1/monitors" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","operationId":"string","params":{},"schedule":null,"webhookEndpointId":"string","webhook":{"url":"string"},"spendCapCredits":0}' \
  -X POST

Responses

The newly created monitor.