---
title: "Create an API Key"
method: POST
path: "/teams/{team_id}/api-keys"
tags: ["API Keys"]
---

# Create an API Key

`POST /teams/{team_id}/api-keys`

## Request

- Base URL: `https://api.presscart.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.presscart.com/teams/{team_id}/api-keys`
- Auth: HTTP bearer

Create a new full-access API key for the authenticated team.

## Path parameters

- `team_id` string, uuid, required

## Request body

- object
  - `description` string, required

## Response `201`

API Key created successfully

- object
  - `id` string, uuid, required
  - `access_key_prefix` string, nullable, required
  - `access_key_last4` string, nullable, required
  - `token_type` 'read_only' | 'full_access' | 'custom', required
  - `description` string, nullable, required
  - `expires_at` union, required
    - string, nullable
    - string
    - unknown
  - `last_used_at` union, required
    - string, nullable
    - string
    - unknown
  - `lifespan` number, nullable, required
  - `level` 'team' | 'admin', required
  - `created_by_id` string, uuid, required
  - `updated_by_id` string, uuid, nullable, required
  - `team_id` string, uuid, nullable, required
  - `created_at` union, required
    - string, nullable
    - string
    - unknown
  - `updated_at` union, required
    - string, nullable
    - string
    - unknown
  - `deleted_at` union, required
    - string, nullable
    - string
    - unknown
  - `access_key` string, required

---

[API](https://skmtc.dev/presscart/apis/presscart-prod-api.md) · [All operations](https://skmtc.dev/presscart/apis/presscart-prod-api/llms.txt) · [OpenAPI document](https://skmtc.dev/presscart/apis/presscart-prod-api/revisions/2154581d845e?raw)
