Prefect Webhooks API

The Webhooks API from Prefect — 4 operation(s) for webhooks.

Operations 7

POST /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/ Create Webhook #
PUT /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id} Update Webhook #
PATCH /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id} Partial Update Webhook #
DELETE /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id} Delete Webhook #
GET /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id} Read Webhook #
POST /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/filter Query Webhooks #
POST /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id}/rotate Rotate Webhook Slug #

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/prefect-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

prefect-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Prefect Cloud Account Billing Webhooks API
  description: Prefect Cloud REST API documentation.
  version: 0.8.4
tags:
- name: Webhooks
paths:
  /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/:
    post:
      tags:
      - Webhooks
      summary: Create Webhook
      operationId: create_webhook_api_accounts__account_id__workspaces__workspace_id__webhooks__post
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id}:
    put:
      tags:
      - Webhooks
      summary: Update Webhook
      operationId: update_webhook_api_accounts__account_id__workspaces__workspace_id__webhooks__webhook_id__put
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Webhook Id
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookUpdate'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Webhooks
      summary: Partial Update Webhook
      operationId: partial_update_webhook_api_accounts__account_id__workspaces__workspace_id__webhooks__webhook_id__patch
      parameters:
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Webhook Id
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPartialUpdate'
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Webhooks
      summary: Delete Webhook
      operationId: delete_webhook_api_accounts__account_id__workspaces__workspace_id__webhooks__webhook_id__delete
      parameters:
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Webhook Id
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Webhooks
      summary: Read Webhook
      operationId: read_webhook_api_accounts__account_id__workspaces__workspace_id__webhooks__webhook_id__get
      parameters:
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Webhook Id
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/filter:
    post:
      tags:
      - Webhooks
      summary: Query Webhooks
      operationId: query_webhooks_api_accounts__account_id__workspaces__workspace_id__webhooks_filter_post
      parameters:
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Body_query_webhooks_api_accounts__account_id__workspaces__workspace_id__webhooks_filter_post'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/WebhookRead'
                title: Response Query Webhooks Api Accounts  Account Id  Workspaces  Workspace Id  Webhooks Filter Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/accounts/{account_id}/workspaces/{workspace_id}/webhooks/{webhook_id}/rotate:
    post:
      tags:
      - Webhooks
      summary: Rotate Webhook Slug
      operationId: rotate_webhook_slug_api_accounts__account_id__workspaces__workspace_id__webhooks__webhook_id__rotate_post
      parameters:
      - name: webhook_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Webhook Id
      - name: workspace_id
        in: path
        required: true
        schema:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace Id
      - name: account_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Account Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Webhook'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    APIKey:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated
        actor_id:
          type: string
          format: uuid
          title: Actor Id
        name:
          type: string
          title: Name
          description: The name of the api key.
        expiration:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expiration
          description: The time at which the api key expires. If `None`, the api key will not expire.
        hash:
          type: string
          title: Hash
        masked_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Masked Key
          description: Masked API key showing prefix and last 4 characters (e.g., pnu_...a1b2).
      type: object
      required:
      - actor_id
      - name
      - hash
      title: APIKey
      description: An ORM representation of an APIKey
    BotPartial:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated
        actor_id:
          type: string
          format: uuid
          title: Actor Id
          description: The actor id associated with this bot.
        account_id:
          type: string
          format: uuid
          title: Account Id
          description: The bot's account id. Bots can only belong to one account.
        name:
          type: string
          title: Name
          description: The name of the bot.
        api_key:
          $ref: '#/components/schemas/APIKey'
          description: The API Key the bot owns.
      type: object
      required:
      - actor_id
      - account_id
      - name
      - api_key
      title: BotPartial
      description: An ORM representation of a Bot
    WebhookPartialUpdate:
      properties:
        enabled:
          type: boolean
          title: Enabled
          description: Whether the webhook is enabled
          default: true
      additionalProperties: false
      type: object
      title: WebhookPartialUpdate
      description: Defines an inbound webhook to receive events from external systems
    WebhookSort:
      type: string
      enum:
      - CREATED_ASC
      - CREATED_DESC
      - UPDATED_ASC
      - UPDATED_DESC
      - NAME_ASC
      - NAME_DESC
      - KEY_EXPIRATION_ASC
      - KEY_EXPIRATION_DESC
      title: WebhookSort
      description: Defines webhook sorting options.
    Webhook:
      properties:
        name:
          type: string
          maxLength: 5000
          title: Name
          description: The name of the webhook
        description:
          type: string
          title: Description
          description: A longer description of the webhook
          default: ''
        enabled:
          type: boolean
          title: Enabled
          description: Whether the webhook is enabled
          default: true
        service_account_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Service Account Id
          description: The Service Account to which this webhook belongs
        template:
          type: string
          maxLength: 30000
          title: Template
          description: The template which translates the incoming HTTP headers and body into a Prefect Event
        id:
          type: string
          format: uuid
          title: Id
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated
        account:
          type: string
          format: uuid
          title: Account
          description: The Account to which this webhook belongs
        workspace:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace
          description: The Workspace to which this webhook belongs
        slug:
          type: string
          title: Slug
          description: The slug of the webhook, used in the URL
      type: object
      required:
      - name
      - template
      - account
      - workspace
      title: Webhook
      description: Defines an inbound webhook to receive events from external systems
    WebhookRead:
      properties:
        name:
          type: string
          maxLength: 5000
          title: Name
          description: The name of the webhook
        description:
          type: string
          title: Description
          description: A longer description of the webhook
          default: ''
        enabled:
          type: boolean
          title: Enabled
          description: Whether the webhook is enabled
          default: true
        service_account_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Service Account Id
          description: The Service Account to which this webhook belongs
        template:
          type: string
          maxLength: 30000
          title: Template
          description: The template which translates the incoming HTTP headers and body into a Prefect Event
        id:
          type: string
          format: uuid
          title: Id
        created:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Created
        updated:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Updated
        account:
          type: string
          format: uuid
          title: Account
          description: The Account to which this webhook belongs
        workspace:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Workspace
          description: The Workspace to which this webhook belongs
        slug:
          type: string
          title: Slug
          description: The slug of the webhook, used in the URL
        service_account:
          anyOf:
          - $ref: '#/components/schemas/BotPartial'
          - type: 'null'
          description: The Service Account to which this webhook belongs
      additionalProperties: false
      type: object
      required:
      - name
      - template
      - account
      - workspace
      - service_account
      title: WebhookRead
    WebhookCreate:
      properties:
        name:
          type: string
          maxLength: 5000
          title: Name
          description: The name of the webhook
        description:
          type: string
          maxLength: 5000
          title: Description
          description: A longer description of the webhook
          default: ''
        enabled:
          type: boolean
          title: Enabled
          description: Whether the webhook is enabled
          default: true
        service_account_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Service Account Id
          description: The Service Account to which this webhook belongs
        template:
          type: string
          maxLength: 30000
          title: Template
          description: The template which translates the incoming HTTP headers and body into a Prefect Event
      additionalProperties: false
      type: object
      required:
      - name
      - template
      title: WebhookCreate
      description: Defines an inbound webhook to receive events from external systems
    WebhookUpdate:
      properties:
        name:
          type: string
          maxLength: 5000
          title: Name
          description: The name of the webhook
        description:
          type: string
          maxLength: 5000
          title: Description
          description: A longer description of the webhook
          default: ''
        enabled:
          type: boolean
          title: Enabled
          description: Whether the webhook is enabled
          default: true
        service_account_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Service Account Id
          description: The Service Account to which this webhook belongs
        template:
          type: string
          maxLength: 30000
          title: Template
          description: The template which translates the incoming HTTP headers and body into a Prefect Event
      additionalProperties: false
      type: object
      required:
      - name
      - template
      title: WebhookUpdate
      description: Defines an inbound webhook to receive events from external systems
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    Body_query_webhooks_api_accounts__account_id__workspaces__workspace_id__webhooks_filter_post:
      properties:
        sort:
          $ref: '#/components/schemas/WebhookSort'
          default: NAME_ASC
        offset:
          type: integer
          minimum: 0.0
          title: Offset
          default: 0
        limit:
          type: integer
          title: Limit
          description: Defaults to PREFECT_ORION_API_DEFAULT_LIMIT if not provided.
      type: object
      title: Body_query_webhooks_api_accounts__account_id__workspaces__workspace_id__webhooks_filter_post