npm · Schema

Hook

A webhook subscription object that defines what registry events trigger notifications and where those notifications are sent.

PackagesJavaScriptNode.jsPackage ManagementRegistrySecurity

Properties

Name Type Description
id string The unique identifier for this hook subscription.
username string The npm username of the hook owner.
name string The name of the entity being watched. For packages, this is the package name. For scopes, this is the scope name. For owners, this is the npm username.
type string The type of entity being watched.
endpoint string The URI where webhook payloads will be sent via HTTP POST.
last_delivery object Information about the last delivery attempt.
response_code integer The HTTP response code from the last delivery attempt.
status string The current status of the hook subscription.
created string When the hook was created.
updated string When the hook was last updated.
View JSON Schema on GitHub

JSON Schema

npm-hook-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/Hook",
  "title": "Hook",
  "type": "object",
  "description": "A webhook subscription object that defines what registry events trigger notifications and where those notifications are sent.",
  "properties": {
    "id": {
      "type": "string",
      "description": "The unique identifier for this hook subscription."
    },
    "username": {
      "type": "string",
      "description": "The npm username of the hook owner."
    },
    "name": {
      "type": "string",
      "description": "The name of the entity being watched. For packages, this is the package name. For scopes, this is the scope name. For owners, this is the npm username."
    },
    "type": {
      "type": "string",
      "description": "The type of entity being watched.",
      "enum": [
        "package",
        "scope",
        "owner"
      ]
    },
    "endpoint": {
      "type": "string",
      "format": "uri",
      "description": "The URI where webhook payloads will be sent via HTTP POST."
    },
    "last_delivery": {
      "type": "object",
      "description": "Information about the last delivery attempt.",
      "properties": {
        "id": {
          "type": "string",
          "description": "The identifier of the last delivery."
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "When the last delivery was attempted."
        },
        "status": {
          "type": "integer",
          "description": "The HTTP status code received from the endpoint."
        }
      }
    },
    "response_code": {
      "type": "integer",
      "description": "The HTTP response code from the last delivery attempt."
    },
    "status": {
      "type": "string",
      "description": "The current status of the hook subscription."
    },
    "created": {
      "type": "string",
      "format": "date-time",
      "description": "When the hook was created."
    },
    "updated": {
      "type": "string",
      "format": "date-time",
      "description": "When the hook was last updated."
    }
  }
}

Work with this as data

Every JSON Schema 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 schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • 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 JSON Schema
curl "https://apis.io/api/v1/json-schemas/npm-hook"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

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

Get an API key

Free tier, no email required.

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