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

# Send a test event

> Send one webhook.test event to an endpoint.

> [!NOTE]
>
> Needs `webhooks:update`, and a role that can manage notifications (owners and managers) in the endpoint's workspace and in every workspace it also sends events from. See [Permissions](/docs/essentials/authentication.md#permissions).

Sends one `webhook.test` event to this endpoint alone, signed like any other event. No other endpoint gets it and no notification is made. Its `data` is `{ "message": "This is a test event from PostSyncer." }`.

The answer is the delivery, `pending`: the send happens right after. Read [List webhook deliveries](/docs/api-reference/webhooks/deliveries.md) a moment later to see what your server answered. A failed test is retried like any event (see [Delivery and retries](/docs/api-reference/webhooks/overview.md#delivery-and-retries)). An endpoint that is turned off still gets a delivery, marked `failed` with the error `The destination is off.`

## Errors

| Status | `error` | When | Retry? |
| - | - | - | - |
| 401 | | No API key, or not a valid one. | No: fix the key. |
| 403 | | The key lacks `webhooks:update`, or its user is inactive. | No: grant it in Settings → API. |
| 403 | | Your role can't manage notifications in its workspace, or it sends events from workspaces you can't manage. | No. |
| 404 | | No webhook with that id in the workspaces the key can reach. | No. |
| 429 | | More than 60 requests a minute. | Yes, after `Retry-After` seconds. |

## Related

* [Verify webhooks](/docs/guides/verify-webhooks.md): check the signature on your side.
* [List webhook deliveries](/docs/api-reference/webhooks/deliveries.md): how the test went.


## OpenAPI

````yaml POST /webhooks/{id}/test
openapi: 3.0.3
info:
  title: PostSyncer API
  description: >-
    Post to 12 social networks from your code: posts, media, comments,
    analytics, webhooks and more.
  version: 1.0.0
servers:
  - url: https://postsyncer.com/api/v1
security:
  - bearerAuth: []
tags:
  - name: Workspaces
    description: The workspaces the key can reach.
  - name: Accounts
    description: Connected social accounts, links to connect more, and disconnecting them.
  - name: Posts
    description: Drafts, scheduled and published posts, approvals and a post's history.
  - name: Post settings
    description: A post's auto-plug, comment moderation and contact collection.
  - name: Media
    description: >-
      The media library: file uploads, URL imports, and reading videos and
      social posts' files.
  - name: Folders
    description: Folders that organise the media library.
  - name: Comments
    description: >-
      Comments on your posts: reading, replying, editing, hiding, deleting and
      syncing them.
  - name: Reviews
    description: Google Business Profile reviews and your replies to them.
  - name: Analytics
    description: Workspace, account and post performance.
  - name: Brand
    description: >-
      A workspace's brand: identity, voice, look, accounts, competitors,
      learnings and rules.
  - name: Labels
    description: Labels used to tag posts.
  - name: Campaigns
    description: Campaigns used to group posts.
  - name: Snippets
    description: Saved snippets and hashtag groups to drop into posts.
  - name: Webhooks
    description: Signed webhook endpoints that get your notification events.
  - name: Billing
    description: >-
      The owner's plan, invoices and the links that pay for, change or cancel
      it.
  - name: Team
    description: A workspace's teammates and invitations, and their roles.
  - name: Notifications
    description: >-
      Your bell and notification settings, and the workspace's Slack, Discord
      and Telegram channels.
  - name: Blog-to-social
    description: Blog feeds that turn a workspace's new articles into posts.
  - name: Products
    description: Products the workspace's posts can promote.
  - name: Contacts
    description: People who commented on the workspace's posts, and the lists they are on.
  - name: Profile
    description: 'The key''s user: their name and sign-in email.'
  - name: API keys
    description: 'Your API keys: listing and deleting them.'
  - name: Agent sign-up
    description: >-
      An AI agent signs a person up with a code emailed to them, and gets their
      first key. No key needed.
paths:
  /webhooks/{id}/test:
    post:
      tags:
        - Webhooks
      summary: Send a test event
      description: >-
        Needs `webhooks:update`. Your role must let you manage notifications in
        its workspace and in every workspace it also sends events from. Sends
        one `webhook.test` event to this endpoint alone, signed like any other.
        The answer is its delivery, `pending`: the send happens right after.
        [List deliveries](/api-reference/webhooks/deliveries) shows how it went.
        An endpoint that is turned off still gets a delivery, marked `failed`
        with `The destination is off.` Webhooks work on every plan, Free
        included.
      operationId: testWebhook
      parameters:
        - name: id
          in: path
          required: true
          description: The webhook's id.
          schema:
            type: integer
      responses:
        '201':
          description: The test delivery, before it is sent.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDelivery'
              examples:
                default:
                  summary: A test delivery
                  value:
                    id: 913
                    destination_id: 42
                    event_id: 01q9aa8mm0k5r6t1n0xwdq7h3m
                    event_type: webhook.test
                    status: pending
                    attempts: 0
                    response_status: null
                    response_body: null
                    error: null
                    duration_ms: null
                    next_attempt_at: null
                    request_headers: null
                    request_body: null
                    created_at: '2030-03-15T09:00:00+00:00'
                    updated_at: '2030-03-15T09:00:00+00:00'
        '401':
          $ref: '#/components/responses/Unauthorized401'
        '403':
          description: >-
            The key lacks `webhooks:update`, its user is inactive, or your role
            can't manage notifications in the workspace, or it sends events from
            workspaces you can't manage.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                missing_permission:
                  summary: The key lacks webhooks:update
                  value:
                    message: >-
                      This API key does not have the "webhooks:update"
                      permission. Edit the key in PostSyncer under Settings →
                      API to grant it.
                role:
                  summary: The role can't manage notifications
                  value:
                    message: >-
                      Your role in the workspace "Halden Coffee" does not allow
                      you to edit notifications. Ask the workspace owner or a
                      manager to do it, or to change your role.
                scope:
                  summary: It sends events from workspaces you can't manage
                  value:
                    message: >-
                      This destination also sends events from workspaces you
                      can’t manage. Ask the person who set it up to change it.
                inactive_account:
                  summary: The key's user is inactive
                  value:
                    message: Your account is inactive.
        '404':
          $ref: '#/components/responses/NotFound404'
        '429':
          $ref: '#/components/responses/RateLimited429'
components:
  schemas:
    WebhookDelivery:
      type: object
      description: 'One event sent to an endpoint: the last request and what came back.'
      required:
        - id
        - destination_id
        - event_id
        - event_type
        - status
        - attempts
        - response_status
        - response_body
        - error
        - duration_ms
        - next_attempt_at
        - request_headers
        - request_body
        - created_at
        - updated_at
      properties:
        id:
          type: integer
        destination_id:
          type: integer
          description: The webhook's id.
        event_id:
          type: string
          description: The event's id, also the `webhook-id` header. The same on every try.
        event_type:
          type: string
          description: The event, like `post.failed`.
        status:
          type: string
          enum:
            - pending
            - sent
            - failed
            - gave_up
          description: >-
            `pending` waits for a try or a retry, `sent` got a 2xx, `failed`
            isn't tried again, `gave_up` used every retry. A webhook gets 7
            tries over about 41 hours.
        attempts:
          type: integer
          description: The tries so far.
        response_status:
          type: integer
          nullable: true
          description: >-
            The HTTP status your server answered on the last try; null when no
            answer came.
        response_body:
          type: string
          nullable: true
          description: The start of your server's answer, up to 1000 characters.
        error:
          type: string
          nullable: true
          description: What went wrong on the last try, in plain words.
        duration_ms:
          type: integer
          nullable: true
          description: How long the last try took.
        next_attempt_at:
          type: string
          format: date-time
          nullable: true
          description: >-
            When the next try is due, for a `pending` delivery whose last try
            failed; null otherwise.
        request_headers:
          type: object
          nullable: true
          additionalProperties:
            type: string
          description: >-
            The headers of the last request: `webhook-id`, `webhook-timestamp`,
            `webhook-signature` and `content-type`. Null before the first try.
        request_body:
          type: string
          nullable: true
          description: >-
            The JSON body of the last request, as sent, up to its first 64 KB.
            Null before the first try.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      type: object
      description: >-
        An error answer. Every one has `message`, in plain words; some add an
        `error` code and fields of their own.
      required:
        - message
      properties:
        message:
          type: string
          description: What went wrong and what to do about it.
        error:
          type: string
          description: >-
            A code a few errors add, such as `rate_limited`. See [Handle
            errors](/essentials/error-handling#answers-with-an-error-code).
  responses:
    Unauthorized401:
      description: No API key, or not a valid one.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthenticated:
              summary: No valid API key
              value:
                message: Unauthenticated.
    NotFound404:
      description: Nothing with that id in the workspaces the key can reach.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              summary: Not found
              value:
                message: Not found.
    RateLimited429:
      description: >-
        More than 60 requests in a minute from this key's user (the API and the
        MCP server share the count). Wait `Retry-After` seconds.
      headers:
        Retry-After:
          description: Seconds until requests are allowed again.
          schema:
            type: integer
        X-RateLimit-Limit:
          description: Requests allowed a minute.
          schema:
            type: integer
        X-RateLimit-Remaining:
          description: Requests left this minute.
          schema:
            type: integer
        X-RateLimit-Reset:
          description: When requests are allowed again, as a Unix timestamp.
          schema:
            type: integer
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            too_many_attempts:
              summary: Too many requests
              value:
                message: Too Many Attempts.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.