---
title: "POST /{projectKey}/graphql"
method: POST
path: "/{projectKey}/graphql"
---

# POST /{projectKey}/graphql

`POST /{projectKey}/graphql`

## Request

- Base URL: `https://history.europe-west1.gcp.commercetools.com`
- URL: `https://history.europe-west1.gcp.commercetools.com/{projectKey}/graphql`
- Auth: OAuth 2
  - Client credentials
  - Token URL: `https://auth.europe-west1.gcp.commercetools.com/oauth/token` scopes: `view_audit_log:{projectKey}`, `view_categories:{projectKey}`
- TypeScript: <https://skmtc.dev/commercetools/apis/commercetools-change-history-api/docs/:projectKey/graphql/post.ts> (a function with typed inputs; its response is checked against the schema)

Execute a GraphQL request.

## Request body

- GraphQLRequest
  - `query` string, required
  - `operationName` string
  - `variables` GraphQLVariablesMap

## Response `200`

200

- GraphQLResponse
  - `data` unknown
  - `errors` GraphQLError[]
    - `message` string, required
    - `locations` GraphQLErrorLocation[], required
      - `line` integer, required
      - `column` integer, required
    - `path` unknown[]
      - unknown
    - `extensions` GraphQLErrorObject, required
      - `code` string, required

## Changes

- **2025-07-22** `df95d718b8b4`: 2 info
  - added discriminator to `errors/items/extensions` response property for the response status `200`
  - added the required property `errors/items/extensions/code` to the response with the `200` status
- **2025-02-01** `c8c84e130c0c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/commercetools/apis/commercetools-change-history-api/changes/:projectKey/graphql/post.md)

---

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