API Key

Create API key

Creates an API key. The key_name is a user-specified name for the key. Returns an id and key; the key is a randomly generated, 64-bit token required to access the Neon API. Store the key securely — it is only returned once. API keys can also be managed in the Neon Console. See Manage API keys.

post/api_keys

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/api_keys
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Request body

key_namestring required

A user-specified API key name. This value is required when creating an API key.

Response

Created an API key

idinteger required

The API key's unique numeric ID. Distinct from the API key token (key).

keystring required

The generated 64-bit token required to access the Neon API

namestring required

The user-specified API key name

created_atstring date-time required

A timestamp indicating when the API key was created

created_bystring uuid required

ID of the user who created this API key

Changes

No recorded changes to this operation across all 15 revisions of this API.