---
title: "Create a client key"
method: POST
path: "/api/v4/projects/{id}/error_tracking/client_keys"
tags: ["error_tracking"]
---

# Create a client key

`POST /api/v4/projects/{id}/error_tracking/client_keys`

## Request

- Base URL: `https://gitlab.com`
- URL: `https://gitlab.com/api/v4/projects/{id}/error_tracking/client_keys`
- Auth: none declared

Creates a client key for integrated error tracking in a specified project. The public key attribute is generated automatically.

## Path parameters

- `id` string, required

## Response `201`

Create a client key

- APIEntitiesErrorTrackingClientKey: API_Entities_ErrorTracking_ClientKey model
  - `id` integer, required
  - `active` boolean, required
  - `public_key` string, required
  - `sentry_dsn` string, required

---

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