Skip to content

Creating Webhooks — Proposed Guide

Planned API — Reference Only

Creating Webhooks: A hypothetical subscription would associate an approved receiver with selected event types. Registering a receiver should not grant…

Overview

A hypothetical subscription would associate an approved receiver with selected event types. Registering a receiver should not grant unrestricted access to all organization events.

Key concepts

Validate receiver ownership and allowed event scopes. Use a documented verification process before any future delivery.

Implementation considerations

This operation is unavailable and sends no verification request. Receiver URLs in fixtures use reserved domains only.

Proposed API behavior

POST /v1/webhook-subscriptions is an illustrative design for this topic. Path and field names may change before implementation. Access would require an authorized organization context and operation-specific permission; no public API or authorization grant is available here.

Illustrative request fields
NameTypeDescription
receiver_urlstringReserved example receiver; no verification or delivery request is sent.
event_typesarray<string>Proposed event selection; no subscription is created.
organization_idstringStable fictional organization reference; not a secret and not evidence that a resource exists.

Static example requests

Proposed, non-executing request examples
# Proposed request text only; this reserved host is not a live API.
curl -X POST 'https://api.remizen.example/v1/webhook-subscriptions' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  --data '{
  "receiver_url": "https://receiver.remizen.example/events",
  "event_types": [
    "expense.updated"
  ],
  "organization_id": "org_example_123"
}'

Fictional response example

201 (proposed example)Static response fixture

Fictional documentation data only. No request was sent, record created, review performed, payment initiated or provider connection activated.

JSON
{
  "data": {
    "receiver_url": "https://receiver.remizen.example/events",
    "event_types": [
      "expense.updated"
    ],
    "organization_id": "org_example_123",
    "id": "webhook_subscriptions_example_123"
  },
  "meta": {
    "request_id": "req_example_123",
    "reference_only": true
  }
}

Illustrative error case

Review this failure case in context: This operation is unavailable and sends no verification request. Receiver URLs in fixtures use reserved domains only.

422 (illustrative; final error contracts are undecided)Proposed error fixture

Synthetic diagnostic example. Human-readable messages must not be used as stable programmatic contracts.

JSON
{
  "error": {
    "code": "validation_error",
    "message": "The proposed creating webhooks operation requires review of its input or authorization.",
    "request_id": "req_example_123"
  }
}

Proposed data types

Illustrative field dictionary
NameTypeDescription
receiver_urlstringReserved example receiver; no verification or delivery request is sent.
event_typesarray<string>Proposed event selection; no subscription is created.
organization_idstringStable fictional organization reference; not a secret and not evidence that a resource exists.