Skip to main content

API Reference

HeadshotMarketing exposes a federated GraphQL API on the Burdenoff Workspaces and Global gateways. All requests go through the gateway; direct service-to-service calls are not supported.

Endpoints

Production

GatewayURL
Workspace publichttps://graphqlworkspaces.burdenoff.com/workspaces/graphql
Global publichttps://graphql.burdenoff.com/global/graphql

Alpha

GatewayURL
Workspace publichttps://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql
Global publichttps://alphagraphql.burdenoff.com/global/graphql

Local

GatewayURL
Workspace publichttp://127.0.0.1:4003/workspaces/graphql
Global publichttp://127.0.0.1:4000/global/graphql

Switch environments with BURDENOFF_ENV. See Environment Selection.

Authentication headers

The gateway validates tokens and injects identity headers. When calling the GraphQL API directly, include:

HeaderRequiredDescription
AuthorizationYesBearer <platform-access-token>
x-workspace-idYesWorkspace UUID (for workspace gateway calls)
x-workspace-tokenYesWorkspace-scoped token (for workspace gateway calls)

The workspace token is issued by the global auth service after you select a workspace. The CLI and SDKs handle this automatically.

Example request

curl -X POST \
https://graphqlworkspaces.burdenoff.com/workspaces/graphql \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "x-workspace-id: ${WORKSPACE_ID}" \
-H "x-workspace-token: ${WORKSPACE_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"query": "query { campaigns { id name status } }"}'

Alpha access (Cloudflare Access)

Alpha endpoints are gated by Cloudflare Access. Automation passes via service-token headers:

curl -X POST \
https://alphagraphqlworkspaces.burdenoff.com/workspaces/graphql \
-H "CF-Access-Client-Id: ${CF_ACCESS_CLIENT_ID}" \
-H "CF-Access-Client-Secret: ${CF_ACCESS_CLIENT_SECRET}" \
-H "Authorization: Bearer ${ACCESS_TOKEN}" \
-H "x-workspace-id: ${WORKSPACE_ID}" \
-H "x-workspace-token: ${WORKSPACE_TOKEN}" \
-H "Content-Type: application/json" \
-d '{"query": "query { campaigns { id name status } }"}'

Fetch tokens from the dev Key Vault using the CF Access scripts in ~/products/dev/platform/context/cfaccess/.

Schema

The HeadshotMarketing subgraph schema is maintained in wspace-headshotmarketing-svc and published to GraphQL Hive Cloud. The gateway composes it with other subgraphs into a single supergraph.

To inspect the schema locally:

cd ~/products/wspace/headshotmarketing/wspace-headshotmarketing-svc
bun run codegen # Generates TypeScript types from the schema

Error codes

HTTPMeaning
200Success (check errors array for GraphQL-level errors)
401Missing or invalid Authorization header
403Missing or invalid workspace token / insufficient RBAC
404Subgraph not registered (gateway cannot route to HeadshotMarketing)
429Rate limited

For the full platform GraphQL reference, see Burdenoff Platform Docs.