Portainer Webhooks API

Manage webhooks

Operations 5

GET /webhooks List webhooks #
POST /webhooks Create a webhook #
DELETE /webhooks/{id} Delete a webhook #
POST /webhooks/{id} Execute a webhook #
PUT /webhooks/{id} Update a webhook #

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/portainer-webhooks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

portainer-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: info@portainer.io
  description: Portainer API is an HTTP API served by Portainer.
  license:
    name: zlib
    url: https://github.com/portainer/portainer/blob/develop/LICENSE
  title: PortainerCE Webhooks API
  version: 2.39.1
servers:
- url: /api
tags:
- description: Manage webhooks
  name: Webhooks
paths:
  /webhooks:
    get:
      description: '**Access policy**: authenticated'
      parameters:
      - description: Filters (json-string)
        example: '{"EndpointID":1,"ResourceID":"abc12345-abcd-2345-ab12-58005b4a0260"}'
        in: query
        name: filters
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/portainer.Webhook'
                type: array
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: List webhooks
      tags:
      - Webhooks
      operationId: getWebhooks
      x-operation-id-source: derived
    post:
      description: '**Access policy**: authenticated'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.Webhook'
        '400':
          description: Invalid request
        '409':
          description: A webhook for this resource already exists
        '500':
          description: Server error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Create a webhook
      tags:
      - Webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhooks.webhookCreatePayload'
        description: Webhook data
        required: true
      operationId: postWebhooks
      x-operation-id-source: derived
  /webhooks/{id}:
    delete:
      description: '**Access policy**: authenticated'
      parameters:
      - description: Webhook id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '202':
          description: Webhook deleted
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Delete a webhook
      tags:
      - Webhooks
      operationId: deleteWebhooksById
      x-operation-id-source: derived
    post:
      description: 'Acts on a passed in token UUID to restart the docker service

        **Access policy**: public'
      parameters:
      - description: Webhook token
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '202':
          description: Webhook executed
        '400':
          description: Bad Request
        '500':
          description: Internal Server Error
      summary: Execute a webhook
      tags:
      - Webhooks
      operationId: postWebhooksById
      x-operation-id-source: derived
    put:
      description: '**Access policy**: authenticated'
      parameters:
      - description: Webhook id
        in: path
        name: id
        required: true
        schema:
          type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/portainer.Webhook'
        '400':
          description: Bad Request
        '409':
          description: Conflict
        '500':
          description: Internal Server Error
      security:
      - ApiKeyAuth: []
      - jwt: []
      summary: Update a webhook
      tags:
      - Webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/webhooks.webhookUpdatePayload'
        description: Webhook data
        required: true
      operationId: putWebhooksById
      x-operation-id-source: derived
components:
  schemas:
    portainer.WebhookType:
      enum:
      - 0
      - 1
      type: integer
      x-enum-varnames:
      - _
      - ServiceWebhook
    portainer.Webhook:
      properties:
        EndpointId:
          type: integer
        Id:
          description: Webhook Identifier
          example: 1
          type: integer
        RegistryId:
          type: integer
        ResourceId:
          type: string
        Token:
          type: string
        Type:
          allOf:
          - $ref: '#/components/schemas/portainer.WebhookType'
          description: Type of webhook (1 - service)
      type: object
    webhooks.webhookCreatePayload:
      properties:
        EndpointID:
          type: integer
        RegistryID:
          type: integer
        ResourceID:
          type: string
        WebhookType:
          allOf:
          - $ref: '#/components/schemas/portainer.WebhookType'
          description: Type of webhook (1 - service)
      type: object
    webhooks.webhookUpdatePayload:
      properties:
        RegistryID:
          type: integer
      type: object
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-API-KEY
      type: apiKey
    jwt:
      in: header
      name: Authorization
      type: apiKey