---
title: "Creates a new web hook subscription"
method: POST
path: "/api/web-hook/subscribe"
tags: ["WebHook"]
---

# Creates a new web hook subscription

`POST /api/web-hook/subscribe`

## Request

- Base URL: `https://app.checkflow.io` (the document declares no server; this is the origin it was published from)
- URL: `https://app.checkflow.io/api/web-hook/subscribe`
- Auth: none declared

Sample request:
            
    POST: api/web-hook/subscribe
    {
       "source": "zapier",
       "eventType": "task_completed",
       "targetUrl": "https://example.com/hooks/123456789",
       "templateKey": null,
       "taskKey": "50d58518-e049-4474-84c7-036236e52923",
       "taskContentKey": null
    }
            
For task_completed the scope is determined by which key you supply:
  - taskKey:     fires only when that specific task is completed
  - templateKey: fires when any task in any checklist of that template is completed
  - (no key):    fires when any task in your team is completed

## Query parameters

- `source` string
- `eventType` string
- `targetUrl` string
- `templateKey` string
- `taskKey` string
- `taskContentKey` string

## Headers

- `X-API-VERSION` string
- `X-API-KEY` unknown

## Response `200`

Returns the newly created subscription

## Other responses

- `401`: If the API Key could not be validated

---

[API](https://skmtc.dev/checkflow/apis/checkflow-api.md) · [All operations](https://skmtc.dev/checkflow/apis/checkflow-api/llms.txt) · [OpenAPI document](https://skmtc.dev/checkflow/apis/checkflow-api/revisions/4004b1f66432?raw)
