---
title: "Create a new API key, optionally with an expiry"
method: POST
path: "/api/keys"
---

# Create a new API key, optionally with an expiry

`POST /api/keys`

## Request

- Base URL: `https://postwire.io`
- URL: `https://postwire.io/api/keys`
- Auth: HTTP bearer

## Request body

- object
  - `name` string
  - `expires_in_days` integer

## Response `200`

api_key shown once

---

[API](https://skmtc.dev/postwire/apis/postwire-api.md) · [All operations](https://skmtc.dev/postwire/apis/postwire-api/llms.txt) · [OpenAPI document](https://skmtc.dev/postwire/apis/postwire-api/revisions/513a409ab8f7?raw)
