Cloudsmith webhooks API

The webhooks API from Cloudsmith — 2 operation(s) for webhooks.

Operations 5

GET /webhooks/{owner}/{repo}/ Get a list of all webhooks in a repository. #
POST /webhooks/{owner}/{repo}/ Create a specific webhook in a repository. #
GET /webhooks/{owner}/{repo}/{identifier}/ Views for working with repository webhooks. #
PATCH /webhooks/{owner}/{repo}/{identifier}/ Update a specific webhook in a repository. #
DELETE /webhooks/{owner}/{repo}/{identifier}/ Delete a specific webhook in a repository. #

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

cloudsmith-webhooks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudsmith API (v1) audit-log Webhooks API
  description: The API to the Cloudsmith Service
  termsOfService: https://help.cloudsmith.io
  contact:
    name: Cloudsmith Support
    url: https://help.cloudsmith.io
    email: support@cloudsmith.io
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: v1
servers:
- url: https://api.cloudsmith.io/
security:
- apikey: []
- basic: []
tags:
- name: webhooks
paths:
  /webhooks/{owner}/{repo}/:
    parameters:
    - name: owner
      in: path
      required: true
      schema:
        type: string
    - name: repo
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: webhooks_list
      summary: Get a list of all webhooks in a repository.
      description: Get a list of all webhooks in a repository.
      parameters:
      - name: page
        in: query
        description: A page number within the paginated result set.
        required: false
        schema:
          type: integer
      - name: page_size
        in: query
        description: Number of results to return per page.
        required: false
        schema:
          type: integer
      responses:
        '200':
          description: Retrieved the list of webhooks
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/RepositoryWebhook'
        '404':
          description: Owner namespace or repository not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - webhooks
    post:
      operationId: webhooks_create
      summary: Create a specific webhook in a repository.
      description: Create a specific webhook in a repository.
      responses:
        '201':
          description: Created the specified webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryWebhook'
        '404':
          description: Owner namespace or repository not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepositoryWebhookRequest'
  /webhooks/{owner}/{repo}/{identifier}/:
    parameters:
    - name: owner
      in: path
      required: true
      schema:
        type: string
    - name: repo
      in: path
      required: true
      schema:
        type: string
    - name: identifier
      in: path
      required: true
      schema:
        type: string
    get:
      operationId: webhooks_read
      summary: Views for working with repository webhooks.
      description: Views for working with repository webhooks.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryWebhook'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - webhooks
    patch:
      operationId: webhooks_partial_update
      summary: Update a specific webhook in a repository.
      description: Update a specific webhook in a repository.
      responses:
        '200':
          description: Updated the specified webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepositoryWebhook'
        '404':
          description: Owner namespace or repository not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '400':
          description: Request could not be processed (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - webhooks
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RepositoryWebhookRequestPatch'
    delete:
      operationId: webhooks_delete
      summary: Delete a specific webhook in a repository.
      description: Delete a specific webhook in a repository.
      responses:
        '204':
          description: Deleted the specified webhook successfully.
        '400':
          description: The webhook cannot be deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
        '422':
          description: Missing or invalid parameters (see detail).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorDetail'
      tags:
      - webhooks
components:
  schemas:
    RepositoryWebhookRequestPatch:
      type: object
      properties:
        events:
          type:
          - array
          - 'null'
          items:
            type: string
            enum:
            - '*'
            - package.created
            - package.deleted
            - package.downloaded
            - package.failed
            - package.quarantined
            - package.released
            - package.restored
            - package.security_scanned
            - package.synced
            - package.syncing
            - package.tags_updated
        is_active:
          title: Webhook Active
          description: If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL.
          type: boolean
        package_query:
          title: Package query
          description: The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.
          type:
          - string
          - 'null'
          maxLength: 1024
        request_body_format:
          title: Payload Format
          description: 'The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template.'
          type: integer
          enum:
          - 0
          - 1
          - 2
          - 3
        request_body_template_format:
          title: Payload Template Format
          description: 'The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML.'
          type: integer
          enum:
          - 0
          - 1
          - 2
        request_content_type:
          title: Content Type Header Value
          description: 'The value that will be sent for the ''Content Type'' header. '
          type:
          - string
          - 'null'
          maxLength: 128
        secret_header:
          title: Secret Header
          description: The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.
          type:
          - string
          - 'null'
          pattern: ^[-\w]+$
          maxLength: 64
        secret_value:
          title: Secret Value
          description: 'The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side.'
          type:
          - string
          - 'null'
          pattern: ^[^\n\r]+$
          maxLength: 512
        signature_key:
          title: HMAC Signature Key
          description: 'The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn''t modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it).'
          type: string
          maxLength: 512
          minLength: 1
        target_url:
          title: Payload URL
          description: The destination URL that webhook payloads will be POST'ed to.
          type: string
          format: uri
          maxLength: 2000
          minLength: 1
        templates:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/WebhookTemplate'
        verify_ssl:
          title: Verify SSL Certificates
          description: If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.
          type: boolean
    WebhookTemplate:
      required:
      - event
      type:
      - object
      - 'null'
      properties:
        event:
          title: Event
          type: string
          maxLength: 128
          minLength: 1
        template:
          title: Template
          type:
          - string
          - 'null'
          maxLength: 4096
    RepositoryWebhookRequest:
      required:
      - events
      - target_url
      - templates
      type: object
      properties:
        events:
          type:
          - array
          - 'null'
          items:
            type: string
            enum:
            - '*'
            - package.created
            - package.deleted
            - package.downloaded
            - package.failed
            - package.quarantined
            - package.released
            - package.restored
            - package.security_scanned
            - package.synced
            - package.syncing
            - package.tags_updated
        is_active:
          title: Webhook Active
          description: If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL.
          type: boolean
        package_query:
          title: Package query
          description: The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.
          type:
          - string
          - 'null'
          maxLength: 1024
        request_body_format:
          title: Payload Format
          description: 'The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template.'
          type: integer
          enum:
          - 0
          - 1
          - 2
          - 3
        request_body_template_format:
          title: Payload Template Format
          description: 'The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML.'
          type: integer
          enum:
          - 0
          - 1
          - 2
        request_content_type:
          title: Content Type Header Value
          description: 'The value that will be sent for the ''Content Type'' header. '
          type:
          - string
          - 'null'
          maxLength: 128
        secret_header:
          title: Secret Header
          description: The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.
          type:
          - string
          - 'null'
          pattern: ^[-\w]+$
          maxLength: 64
        secret_value:
          title: Secret Value
          description: 'The value for the predefined secret (note: this is treated as a passphrase and is encrypted when we store it). You can use this as a form of authentication on the endpoint side.'
          type:
          - string
          - 'null'
          pattern: ^[^\n\r]+$
          maxLength: 512
        signature_key:
          title: HMAC Signature Key
          description: 'The value for the signature key - This is used to generate an HMAC-based hex digest of the request body, which we send as the X-Cloudsmith-Signature header so that you can ensure that the request wasn''t modified by a malicious party (note: this is treated as a passphrase and is encrypted when we store it).'
          type: string
          maxLength: 512
          minLength: 1
        target_url:
          title: Payload URL
          description: The destination URL that webhook payloads will be POST'ed to.
          type: string
          format: uri
          maxLength: 2000
          minLength: 1
        templates:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/WebhookTemplate'
        verify_ssl:
          title: Verify SSL Certificates
          description: If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.
          type: boolean
    RepositoryWebhook:
      required:
      - events
      - target_url
      - templates
      type: object
      properties:
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        created_by:
          title: Created by
          type: string
          readOnly: true
          minLength: 1
        created_by_url:
          title: Created by url
          type: string
          format: uri
          readOnly: true
        disable_reason:
          title: Disable reason
          type: integer
          enum:
          - 0
          - 1
          - 2
          - 3
          - 4
          - 5
          - 6
          readOnly: true
        disable_reason_str:
          title: Disable reason str
          type: string
          readOnly: true
          minLength: 1
        events:
          type:
          - array
          - 'null'
          items:
            type: string
            enum:
            - '*'
            - package.created
            - package.deleted
            - package.downloaded
            - package.failed
            - package.quarantined
            - package.released
            - package.restored
            - package.security_scanned
            - package.synced
            - package.syncing
            - package.tags_updated
        identifier:
          title: Identifier
          description: 'Deprecated (23-05-15): Please use ''slug_perm'' instead. Previously: A monotonically increasing number that identified a webhook request within a repository.'
          type:
          - integer
          - 'null'
          readOnly: true
        is_active:
          title: Webhook Active
          description: If enabled, the webhook will trigger on subscribed events and send payloads to the configured target URL.
          type: boolean
        is_last_response_bad:
          title: Is last response bad
          type: boolean
          readOnly: true
        last_response_status:
          title: Last response status
          type: integer
          readOnly: true
        last_response_status_str:
          title: Last response status str
          type: string
          readOnly: true
          minLength: 1
        num_sent:
          title: Num sent
          type: integer
          readOnly: true
        package_query:
          title: Package query
          description: The package-based search query for webhooks to fire. This uses the same syntax as the standard search used for repositories, and also supports boolean logic operators such as OR/AND/NOT and parentheses for grouping. If a package does not match, the webhook will not fire.
          type:
          - string
          - 'null'
          maxLength: 1024
        request_body_format:
          title: Payload Format
          description: 'The format of the payloads for webhook requests. Valid options are: (0) JSON, (1) JSON array, (2) form encoded JSON and (3) Handlebars template.'
          type: integer
          enum:
          - 0
          - 1
          - 2
          - 3
        request_body_format_str:
          title: Request body format str
          type: string
          readOnly: true
          minLength: 1
        request_body_template_format:
          title: Payload Template Format
          description: 'The format of the payloads for webhook requests. Valid options are: (0) Generic/user defined, (1) JSON and (2) XML.'
          type: integer
          enum:
          - 0
          - 1
          - 2
        request_body_template_format_str:
          title: Request body template format str
          type: string
          readOnly: true
          minLength: 1
        request_content_type:
          title: Content Type Header Value
          description: 'The value that will be sent for the ''Content Type'' header. '
          type:
          - string
          - 'null'
          maxLength: 128
        secret_header:
          title: Secret Header
          description: The header to send the predefined secret in. This must be unique from existing headers or it won't be sent. You can use this as a form of authentication on the endpoint side.
          type:
          - string
          - 'null'
          pattern: ^[-\w]+$
          maxLength: 64
        self_url:
          title: Self url
          type: string
          format: uri
          readOnly: true
        slug_perm:
          title: Slug perm
          type: string
          format: slug
          pattern: ^[-a-zA-Z0-9_]+$
          readOnly: true
          minLength: 1
        target_url:
          title: Payload URL
          description: The destination URL that webhook payloads will be POST'ed to.
          type: string
          format: uri
          maxLength: 2000
          minLength: 1
        templates:
          type:
          - array
          - 'null'
          items:
            $ref: '#/components/schemas/WebhookTemplate'
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        updated_by:
          title: Updated by
          type: string
          readOnly: true
          minLength: 1
        updated_by_url:
          title: Updated by url
          type: string
          format: uri
          readOnly: true
        verify_ssl:
          title: Verify SSL Certificates
          description: If enabled, SSL certificates is verified when webhooks are sent. It's recommended to leave this enabled as not verifying the integrity of SSL certificates leaves you susceptible to Man-in-the-Middle (MITM) attacks.
          type: boolean
    ErrorDetail:
      required:
      - detail
      type: object
      properties:
        detail:
          title: Detail
          description: An extended message for the response.
          type: string
          minLength: 1
        fields:
          title: Fields
          description: 'A Dictionary of related errors where key: Field and value: Array of Errors related to that field'
          type: object
          additionalProperties:
            type: array
            items:
              type: string
              minLength: 1
  securitySchemes:
    apikey:
      type: apiKey
      name: X-Api-Key
      in: header
    basic:
      type: http
      scheme: basic