---
title: "Subscribe a URL to events (REST hook)"
method: POST
path: "/webhooks"
tags: ["Webhooks"]
---

# Subscribe a URL to events (REST hook)

`POST /webhooks`

## Request

- Base URL: `https://api.stoneproject.app/api/v1/public`
- URL: `https://api.stoneproject.app/api/v1/public/webhooks`
- Auth: HTTP bearer

## Request body

- WebhookSubscriptionInput
  - `url` string, uri, required: Public https URL
  - `events` string[], required
  - `name` string, nullable

## Response `201`

Created

- object
  - `success` boolean
  - `message` string, nullable
  - `data` WebhookSubscriptionCreated
    - `id` string
    - `name` string
    - `url` string
    - `events` string[]
    - `status` string
    - `secret` string: Signing secret, shown once
    - `created_at` string, date-time, nullable

## Other responses

- `401`: Missing, invalid, revoked or expired token
- `403`: The token lacks the required scope
- `422`: Invalid input
- `429`: Rate limit reached; retry after the Retry-After header

---

[API](https://skmtc.dev/stoneproject/apis/stone-project-public-api.md) · [All operations](https://skmtc.dev/stoneproject/apis/stone-project-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/stoneproject/apis/stone-project-public-api/revisions/7cebff773929?raw)
