---
title: "POST /api/tenants/api-keys"
method: POST
path: "/api/tenants/api-keys"
tags: ["Integrations"]
---

# POST /api/tenants/api-keys

`POST /api/tenants/api-keys`

## Request

- Base URL: `https://api.wearelearning.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.wearelearning.io/api/tenants/api-keys`
- Auth: OAuth 2
  - Implicit: `https://login.wearelearning.io/authorize?audience=https://api.wearelearning.io`

## Request body

- CreateApiKeyRequestDto
  - `name` string, required
  - `expiresAt` string, date-time, nullable

## Response `200`

OK

- CreateApiKeyResponseDto
  - `id` string, required
  - `plaintext` string, required
  - `keyPrefix` string, required
  - `name` string, required
  - `scopes` string[], required
  - `createdAt` string, date-time, required

---

[API](https://skmtc.dev/wearelearning/apis/we-are-learning-api.md) - [All operations](https://skmtc.dev/wearelearning/apis/we-are-learning-api/llms.txt) - [OpenAPI document](https://skmtc.dev/wearelearning/apis/we-are-learning-api/revisions/e2ca5265db77?raw)
