Skip to Content
ZITADEL Docs
APIsCore ResourcesV2Application

Create Application Key

Create a new application key, which is used to authorize an API application.

Key details are returned in the response. They must be stored safely, as it will not be possible to retrieve them again.

Required permissions:

  • project.app.write
POST
/zitadel.application.v2.ApplicationService/CreateApplicationKey

Header Parameters

Connect-Protocol-Version*1

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?Connect-Timeout-Ms

Define the timeout, in ms

Request Body

application/json
  1. body
applicationId*application_id

The ID of the application the key will be created for.

projectId*project_id

The ID of the project the application belongs to.

expirationDate?expiration_date

The timestamp the key will expire.

Formatdate-time

Response Body

Success

application/json
  1. response
keyId?key_id

The unique ID of the newly created application key.

creationDate?creation_date

The timestamp of the application key creation.

Formatdate-time
keyDetails?key_details

KeyDetails contains the serialized private key and additional information depending on the key type. It must be stored safely, as it will not be possible to retrieve it again. A new key can be generated using the CreateApplicationKey endpoint.

Formatbyte
Example Request
curl -X POST 'https://example.com/zitadel.application.v2.ApplicationService/CreateApplicationKey' \  -H 'Connect-Protocol-Version: 1' \  -H 'Content-Type: application/json' \  -d '{  "applicationId": "string",  "projectId": "string"}'
Example Response
{  "keyId": "string",  "creationDate": "2023-01-15T01:30:15.01Z",  "keyDetails": "string"}

Was this page helpful?