bk api sends custom headers with --headers
Introduced 2026-10-08 · score 0.96
HOW TO USE IT
When an API endpoint requires custom headers, call it with `bk api` and pass each header using `--headers`.
bk api --headers 'X-Header: <value>' /<endpoint>WHY THIS HELPS
Call a Buildkite API endpoint that requires a custom header.
REQUIREMENTS AND LIMITATIONS
- Version: v3.60.1
- [<endpoint>]: API endpoint to call.
- -H, --headers=HEADERS,...: Headers to include in the request. Docs do not specify the header-value syntax.
- Prerequisite: Use Buildkite CLI (`bk`) configured with valid API authentication for the endpoint. The API command reference does not state a minimum CLI version or specific scopes.
FIRST-PARTY EVIDENCE
- https://github.com/buildkite/cli/releases/tag/v3.60.1
- https://buildkite.com/docs/platform/cli/reference/api
Check the installed version and the source before using it. Entry JSON