Create a data key
POST/organization/keys
Creates a dk_live_… key. The secret is in the response once: store it now. Counts toward your plan's active-key limit.
- Authentication
- Send an admin key (dk_admin_…) as a Bearer token. Data keys are refused here.
- Scope
organization- Cost
- Free
Parameters
| Name | Type | Description |
|---|---|---|
Idempotency-Keyheader | string | A unique string (a UUID is ideal) making this call safe to retry. The same key with the same body replays the first response and sets |
Request body
| Name | Type | Description |
|---|---|---|
namerequired | string | |
project_id | string | Defaults to your first project. |
scopes | string[] | Limit the key to these APIs; omit for every API on your plan. |
expires_at | string (date-time) |
Response
The data field is an object with these fields.
| Name | Type | Description |
|---|---|---|
idrequired | string | |
namerequired | string | |
keyrequired | string | The secret. Shown once. |
hintrequired | string |
Example request
curl -X POST "https://api.kite.sa/v1/organization/keys" \
-H "Authorization: Bearer $KITE_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'import { Kite } from "@kite-sa/sdk";
const kite = new Kite({ apiKey: process.env.KITE_ADMIN_KEY });
const result = await kite.organization.keys.create({ name: "string" });import os
from kite_sa import Kite
kite = Kite(api_key=os.environ["KITE_ADMIN_KEY"])
result = kite.organization.keys.create(name="string")Open in the interactive reference
Related endpoints
- Get your organization
GET /organization - List data keys
GET /organization/keys - Revoke a key
POST /organization/keys/{key_id}/revoke - List projects
GET /organization/projects - Daily usage
GET /organization/usage - List members and invitations
GET /organization/members - List audit events
GET /organization/audit-events - List request logs
GET /organization/request-logs - Create a webhook endpoint
POST /organization/webhooks - List webhook endpoints
GET /organization/webhooks - Delete a webhook endpoint
POST /organization/webhooks/{webhook_id}/delete - List deliveries
GET /organization/webhooks/{webhook_id}/deliveries - Replay a delivery
POST /organization/webhooks/{webhook_id}/deliveries/{delivery_id}/replay