{
  "openapi": "3.1.0",
  "info": {
    "title": "webhook-client",
    "description": "API reference for a webhook-client implementation, i.e. a endpoint\nthat receives events from the Lucca API.",
    "version": "1.0",
    "contact": {
      "name": "API Support",
      "url": "https://support.lucca.fr",
      "email": "contact@luccasoftware.com"
    },
    "license": {
      "name": "Unlicensed",
      "url": "https://www.luccasoftware.com"
    }
  },
  "servers": [
    {
      "url": "https://{domain}",
      "variables": {
        "domain": {
          "default": "your-domain.com"
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Webhooks",
      "description": "Webhooks."
    }
  ],
  "paths": {
    "/{webhook-endpoint}": {
      "parameters": [
        {
          "in": "path",
          "name": "webhook-endpoint",
          "description": "Name of the webhook-endpoint on your server.",
          "required": true,
          "schema": {
            "type": "string",
            "maxLength": 500
          }
        }
      ],
      "get": {
        "operationId": "challenge-webhook-endpoint",
        "summary": "Respond to challenge",
        "description": "Respond to the challenge in order to activate your webhook-endpoint.",
        "x-mint": {
          "href": "about:blank"
        },
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "name": "echo",
            "description": "The challenge value you must return",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string",
                  "description": "When responding to the activation challenge workflow, return the challenge value as a simple string. When receiving a regular event, simply return an empty \"200 OK\". Refer to the documentation for [all status codes and their meaning](/documentation/webhooks/catching/spec-receive#response-status-codes)."
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "receive-events",
        "summary": "Receive events",
        "description": "Webhook event receiver, to be implemented on the client-side.",
        "x-mint": {
          "href": "about:blank"
        },
        "tags": [
          "Webhooks"
        ],
        "parameters": [
          {
            "in": "header",
            "name": "Lucca-Signature",
            "description": "Signature of the message",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Lucca-Timestamp",
            "description": "Timestamp of the message",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": [],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Refer to the documentation for the [event schema](/api-reference/latest/events/event).",
                "type": "object",
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted.\n\nMessage successfully received for asynchronous processing."
          },
          "400": {
            "description": "Bad request.\n\nInvalid Event received."
          },
          "401": {
            "description": "Unauthorized.\n\nSignature or timestamp mismatch."
          },
          "404": {
            "description": "Not Found.\n\nWebhook receiver endpoint not found."
          },
          "422": {
            "description": "Unprocessable Content.\n\nEvent type should not be processed on this webhook."
          },
          "500": {
            "description": "Internal Server Error.\n\nRetry sending this message again later."
          },
          "503": {
            "description": "Service Unavailable.\n\nServer is overloaded, will try sending this message again later."
          }
        }
      }
    }
  },
  "components": {}
}