API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen

POST /v1/api-keys

POST/v1/api-keys

Create a new API key. The plaintext token is returned exactly once.

Request body

NaamTypeBeschrijving
labelvereiststring
descriptionstring
permissionsstring[]
allowedSchemasarraynull
allowedMethodsarraynull
ipAllowlistarraynull
expiresAtstring,null<date-time>
environmentstring

Voorbeeld

curl -X POST https://api.codemeta-os.de/v1/api-keys \
  -H "X-Tenant-Id: $TENANT" \
  -H "Content-Type: application/json" \
  -b cookies.txt \
  -d '{
  "label": "string",
  "description": "string",
  "permissions": [],
  "allowedSchemas": null,
  "allowedMethods": null,
  "ipAllowlist": null,
  "expiresAt": null,
  "environment": "live"
}'
const result = await cm.api-keys.post({
  "label": "string",
  "description": "string",
  "permissions": [],
  "allowedSchemas": null,
  "allowedMethods": null,
  "ipAllowlist": null,
  "expiresAt": null,
  "environment": "live"
});

Antwoordcodes

HTTP Betekenis
200 Default Response

Zoeken