---
updatedAt: 2026-07-31T14:18:57.000Z
agentTools:
  projectIndex: https://reference.fidel.uk/llms.txt
---

# Create Webhook (Program)

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "fidel-api",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.fidel.uk/v1"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Fidel-Key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/programs/{programId}/hooks": {
      "post": {
        "summary": "Create Webhook (Program)",
        "description": "",
        "operationId": "create-webhook-program",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "application/json",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Fidel-Key",
            "in": "header",
            "description": "test/live API secret key.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "programId",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "The ID of the program where the hook belongs to"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "event",
                  "url"
                ],
                "properties": {
                  "event": {
                    "type": "string",
                    "description": "The type of event. (values: card.linked, card.failed, program.status, transaction.auth, transaction.auth.qualified, transaction.clearing, transaction.clearing.qualified, transaction.refund, transaction.refund.qualified, credits.balance.low, marketplace.offer.live, marketplace.offer.updated)"
                  },
                  "url": {
                    "type": "string",
                    "description": "URL destination of the event."
                  },
                  "offerId": {
                    "type": "string",
                    "description": "The offerId to filter qualified auth and clearing transactions by offer."
                  },
                  "headers": {
                    "type": "object",
                    "description": "A custom header key name that must be between 1 and 64 characters and only accepts roman alphabet, number, dash and underscore. And a value that must be between 1 and 1000 characters.",
                    "properties": {}
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"items\": [\n    {\n      \"accountId\": \"3693ac7e-3e2b-432c-8c60-2b786453ca9b\",\n      \"event\": \"transaction.auth.qualified\",\n      \"live\": false,\n      \"programId\": \"06471dbe-a3c7-429e-8a18-16dc97e5cf35\",\n      \"url\": \"https://my-webhook.com/listener\",\n      \"updated\": \"2020-05-05T13:10:14.045Z\",\n      \"created\": \"2020-05-05T13:10:14.045Z\",\n      \"id\": \"3b4be60b-6596-4b40-ae3d-89b9fdaf132a\",\n      \"offerId\": \"cf22478e-c700-4f31-b75b-38016605e2a3\",\n      \"secretKey\": \"wh_taq_3a941c4d-152d-449d-98a7-9af35427da6f\",\n      \"headers\": {\n        \"Custom-Header\": \"my-custom-header\"\n      }\n    }\n  ],\n  \"resource\": \"/v1/programs/06471dbe-a3c7-429e-8a18-16dc97e5cf35/hooks\",\n  \"status\": 201,\n  \"execution\": 105.28959\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "accountId": {
                            "type": "string",
                            "example": "3693ac7e-3e2b-432c-8c60-2b786453ca9b"
                          },
                          "event": {
                            "type": "string",
                            "example": "transaction.auth.qualified"
                          },
                          "live": {
                            "type": "boolean",
                            "example": false,
                            "default": true
                          },
                          "programId": {
                            "type": "string",
                            "example": "06471dbe-a3c7-429e-8a18-16dc97e5cf35"
                          },
                          "url": {
                            "type": "string",
                            "example": "https://my-webhook.com/listener"
                          },
                          "updated": {
                            "type": "string",
                            "example": "2020-05-05T13:10:14.045Z"
                          },
                          "created": {
                            "type": "string",
                            "example": "2020-05-05T13:10:14.045Z"
                          },
                          "id": {
                            "type": "string",
                            "example": "3b4be60b-6596-4b40-ae3d-89b9fdaf132a"
                          },
                          "offerId": {
                            "type": "string",
                            "example": "cf22478e-c700-4f31-b75b-38016605e2a3"
                          },
                          "secretKey": {
                            "type": "string",
                            "example": "wh_taq_3a941c4d-152d-449d-98a7-9af35427da6f"
                          },
                          "headers": {
                            "type": "object",
                            "properties": {
                              "Custom-Header": {
                                "type": "string",
                                "example": "my-custom-header"
                              }
                            }
                          }
                        }
                      }
                    },
                    "resource": {
                      "type": "string",
                      "example": "/v1/programs/06471dbe-a3c7-429e-8a18-16dc97e5cf35/hooks"
                    },
                    "status": {
                      "type": "integer",
                      "example": 201,
                      "default": 0
                    },
                    "execution": {
                      "type": "number",
                      "example": 105.28959,
                      "default": 0
                    }
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl -X POST \\\n  https://api.fidel.uk/v1/programs/06471dbe-a3c7-429e-8a18-16dc97e5cf35/hooks \\\n  -H 'content-type: application/json' \\\n  -H 'fidel-key: sk_test_50ea90b6-2a3b-4a56-814d-1bc592ba4d63' \\\n  -d '{\n    \"event\": \"transaction.auth.qualified\",\n    \"url\": \"https://my-webhook.com/listener\",\n    \"offerId\": \"cf22478e-c700-4f31-b75b-38016605e2a3\",\n    \"headers\": {\n      \"Custom-Header\": \"my-custom-header\"\n    }\n  }'"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```