> ## Documentation Index
> Fetch the complete documentation index at: https://formhug.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a sample payload

> Returns the payload shape that the webhook would deliver, useful for testing the receiver side.

**Required scope:** `form:read`.




## OpenAPI

````yaml /api-reference/openapi.yaml get /api/v1/forms/{form_token}/integrations/webhooks/sample_payload
openapi: 3.0.1
info:
  title: FormHug API V1
  version: v1
  description: |
    FormHug public REST API. All request/response keys are snake_case.

    Successful response:

    ```json
    {
      "data": { ... }
    }
    ```

    Paginated response:

    ```json
    {
      "data": [ ... ],
      "pagination": {
        "total": 123,
        "next_cursor": "NQ=="
      }
    }
    ```

    Error response:

    ```json
    {
      "error": "Human-readable message",
      "error_details": [
        { "attribute": "field_name", "message": "specific error" }
      ]
    }
    ```

    `error_details` only appears for model validation failures.
servers:
  - url: https://formhug.ai
security: []
tags:
  - name: Forms
    description: Form CRUD
  - name: Attachments
    description: >-
      2-step upload for form-element images (theme, rich-text, or field-element
      images). Prepare returns an `upload_id`; consume it in a theme update,
      attachment_commitments, or the form `fields` payload depending on purpose.
  - name: Entries
    description: Entries collected by a form owned by the current user
  - name: Folders
    description: Folder CRUD
  - name: Participated Forms
    description: Forms the current user has submitted to (does not own)
  - name: Published Form Entries
    description: Submit entries to a published form
  - name: Published Forms
    description: Read a published form's public structure for filling
  - name: Entry Attachments
    description: >-
      2-step upload for `attachment` field submissions. Prepare returns an
      `upload_id`; submit it under the attachment field in `field_values` when
      creating the entry.
  - name: Me
    description: Current authenticated user
  - name: Webhooks
    description: Webhook integrations attached to a form
  - name: Form Themes
    description: Read and update a form's visual theme
  - name: Form Settings
    description: >-
      Per-form settings — submission flow, availability, access control,
      presentation
  - name: Field Rules
    description: >-
      Read and replace a form's conditional field-display and post-submission
      redirect rules.
  - name: OAuth
    description: OAuth 2.0 PKCE token issuance and revocation
paths:
  /api/v1/forms/{form_token}/integrations/webhooks/sample_payload:
    parameters:
      - name: form_token
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Webhooks
      summary: Get a sample payload
      description: >
        Returns the payload shape that the webhook would deliver, useful for
        testing the receiver side.


        **Required scope:** `form:read`.
      parameters:
        - name: trigger_event
          in: query
          required: false
          schema:
            type: string
            enum:
              - entry_created
              - entry_updated
              - entry_paid
          description: >-
            Target event_type; defaults to the first registered event when
            omitted
          example: entry_created
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - event_type
                      - data
                    properties:
                      event_type:
                        type: string
                        enum:
                          - entry_created
                          - entry_updated
                          - entry_paid
                        example: entry_created
                      data:
                        type: object
                        description: >-
                          Event payload. `entry` is keyed by each field api_code
                          with example values.
                        required:
                          - form
                          - form_name
                          - entry
                        properties:
                          form:
                            type: string
                            description: Form token
                            example: Wabc12
                          form_name:
                            type: string
                            description: Form display name
                            example: Customer feedback
                          entry:
                            type: object
                            description: >-
                              Submitted entry data. Keys are a mix of well-known
                              meta fields and per-form

                              field values keyed by api_code (`field_N` for user
                              fields, `info_*` for

                              system fields, `x_field_N` for extended
                              attributes, plus app-specific keys

                              like `total_price`, `color_mark`,
                              `reservation_status_*`).
                            additionalProperties: true
                            example:
                              serial_number: 123
                              total_price: 123
                              preferential_price: 123
                              field_1: Jack
                              field_2: support@formhug.ai
                              x_field_1: This is a passage
                              color_mark: Green
                              creator_name: Jim
                              created_at: '2026-05-12T10:48:13.909Z'
                              updated_at: '2026-05-12T10:48:13.909Z'
                              info_filling_duration: 123
                              info_platform: Macintosh
                              info_os: OS X 10.15.7
                              info_browser: Chrome 147.0.0.0
                              info_remote_ip: 127.0.0.1
                              info_user_agent: >-
                                Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
                                AppleWebKit/537.36 (KHTML, like Gecko)
                                Chrome/147.0.0.0 Safari/537.36
                              reservation_status_fsf_field: Booked
        '404':
          description: Form not found or not owned by current user
          content:
            application/json:
              examples:
                not_found:
                  value:
                    error: Form not found
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Unknown trigger_event
          content:
            application/json:
              examples:
                invalid_event:
                  value:
                    error: Invalid trigger_event
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - PersonalAccessToken:
            - form:read
components:
  schemas:
    ErrorEnvelope:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
  securitySchemes:
    PersonalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: PAT
      description: >
        Personal Access Token prefixed with `fh_`. Sent as `Authorization:
        Bearer fh_xxx`.

        The scope required by each endpoint is listed in that endpoint's
        description.

````