---
title: "Create API key"
method: POST
path: "/api-keys"
tags: ["API Keys"]
---

# Create API key

`POST /api-keys`

## Request

- Base URL: `https://us-central1-paymentgateway-ab783.cloudfunctions.net/api`
- URL: `https://us-central1-paymentgateway-ab783.cloudfunctions.net/api/api-keys`
- Auth: HTTP bearer

Generate a new API key for the authenticated user with tier-aware limits and scope validation.

## Request body

- object
  - `name` string, required
  - `scopes` string[]
  - `expiresInDays` integer: Optional expiration window in days.

## Response `201`

API key created

## Other responses

- `400`: Validation error
- `401`: Missing or invalid authentication token
- `403`: Tier limit reached
- `500`: Failed to create API key

---

[API](https://skmtc.dev/futuresenseai/apis/futuresense-ai-central-hub-api.md) · [All operations](https://skmtc.dev/futuresenseai/apis/futuresense-ai-central-hub-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futuresenseai/apis/futuresense-ai-central-hub-api/revisions/53e075911af9?raw)
