{
  "id": "p_wrCo5KdNTvBvVW19",
  "site": "stories",
  "url": "https://yarnhen.com/p/p_wrCo5KdNTvBvVW19",
  "content_trust": "untrusted-user-content",
  "license": {
    "id": "CC-BY-4.0",
    "url": "https://creativecommons.org/licenses/by/4.0/"
  },
  "author": {
    "handle": "apisio"
  },
  "body": "Picture it: you have a script that should kick off a pipeline run whenever something needs rebuilding, and you've asked an agent to wire it up. The agent reads Buildkite's Builds API contract, finds the match for \"kick off a pipeline run from a script,\" and reaches for createBuild. It looks like the job is nearly done.\n\nThe APIs.io catalog has a note on exactly this, and it's worth reading before you trust that first impression.\n\nStart with the good news. The Buildkite Builds API is one of 23 APIs that Buildkite publishes on apis.io, and it sits at the core of a CI/CD platform: list the builds for a pipeline, start one, read one, cancel one, rebuild one. Buildkite scores 70.6, which puts it in the exemplar tier and makes it the fourth-highest provider in the Australia & New Zealand region.\n\nThe contract ships five operations against https://api.buildkite.com/v2, all under /organizations/{org}/pipelines/{pipeline}/builds. Two are reads, listBuilds and getBuild. Two are writes, createBuild and rebuildBuild. One, cancelBuild, is marked destructive. Authentication is a bearer API access token. The artifact set includes an OpenAPI 3.2.0 description, docs, an authentication guide on managing API tokens, a JSON-LD context, and three JSON Schemas for Build, Pipeline and Agent. Every operation also has conversational phrasing, which is how your agent matched your request to createBuild in the first place.\n\nNow the catch, and it's the one you would hit. createBuild has no request body. In the real API, starting a build requires a commit and a branch, and it usually also takes a message, environment variables and metadata. The contract declares none of them. Its only response is a 201, \"Build created\", with no schema. So the agent knows how to start a build but not what to start it on. The phrasing promises to trigger a fresh run of the pipeline, and the contract can't deliver that by itself.\n\nYou might think reading would be safer. It's better, but it has a smaller version of the same problem. listBuilds takes only the two path parameters. There are no branch or state filters and no pagination, even though the Build schema lists ten states: running, scheduled, passed, failed, blocked, canceled, canceling, skipped, not_run and finished. The response can describe a failed build, but the request has no way to ask for only failed builds. If you wanted to find what broke overnight, the contract gives your agent no way to narrow the question.\n\nThere is a small bookkeeping slip too. The entry's description says \"4 operation(s)\", while its own operation_count is 5.\n\nHere is the turn in the story, and it's the part that makes the post honest. The catalog is not scoring Buildkite down here for being a weak provider. It is pointing at its own entry. Buildkite scores 70.6 as a provider, and the Builds contract in the catalog is not at that level. The gap is in what the catalog carries, not in what Buildkite offers.\n\nAnd Buildkite does offer more. The GraphQL API returns nested builds, jobs and agents in one Relay-paginated request. The webhooks push build and job events, verified with X-Buildkite-Token. The official MCP server exposes builds as tools for coding agents, both as a remote endpoint and as a local binary. For an agent, the post says that MCP server is the better way in today.\n\nSo what do you take away? The paths, auth and states in the Builds API are right. What's missing is the request side: a createBuild body and query filters on listBuilds. Both already appear in Buildkite's REST documentation and only need to be carried into the contract. Until they are, you use the REST docs for writes and the MCP server or GraphQL for reads. Your agent can still start that build; it just shouldn't be asked to guess the commit from a contract that never mentions one.\n\nRead the original: https://apis.io/2026/11/20/buildkites-builds-api-can-start-a-build-but-its-contract-never-says-which-commit/",
  "title": "You Ask an Agent to Start a Buildkite Build, and the Contract Can't Say Which Commit",
  "topics": [
    "buildkite",
    "openapi",
    "ci-cd",
    "api-contracts"
  ],
  "published_at": "2026-11-20T14:13:52.079Z",
  "expires_at": null,
  "policy_version": "2026.11.14-1"
}
