TheirStackTheirStack Logo
Log inSign up
DocumentationAPI ReferenceWebhooksDatasetsMCPGuides
IntroductionQuickstartAuthenticationPaginationRate Limit

Search endpoints

Job Search POSTCompany Search POSTTechnographics POSTBuying Intents POST

Account endpoints

Get Credit Balance GETGet Credits Consumption GET

Other

Get Webhook By Id GETGet Aggregated Webhook Event Count GETGet Webhook Event Count GETList Webhook Events GETList All Webhooks GETArchive Webhook PATCHUpdate Webhook PATCHEnable/Disable A Webhook PATCHRetry Webhook Events POSTTest Webhook Url POSTCreate New Webhook POST
Webhooks

Create New Webhook

Create a new webhook that listens for events from a saved search and sends real-time HTTP POST notifications to your specified URL. Configure event types, filters, and delivery settings for automated data pipelines.

POST
/v0/webhooks

Authorization

Bearer
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

  • description
    stringnullable
    Webhook for new jobs

    Description of the webhook

  • listening_start_time
    stringnullable
    date-time2024-01-01T00:00:00Z

    Date when the webhook started listening for events. If listening_start_time is None, the webhook will listen to all events matching the search query regardless of when they occurred.

  • search_id
    integer
    123
    required

    ID of the search that the webhook is listening to.

  • secret
    stringnullable
    length: 16 <= length

    Secret used to sign webhook payloads with HMAC-SHA256. If set, deliveries include an X-TheirStack-Signature-256 header.

  • trigger_once_per_company
    boolean
    default: falsetrue

    Only for webhook type ='job.new'. If true, Company A with 5 jobs → 1 event triggered. If false, Company A with 5 jobs → 5 events triggered

  • url
    string
    length: 1 <= length <= 2083urihttps://example.com/webhook
    required

    URL of the webhook

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://api.theirstack.com/v0/webhooks" \  -H "Content-Type: application/json" \  -d '{    "search_id": 123,    "url": "https://example.com/webhook"  }'
{
  "created_at": "2019-08-24T14:15:22Z",
  "description": "Webhook for new jobs",
  "event_type": "job_new",
  "has_secret": true,
  "id": 0,
  "is_active": true,
  "is_archived": true,
  "listening_start_time": "2024-01-01T00:00:00Z",
  "scanning_frequency": "10m",
  "search_id": 123,
  "search_name": "string",
  "team_id": 0,
  "trigger_once_per_company": true,
  "updated_at": "2019-08-24T14:15:22Z",
  "url": "https://example.com/webhook",
  "user_id": 0
}
{
  "error": {
    "code": "E-001",
    "description": "string",
    "title": "Not allowed exception"
  },
  "request_id": null
}
{
  "error": {
    "code": "E-001",
    "description": "string",
    "title": "Not allowed exception"
  },
  "request_id": null
}
{
  "error": {
    "code": "E-001",
    "description": "string",
    "title": "Not allowed exception"
  },
  "request_id": null
}
{
  "error": {
    "code": "E-001",
    "description": "string",
    "title": "Not allowed exception"
  },
  "request_id": null
}

How is this guide?

Last updated on

Test Webhook Url POST

Send a test event to verify connectivity and payload handling. Either provide a webhook_id to test an existing webhook (with optional url/secret overrides), or provide url and event_type directly to test before creating a webhook.