---
title: "API change event"
method: POST
path: "api-change"
---

# API change event

`POST api-change` (webhook)

A pipeline delivery. Delivery is at least once and in no fixed order.

## Headers

- `user-agent` 'SKMTC-Hub-Webhooks/1', required
- `skmtc-signature` string, required

## Payload

- ApiChangeEvent: A delivery of a pipeline finished, with the result of each action. A pipeline's webhook action sends it.
  - `specversion` '1.0', required
  - `id` string, required: The same on every attempt of a delivery. Use it to find duplicates. A pipeline delivery that Run now starts again sends a new id.
  - `source` string, uri, required: The Hub site that sent the event, e.g. `https://skmtc.dev`.
  - `subject` string, required: The API, as `{owner}/{slug}`.
  - `time` string, date-time, required: When Hub captured the event; for a pipeline delivery event, when the delivery started. This is not the publisher's time.
  - `datacontenttype` 'application/json', required
  - `type` 'dev.skmtc.pipeline.delivery.v1', required
  - `data` PipelineDeliveryEventData, required: The data of a delivery event.
    - `deliveryId` string, required: The id of the delivery on Hub, `pdv_` and 32 hex digits.
    - `pipeline` Pipeline, required: The pipeline a delivery event is from.
      - `owner` string, required: The handle of the account that owns the pipeline.
      - `name` string, required
      - `url` string, uri, required: The pipeline's page on Hub.
    - `api` Api, required: The API the event is about.
      - `id` string, required
      - `owner` string, required
      - `slug` string, required
      - `name` string, required
      - `url` string, uri, required: The API's page on Hub.
    - `revision` Revision, required: One revision of the API.
      - `id` string, required
      - `contentHash` string, nullable, required: The SHA-256 of the revision's document; `null` for a revision with no stored document.
      - `version` string, nullable, required: The publisher's version label, when the revision has one. Not an order.
      - `publishedAt` string, date-time, nullable, required: The publisher's timestamp, when it gave one.
      - `retrievedAt` string, date-time, required: When Hub retrieved the revision.
      - `url` string, uri, required: The revision's page on Hub; the API's revisions page for a revision with no stored document.
    - `results` ActionResult[], required: One result for each action of the delivery, in the order they ran. The webhook action itself is not in the list.
      - `type` 'generate' | 'pullRequest' | 'publish' | 'webhook', required: The type of an action.
      - `outcome` 'succeeded' | 'failed' | 'skipped' | 'notRun', required: What one action of a delivery came to. `skipped` - the action is set to skip. `notRun` - an earlier action failed, so the delivery stopped before it.
      - `reasonCode` string: A stable machine-readable code, when the action failed or did not run.
      - `detail` string: What the action did or why it failed, e.g. the pull request URL or the published `name@version`.
      - `durationMs` integer: How long the action took; absent for an action that did not run.

## Acknowledgement `2XX`

Any 2xx: the delivery succeeded. Hub does not read the body.

## Other responses

- `307`: Hub sends the same request to `location`, for not more than 3 redirects.
- `308`: Hub sends the same request to `location`, for not more than 3 redirects.
- `408`: Hub tries again later with the same event `id`, for not more than 24 hours from the first attempt. Hub also tries again after a timeout of 10 seconds or a network error.
- `429`: Hub tries again later with the same event `id`, for not more than 24 hours from the first attempt. Hub also tries again after a timeout of 10 seconds or a network error.
- `5XX`: Hub tries again later, as for 408 and 429.
- `3XX`: Any other 3xx or 4xx: the delivery fails and Hub does not try again.
- `4XX`: Any other 3xx or 4xx: the delivery fails and Hub does not try again.

---

[API](https://skmtc.dev/skmtc/apis/api-change-webhooks.md) - [All operations](https://skmtc.dev/skmtc/apis/api-change-webhooks/llms.txt) - [OpenAPI document](https://skmtc.dev/skmtc/apis/api-change-webhooks/revisions/bc2c2d65db1b?raw)
