# Generate a sample webhook payload

Builds the same payload shape used for serverless invocations and webhook delivery from a record and event type, without invoking anything.

Endpoint: POST /api/v2/apps/{appUuid}/serverless-functions/sample-payload
Version: 2.0
Security: bearerAuth

## Path parameters:

  - `appUuid` (string, required)
    UUID of the app

## Request fields (application/json):

  - `recordUuid` (string)
    UUID of the record to base the sample payload on.
    Example: "record-uuid"

  - `eventType` (string)
    Event type to simulate (created, updated, deleted, etc.).
    Example: "created"

## Response 200 fields (application/json):

  - `message` (string)
    Example: "Success"

  - `data` (object)

## Response 400 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 401 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 403 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 404 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"

## Response 500 fields (application/json):

  - `message` (string)
    The error message providing details about the failure.
    Example: "Resource not found."

  - `errors` (array)
    A list of error types providing further details about the error.

  - `errors.message` (string, required)
    The error message providing details about the failure.
    Example: "Invalid file type."

  - `errors.type` (string, required)
    The type of error.
    Enum: "VALIDATION", "NOT_FOUND", "TEST", "RELATION_NOT_ALLOWED", "INVALID_VALUE", "GENERAL", "INVALID_FILE_TYPE", "INTERNAL_SERVER_ERROR", "CARAER_ERROR", "INVALID_EMAIL", "INVALID_DATE"

  - `errors.correctionSuggestion` (string, required)
    A suggestion on how to correct the error.
    Example: "Try uploading a different file type."

  - `status` (integer)
    The HTTP status code associated with the error.
    Example: 400

  - `stackTrace` (string)

  - `roles` (array)
    Roles the caller is missing when the failure is an authorization error.
    Enum: "USER", "ADMIN", "RESELLER", "DEVELOPER", "SUPER_ADMIN"

  - `scopes` (array)
    Scopes the caller is missing when the failure is an authorization error.

  - `requestId` (string)
    Request correlation ID for support and log tracing.
    Example: "a1b2c3d4-e5f6-7890-abcd-ef1234567890"


