---
title: "Create a customer secret"
method: POST
path: "/customers/{customerId}/create-secret"
tags: ["Customers"]
---

# Create a customer secret

`POST /customers/{customerId}/create-secret`

## Request

- Base URL: `https://api.dojo.tech`
- URL: `https://api.dojo.tech/customers/{customerId}/create-secret`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/dojo/apis/dojo-api/docs/customers/:customerId/create-secret/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a unique customer secret key valid within a scope of time.

## Path parameters

- `customerId` string, nullable, required

## Headers

- `version` string, nullable, required

## Response `200`

OK

- CustomerSecret
  - `secret` string, nullable: The unique identifier for the secret.
  - `createdAt` string, date-time: The creation date, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.
  - `expireAt` string, date-time: The timestamp at which the customer secret expires, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC format.

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `404`: Not found

---

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