Skip to content
Console
On this page

Create key in Workload tenants

Creates an environment key and returns HTTP 201.

Creates an environment key and returns HTTP 201. Idempotency-Key is required. A replay within 24 hours returns key metadata without plaintext.

  • Path POST https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys
  • Scope access:whoami
  • Effect write — a successful call changes state.
  • Collection workload_tenants
  • Host https://api.sylphx.com

Request

FieldTypeWhat it is
external_tenant_idstringWorkspace ID in the calling workload's namespace. Required.
labelstringDisplay label for the key. Required.
scopesstring[]Nonempty scope set. Any scope outside the grant's ceiling is refused. Required.

Response

FieldTypeWhat it is
keyWorkloadTenantKeyIssued key's metadata.
secretstringPlaintext credential (never returned on replay). Never returned again.

WorkloadTenantKey

FieldTypeWhat it is
key_idstringCredential ID, not its secret value.
labelstringCaller-supplied label.
scopesstring[]Exact scopes the key carries (including a registered aggregate, if requested).
created_attimestampKey issuance time.
revoked_attimestampKey revocation time, absent for a live key.

Errors

Every error arrives in the body Errors describes.

Examples

curl -X POST "https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"…","scopes":["…"]}'