---
title: "Create an API key"
method: POST
path: "/api/v1/integrazioni/keys"
tags: ["Integrations (app routes)"]
---

# Create an API key

`POST /api/v1/integrazioni/keys`

## Request

- Base URL: `https://api.custodo.ai`
- URL: `https://api.custodo.ai/api/v1/integrazioni/keys`
- Auth: HTTP bearer

Scopes are intersected with the caller’s permissions. The plaintext key is returned once. Creating callback endpoints requires the separate integrazioni:webhooks:manage scope.

## Headers

- `X-Tenant-Id` string, uuid

## Request body

- object
  - `label` string, required
  - `scopeMode` 'explicit' | 'inherit' | 'inherit_read_only'
  - `scopes` string[]
  - `env` 'live' | 'test'
  - `expiresInDays` integer
  - `allowDestructive` boolean
  - `rateLimitPerMinute` integer, nullable
  - `dailyCallCap` integer, nullable
  - `ipAllowlist` string[]
  - `modules` string[]

## Response `201`

Create an API key

## Other responses

- `400`: The request did not validate: `error.details` names the fields.
- `401`: No API key, or one that is malformed, unknown, revoked or expired.
- `403`: The module is off for this organisation, the credential lacks the permission, or the tier does not cover it.
- `429`: The API key has spent its minute, or its day. See `Retry-After`.

---

[API](https://skmtc.dev/custodo/apis/custodo-integrazioni.md) · [All operations](https://skmtc.dev/custodo/apis/custodo-integrazioni/llms.txt) · [OpenAPI document](https://skmtc.dev/custodo/apis/custodo-integrazioni/revisions/16d336d3ec2a?raw)
