---
title: "Create webhook"
full: true
_openapi:
  method: POST
  toc: []
  structuredData:
    headings: []
    contents:
      - content: "Creates a new webhook for the active organization"
_apiData:
  document: "https://reloop.sh/api/webhook/openapi/json"
  operationData: [{"path":"/api/webhook/v1/","method":"post"}]
  parameterList: [{"name":"description","type":"string","required":true,"description":"Webhook description","location":"body","minLength":1,"maxLength":255},{"name":"url","type":"string","required":true,"description":"Webhook URL","location":"body","pattern":"^https?:\\/\\/.+"},{"name":"events","type":"string[]","required":true,"description":"Array of event IDs to subscribe to","location":"body"}]
  responseMap: {"201":{"description":"Response for status 201","schema":{"id":"wh_123456789","name":"Payments Webhook","url":"https://example.com/webhooks/reloop","secret":"***masked***","status":"active","customHeaders":{"x-source":"reloop"},"rateLimitEnabled":true,"maxRequestsPerMinute":60,"maxRetries":3,"retryBackoffMultiplier":2,"filteringOptions":null,"lastTriggeredAt":"2026-03-29T10:00:00Z","successCount":10,"failureCount":1,"consecutiveFailures":0,"createdAt":"2026-03-29T10:00:00Z","updatedAt":"2026-03-29T10:00:00Z"}},"400":{"description":"Response for status 400","schema":{"name":"Newsletter","message":"Contact already exists","status":0,"data":{"why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}}},"401":{"description":"Response for status 401","schema":{"name":"Newsletter","message":"Contact already exists","status":0,"data":{"why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}}},"409":{"description":"Response for status 409","schema":{"name":"Newsletter","message":"Contact already exists","status":0,"data":{"why":"A contact with this email already exists in your organization.","fix":"Use a different email address or update the existing contact instead.","link":"https://reloop.sh/docs/api/contacts"}}}}
  codeSamples:
    - id: node
      lang: javascript
      label: Node.js
      source: |-
        import { Reloop } from "reloop-email";
        
        const reloop = new Reloop({ apiKey: "rl_123456789" });
        
        const { webhook, webhookError } = await reloop.webhook.create({
          description: "Production webhook",
          url: "https://example.com/webhooks/reloop",
          events: ["domain.created", "domain.deleted"],
        });
        if (webhookError) throw webhookError;
    - id: curl
      lang: bash
      label: cURL
      source: |-
        curl -X POST https://reloop.sh/api/webhook/v1/ \\
          -H "x-api-key: rl_123456789" \\
          -H "Content-Type: application/json" \\
          -d '{"description":"Production webhook","url":"https://example.com/webhooks/reloop","events":["domain.created","domain.deleted"]}'
    - id: python
      lang: python
      label: Python
      source: |-
        # Webhook SDK support coming soon — use the REST API:
        import httpx
        
        httpx.post(
            "https://reloop.sh/api/webhook/v1/",
            headers={"x-api-key": "rl_123456789"},
            json={
                "description": "Production webhook",
                "url": "https://example.com/webhooks/reloop",
                "events": ["domain.created", "domain.deleted"],
            },
        )
    - id: php
      lang: php
      label: PHP
      source: |-
        // Webhook SDK support coming soon — use the REST API via Guzzle
    - id: java
      lang: java
      label: Java
      source: |-
        // Webhook SDK support coming soon — use the REST API
    - id: dotnet
      lang: csharp
      label: .NET
      source: |-
        // Webhook SDK support coming soon — use the REST API
    - id: go
      lang: go
      label: Go
      source: |-
        // Webhook SDK support coming soon — use the REST API
    - id: rust
      lang: rust
      label: Rust
      source: |-
        // Webhook SDK support coming soon — use the REST API
    - id: ruby
      lang: ruby
      label: Ruby
      source: |-
        # Webhook SDK support coming soon — use the REST API
    - id: elixir
      lang: elixir
      label: Elixir
      source: |-
        # Webhook SDK support coming soon — use the REST API
---
> For the complete documentation index, see [llms-docs.txt](/llms-docs.txt) or the site index [llms.txt](/llms.txt). Full docs corpus: [llms-full-docs.txt](/llms-full-docs.txt). Prefer markdown URLs (append `.md`) for agent consumption. Product skill: [skill.md](/skill.md).


{/* This file was generated by the OpenAPI doc generator. Do not edit this file directly. Run `bun run generate:api-docs` to regenerate. */}

<APIPage />
