<Intro>

<EndpointHeader />

<Description>

Adds a new key to the app and returns it with its secret. The secret is included in this response only and is never returned again — store it now. Use this together with revoke for zero-downtime rotation: add a key, roll it out across your clients, then revoke the old key.

</Description>

</Intro>

<Payload kind="response">

<Field name="id" type="string" required />

<Field name="key" type="string" required>

<Description>

The public app key clients use to connect.

</Description>

</Field>

<Field name="secret" type="string">

<Description>

The key secret, used for server-side request signing. Returned only when the key is created, and never shown again — store it securely. If lost, create a new key and revoke this one.

</Description>

</Field>

<Field name="revoked_at" type="nullable string" required>

<Description>

When the key was revoked, or null if still active.

</Description>

</Field>

<Field name="created_at" type="string" required />

</Payload>