Morpheus API Gateway LogoMorpheus API Gateway
Auth

Create Api Key

Create a new API key for the current user. Requires JWT Bearer authentication with the token received from the login endpoint.

POST
/api/v1/auth/keys

Authorization

AuthorizationRequiredBearer <token>

Enter the JWT token you received from the login endpoint (without 'Bearer' prefix)

In: header

Request Body

application/jsonRequired
namestring | null | null

Response Body

Schema for API key response.

TypeScript Definitions

Use the response body type in TypeScript.

keyRequiredKey
key_prefixRequiredKey Prefix
namestring | null | null
curl -X POST "http://api.mor.org/api/v1/auth/keys" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'
{
  "key": "string",
  "key_prefix": "string",
  "name": "string"
}

How is this guide?