Ospree docs
API ReferenceWebsiteSocials
  • GETTING STARTED
    • Intro to Ospree
      • What is the Travel Rule?
      • Types of Travel Rule transfers
      • What is a wallet address?
      • What is an Account at Ospree?
      • What is a VASP or CASP?
    • Account
      • Understand user roles
      • Add and manage users
      • Change your password
      • Set up two-factor authentication (2FA)
      • Log in with 2FA-enabled
  • DASHBOARD
    • Overview
    • Travel Rule
      • Start a transfer
      • Search and filter transfers
      • Interoperability
      • Self-hosted wallets
    • Accounts Directory
      • Create an account
      • Edit an account
      • Create a recipient
      • Edit a recipient
      • Add a new wallet
      • VASPs
        • Search and filter
        • Request a VASP
  • OSPREE API
    • Overview
    • API integration flows
    • Authentication
    • Breaking Changes
    • Errors
    • Token Identifier
    • Webhooks
      • Webhook events
      • Webhook request
      • Webhook management
    • Travel Rule
      • Create Transfer
      • List Transfers
      • Retrieve Transfer
      • Update Transfer
      • Action Transfer
    • Accounts Directory
      • Create Account
      • List Accounts
      • Retrieve Account
      • Update Account
      • Remove account
      • Search account
      • Retrieve VASP
      • Search VASP
      • List VASPs
    • Blockchain Analytics
      • Create Address
      • List Addresses
      • Retrieve Address
      • Assign an address to account
      • Create Transaction (Beta)
      • List Transactions (Beta)
      • Retrieve Transaction (Beta)
  • Resources and Help
    • Data pre-validation
    • Sunrise Issue
Powered by GitBook
On this page
  • Create Webhook
  • List Webhooks
  • List Webhook Event Types
  • Delete Webhook
  1. OSPREE API
  2. Webhooks

Webhook management

Ospree allows you to configure and manage webhooks through its API. This section outlines the available API endpoints for creating, listing, and deleting webhooks.

Create Webhook

POST /api/v2/webhooks

The Create Webhook endpoint create a new webhook for a specified event_type. This means all events related to the specified event_type will be sent to the configured webhook URL. Request Body

Name
Type
Description
Required

event_type

integer

The type of the event. See "List Webhook Event Types" for the available event types.

True

webhook_url

string

The endpoint that will receive webhook requests. This must be a POST endpoint.

True

Response

{
  "status": "success",
  "data": {
    "id": "01954751-cccd-709a-baee-ee3ddac37e39",
    "business_id": "06790d62-07e5-7aac-8000-d0462f2c2d94",
    "event_type": 1,
    "webhook_url": "https://example.com/api/webhook",
    "event_names": null,
    "ip_allowlist": null,
    "created_by": "06790d73-154f-7dae-8000-12b54a9a258a",
    "created": "2025-02-26T21:57:18.000+08:00",
    "last_modified": "2025-02-26T21:57:18.000+08:00"
  }
}

List Webhooks

GET /api/v2/webhooks

The List Webhooks endpoint retrieves a list of all configured webhooks, including their event types, URLs, creation timestamps, and last modified timestamps.

Response

{
  "status": "success",
  "data": [
    {
      "id": "01954751-cccd-709a-baee-ee3ddac37e39",
      "business_id": "06790d62-07e5-7aac-8000-d0462f2c2d94",
      "event_type": "travel_rule",
      "webhook_url": "https://example.com/api/webhook",
      "event_names": null,
      "webhook_desc": "Webhook that pushes updates from Travel Rule module",
      "modified_by": "John Doe",
      "last_modified": "2025-02-26T21:57:18.000+08:00",
      "ip_allowlist": null
    }
  ]
}

List Webhook Event Types

GET /api/v2/webhooks/event_types

The List Webhook Event Types endpoint retrieves a list of all available event types for configuring webhooks.

Response

{
  "status": "success",
  "data": [
    {
      "event_type_name": "travel_rule",
      "event_type_id": "1"
    }
  ]
}

Delete Webhook

DELETE /api/v2/webhooks/:webhook_id

The Delete Webhook endpoint removes a webhook by its ID. Once deleted, the webhook will no longer receive event notifications. This action is irreversible.

Response

{
  "status": "success",
  "data": true
}

Last updated 2 months ago