FoPost Webhooks API

Event notifications for your endpoints

GitHub OpenAPI

Operations 8

GET /v1/webhooks List webhooks #
POST /v1/webhooks Create a webhook #
PUT /v1/webhooks/{id} Update a webhook #
DELETE /v1/webhooks/{id} Delete a webhook #
POST /v1/webhooks/{id}/test Send a test event #
GET /v1/webhooks/{id}/deliveries List deliveries #
GET /v1/webhooks/{id}/deliveries/{deliveryId} Get a delivery #
POST /v1/webhooks/{id}/deliveries/{deliveryId}/redeliver Redeliver #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/fopost-com:fopost-com-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

fopost-com-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FoPost Webhooks API
  version: 1.0.0
  description: 'REST API for FoPost — schedule, publish, and analyze social media content across every connected platform.


    ## Authentication


    Programmatic access uses an API key sent in the `X-API-Key` header. Keys are created in the FoPost dashboard under **Developers → API Keys** and are limited to the scopes granted at creation. Requests from the FoPost dashboard use a JWT bearer token instead (`Authorization: Bearer `), which implicitly carries all scopes. Either method works on every endpoint in this document unless noted otherwise.


    ## Scopes


    Each operation lists its required scope (also machine-readable as `x-fopost-scope`): `posts` (includes publishing, deliveries, and media), `workspaces`, `accounts`, `labels`, `webhooks`, `analytics`, `automations`.


    ## Responses


    Every key in a response body and every query parameter is snake_case; request bodies keep the field names documented on each operation. The ads endpoints (`/v1/ads/*`) are the one exception and keep camelCase keys. A single resource is returned as the object itself (`201` on create); a collection is `{ "data": [...], "meta": {...} }`. A success with nothing to return is `204` with an empty body.


    ## Errors


    Errors return `{ "error": "", "message": "" }` with a matching HTTP status, including an unknown route (`404 not_found`) and a server fault (`500 internal_error`). `error` is a stable snake_case code; `message` is for humans and may change. Some errors include additional context fields. A feature that is not set up on this deployment answers `503 not_configured`; a malformed answer from an upstream provider answers `502 upstream_error`.


    ## Request ids


    Every response carries an `X-Request-Id` header. Quote it when contacting support about a specific request.


    ## Rate limiting


    Requests are rate limited per API key, per minute, with a ceiling set by the plan behind the key. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`; exceeding the limit returns `429` with error code `too_many_requests`, a `retry_after` field and a `Retry-After` header. Mutating endpoints additionally require an active subscription and return `403` with error code `subscription_required` without one.


    ## Pagination


    Offset-paged lists accept `page` and `per_page` (1 to 100) and return `meta: { page, per_page, total, total_pages }`. Cursor-paged lists return `meta: { next_cursor, has_more }`; pass `next_cursor` back in the cursor parameter the operation documents until `has_more` is false. Lists that do not paginate return `{ "data": [...] }` with no `meta`.'
  contact:
    name: FoPost Support
    url: https://fopost.com/contact
  license:
    name: Proprietary
    url: https://fopost.com/terms
servers:
- url: https://api.fopost.com
  description: Production
security:
- ApiKeyAuth: []
- BearerAuth: []
- OAuth2: []
tags:
- name: Webhooks
  description: Event notifications for your endpoints
paths:
  /v1/webhooks:
    get:
      operationId: listWebhooks
      summary: List webhooks
      tags:
      - Webhooks
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Webhook'
                required:
                - data
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: Requires the `webhooks` scope when using an API key.
      x-fopost-scope: webhooks
    post:
      operationId: createWebhook
      summary: Create a webhook
      tags:
      - Webhooks
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookCreated'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Registers an HTTPS endpoint for workspace events. The signing `secret` is returned only in this response — store it to verify payloads.


        Requires the `webhooks` scope when using an API key.


        Requires an active subscription; without one the request fails with 403 `subscription_required`.'
      x-fopost-scope: webhooks
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookRequest'
  /v1/webhooks/{id}:
    put:
      operationId: updateWebhook
      summary: Update a webhook
      tags:
      - Webhooks
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookUpdated'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Re-enabling a webhook (`active: true`) resets its failure count.


        Requires the `webhooks` scope when using an API key.


        Requires an active subscription; without one the request fails with 403 `subscription_required`.'
      x-fopost-scope: webhooks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Webhook id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookRequest'
    delete:
      operationId: deleteWebhook
      summary: Delete a webhook
      tags:
      - Webhooks
      responses:
        '204':
          description: Deleted
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Requires the `webhooks` scope when using an API key.


        Requires an active subscription; without one the request fails with 403 `subscription_required`.'
      x-fopost-scope: webhooks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Webhook id
  /v1/webhooks/{id}/test:
    post:
      operationId: testWebhook
      summary: Send a test event
      tags:
      - Webhooks
      responses:
        '204':
          description: Test dispatched
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Dispatches a test `post.published` payload to this endpoint only, whatever it subscribes to.


        Requires the `webhooks` scope when using an API key.


        Requires an active subscription; without one the request fails with 403 `subscription_required`.'
      x-fopost-scope: webhooks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Webhook id
  /v1/webhooks/{id}/deliveries:
    get:
      operationId: listWebhookDeliveries
      summary: List deliveries
      tags:
      - Webhooks
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebhookDelivery'
                required:
                - data
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Every delivery attempt to this webhook, newest first, with the response it got. Attempts are kept for 30 days.


        Requires the `webhooks` scope when using an API key.'
      x-fopost-scope: webhooks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Webhook id
      - name: status
        in: query
        required: false
        schema:
          type: string
          enum:
          - success
          - failed
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          default: 50
          minimum: 1
          maximum: 200
  /v1/webhooks/{id}/deliveries/{deliveryId}:
    get:
      operationId: getWebhookDelivery
      summary: Get a delivery
      tags:
      - Webhooks
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDeliveryDetail'
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/InvalidId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'One attempt, including the payload that was sent.


        Requires the `webhooks` scope when using an API key.'
      x-fopost-scope: webhooks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Webhook id
      - name: deliveryId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id
  /v1/webhooks/{id}/deliveries/{deliveryId}/redeliver:
    post:
      operationId: redeliverWebhookDelivery
      summary: Redeliver
      tags:
      - Webhooks
      responses:
        '204':
          description: Redelivery queued
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/InvalidId'
        '429':
          $ref: '#/components/responses/RateLimited'
      description: 'Sends the delivery again with the identical body, so `X-FoPost-Signature` and `X-FoPost-Delivery` match the original; only the timestamp and `X-FoPost-Signature-256` are fresh. One attempt, logged as the next attempt of that delivery. A paused webhook answers 409.


        Requires the `webhooks` scope when using an API key.


        Requires an active subscription; without one the request fails with 403 `subscription_required`.'
      x-fopost-scope: webhooks
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Webhook id
      - name: deliveryId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Delivery id
components:
  schemas:
    WebhookUpdated:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workspace_id:
          type:
          - string
          - 'null'
          format: uuid
        name:
          type:
          - string
          - 'null'
        url:
          type: string
          format: uri
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
        header_names:
          $ref: '#/components/schemas/WebhookHeaderNames'
        active:
          type: boolean
        last_triggered_at:
          type:
          - string
          - 'null'
          format: date-time
        failure_count:
          type: integer
        created_at:
          type: string
          format: date-time
        secret:
          type: string
          description: Present only when this request rotated the secret. Returned once.
    CreateWebhookRequest:
      type: object
      properties:
        workspaceId:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
          maxLength: 120
          description: A label for the endpoint
        url:
          type: string
          maxLength: 2048
          format: uri
          description: HTTPS endpoint on a public host
        events:
          type: array
          items:
            type: string
            enum:
            - post.scheduled
            - post.published
            - post.partially_failed
            - post.failed
            - post.deleted
            - delivery.published
            - delivery.failed
            - delivery.delayed
            - account.connected
            - account.disconnected
            - account.health_changed
            - inbox.comment_received
            - inbox.mention_received
            - inbox.message_received
            - inbox.review_received
            - inbox.reply_sent
            - automation.triggered
            - automation.completed
            - automation.failed
          minItems: 1
        secret:
          type: string
          minLength: 16
          maxLength: 255
          description: Signing secret. Omit to have one generated; either way it is returned once.
        headers:
          type: object
          additionalProperties:
            type: string
            minLength: 1
            maxLength: 1024
          description: Custom headers sent with every delivery. Values are write-only and never returned; signing headers cannot be overridden.
      required:
      - workspaceId
      - url
      - events
    Error:
      type: object
      properties:
        error:
          type: string
          description: Stable snake_case error code
        message:
          type: string
          description: Human-readable explanation; may change
      required:
      - error
      - message
      additionalProperties: true
      description: The one error envelope, on every endpoint including an unknown route (`not_found`) and a server fault (`internal_error`). Some errors carry additional context fields (for example `retry_after`, `upgrade_url`, `issues`). Every response also carries an `X-Request-Id` header to quote to support.
    UpdateWebhookRequest:
      type: object
      properties:
        name:
          type:
          - string
          - 'null'
          minLength: 1
          maxLength: 120
        url:
          type: string
          maxLength: 2048
          format: uri
        events:
          type: array
          items:
            type: string
            enum:
            - post.scheduled
            - post.published
            - post.partially_failed
            - post.failed
            - post.deleted
            - delivery.published
            - delivery.failed
            - delivery.delayed
            - account.connected
            - account.disconnected
            - account.health_changed
            - inbox.comment_received
            - inbox.mention_received
            - inbox.message_received
            - inbox.review_received
            - inbox.reply_sent
            - automation.triggered
            - automation.completed
            - automation.failed
          minItems: 1
        active:
          type: boolean
        secret:
          type: string
          minLength: 16
          maxLength: 255
          description: Rotates the signing secret; the new value is returned once in this response.
        headers:
          type:
          - object
          - 'null'
          additionalProperties:
            type:
            - string
            - 'null'
            minLength: 1
            maxLength: 1024
          description: Replaces the header set. A null value keeps the stored value of an existing header; a top-level null clears every header.
    WebhookEvent:
      type: string
      enum:
      - post.scheduled
      - post.published
      - post.partially_failed
      - post.failed
      - post.deleted
      - delivery.published
      - delivery.failed
      - delivery.delayed
      - account.connected
      - account.disconnected
      - account.health_changed
      - inbox.comment_received
      - inbox.mention_received
      - inbox.message_received
      - inbox.review_received
      - inbox.reply_sent
      - automation.triggered
      - automation.completed
      - automation.failed
    WebhookCreated:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workspace_id:
          type: string
          format: uuid
        name:
          type:
          - string
          - 'null'
        url:
          type: string
          format: uri
        secret:
          type: string
          description: Signing secret for verifying webhook payloads. Returned only once, on creation.
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
        header_names:
          $ref: '#/components/schemas/WebhookHeaderNames'
        active:
          type: boolean
        last_triggered_at:
          type:
          - string
          - 'null'
          format: date-time
        failure_count:
          type: integer
        created_at:
          type: string
          format: date-time
      required:
      - id
      - workspace_id
      - url
      - secret
      - events
      - header_names
      - active
    Webhook:
      type: object
      properties:
        id:
          type: string
          format: uuid
        workspace_id:
          type:
          - string
          - 'null'
          format: uuid
        name:
          type:
          - string
          - 'null'
        url:
          type: string
          format: uri
        events:
          type: array
          items:
            $ref: '#/components/schemas/WebhookEvent'
        header_names:
          $ref: '#/components/schemas/WebhookHeaderNames'
        active:
          type: boolean
        last_triggered_at:
          type:
          - string
          - 'null'
          format: date-time
        failure_count:
          type: integer
        created_at:
          type: string
          format: date-time
    WebhookDelivery:
      type: object
      properties:
        id:
          type: string
          format: uuid
        webhook_id:
          type: string
          format: uuid
        event:
          $ref: '#/components/schemas/WebhookEvent'
        delivery_key:
          type: string
          description: The X-FoPost-Delivery id; every attempt of one event shares it
        attempt:
          type: integer
          description: 1 for the first send; retries and redeliveries count up
        status:
          type: string
          enum:
          - success
          - failed
        response_status:
          type:
          - integer
          - 'null'
          description: Null when no response arrived
        response_snippet:
          type:
          - string
          - 'null'
          description: Up to 500 characters of what the endpoint answered, secrets redacted
        duration_ms:
          type: integer
        payload_hash:
          type: string
          description: SHA-256 of the body that was sent
        next_retry_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
    WebhookHeaderNames:
      type: array
      items:
        type: string
      description: Names of the custom headers sent with every delivery. Values are write-only.
    WebhookDeliveryDetail:
      type: object
      properties:
        id:
          type: string
          format: uuid
        webhook_id:
          type: string
          format: uuid
        event:
          $ref: '#/components/schemas/WebhookEvent'
        delivery_key:
          type: string
        attempt:
          type: integer
        status:
          type: string
          enum:
          - success
          - failed
        response_status:
          type:
          - integer
          - 'null'
        response_snippet:
          type:
          - string
          - 'null'
        duration_ms:
          type: integer
        payload_hash:
          type: string
        next_retry_at:
          type:
          - string
          - 'null'
          format: date-time
        created_at:
          type: string
          format: date-time
        payload:
          type: object
          description: The body exactly as it was sent
  responses:
    Unauthorized:
      description: Missing or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    InvalidId:
      description: Malformed id path parameter
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    ValidationError:
      description: Request body or parameters failed validation
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    NotFound:
      description: Resource not found or not accessible to the authenticated user
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    Conflict:
      description: The request conflicts with the current state of the resource
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    RateLimited:
      description: Too many requests for this API key in the current minute. The body carries `retry_after` (seconds) and the response carries `Retry-After`, `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
    Forbidden:
      description: The API key lacks the required scope, or a mutating route was called without an active subscription (`subscription_required`)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
  headers:
    XRequestId:
      description: Unique id of this request; quote it to support
      schema:
        type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key created in the FoPost dashboard. A key may be bound to a single workspace, in which case every request is confined to it: naming any other workspace returns 403, and listings return only that workspace. Keys created without a workspace keep access to every workspace on the account.'
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Session token used by the FoPost dashboard
    OAuth2:
      type: oauth2
      description: For third-party apps acting on behalf of a FoPost user. Authorization code with PKCE (S256) is required. The token is confined to the workspace the user approved and to the scopes they granted.
      flows:
        authorizationCode:
          authorizationUrl: https://api.fopost.com/oauth/authorize
          tokenUrl: https://api.fopost.com/oauth/token
          refreshUrl: https://api.fopost.com/oauth/token
          scopes:
            posts: Read and write posts, media and content
            publish: Publish, retry and cancel a post
            accounts: Connected social accounts
            workspaces: List and manage workspaces
            labels: Labels used to organise posts
            webhooks: Webhook endpoints
            analytics: Metrics and insights
            automations: Automation rules and runs
            inbox: Comments, mentions and messages
            ads: Ads, audiences and lead forms across ad networks
            ai: AI features (spends credits)
            extension: Reserved for the browser extension