---
title: "Store a new webhook"
method: POST
path: "/v1/webhooks"
tags: ["webhooks"]
---

# Store a new webhook

`POST /v1/webhooks`

## Request

- Base URL: `https://demo.firefly-iii.org/api`
- URL: `https://demo.firefly-iii.org/api/v1/webhooks`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://demo.firefly-iii.org/oauth/authorize`
    - Token URL: `https://demo.firefly-iii.org/oauth/token`
  - HTTP bearer

Creates a new webhook. The data required can be submitted as a JSON body or as a list of parameters. The webhook will be given a random secret.

## Headers

- `X-Trace-Id` string, uuid

## Request body

- WebhookStore
  - `active` boolean: Boolean to indicate if the webhook is active
  - `title` string, string, required: A title for the webhook for easy recognition.
  - `triggers` WebhookTrigger[]
  - `responses` WebhookResponse[]
  - `deliveries` WebhookDelivery[]
  - `url` string, string, required: The URL of the webhook. Has to start with `https`.

## Response `200`

New webhook stored, result in response.

- WebhookSingle
  - `data` WebhookRead, required
    - `type` string, string, required: Immutable value
    - `id` string, string, required
    - `attributes` WebhookProperties, required
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `active` boolean: Boolean to indicate if the webhook is active
      - `title` string, string, required: A title for the webhook for easy recognition.
      - `secret` string, string: A 24-character secret for the webhook. It's generated by Firefly III when saving a new webhook. If you submit a new secret through the PUT endpoint it will generate a new secret for the selected webhook, a new secret bearing no relation to whatever you just submitted.
      - `triggers` WebhookTrigger[]
      - `responses` WebhookResponse[]
      - `deliveries` WebhookDelivery[]
      - `url` string, string, required: The URL of the webhook. Has to start with `https`.
    - `links` ObjectLink, required
      - `0` object
        - `rel` string, string
        - `uri` string, string
      - `self` string, uri

## Other responses

- `400`: Bad request
- `401`: Unauthenticated
- `404`: Page not found
- `422`: Validation error. The body will have the exact details.
- `500`: Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-0.md) - [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-0/llms.txt) - [OpenAPI document](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-v6-4-0/revisions/445332924ac5?raw)
