AlmondTill/G3N API

doomApiKey

mutation · in the family API key

What it does

Permanently retire an API key — a machine credential for integrations.

active → doomed. The scheduled expiry needs no op; reach loss needs no op either (live-derivation — removing the minter’s ownership kills the key’s reach instantly).

Before you call

A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.

Capability area: System and integration setup — Registers, connections and the settings your systems run on.

Roles that may call it:

Careful

Doom is forever — a doomed record never comes back into use (its history remains readable). Anything still referencing it live will block the doom.

Arguments

NameTypeRequiredNotes
idID ID!yesThe id of the record.
revisionID ID!yesThe revision id you read on the record; the change is refused if an edit landed in the meantime.
reasonStringno

Concurrency

Send the record’s current revision from your last read as revision. A stale revision is refused as CONFLICT/REVISION_STALE — read the record again and retry with the new value.

Returns

ApiKey ApiKey! — An ApiKey — the third-party / programmatic access credential. Issued only by an org-group-level owner (the platform's live ownership gate — the minting actor is a User whose Account holds group ownership); parent = the minting User. Reach derives live from the minter's current ownerships — the key works on exactly the group's orgs where the minter is also currently an org owner; ownership loss/re-grant is never a transition (re-grant revives a not-doomed key). Descriptors ride the Roles grammar (allow/disallow, default-deny, disallow-wins), immutable at birth; mandatory expiry ≤ 12 months (the scheduler fires active → expired — a distinct doomed terminal). The secret shows once at mintApiKey, hash-only at rest, and is presented only to exchangeApiKey → a 24 h-absolute no-idle API session. NOT searchable; the reads are gated.

Example request

graphql
mutation ExampleDoomApiKey($id: ID!, $revision: ID!, $reason: String) {
  doomApiKey(id: $id, revision: $revision, reason: $reason) {
    id
    sysId
    type
    caption
    status
    parentId
    rootId
    createdAt
    updatedAt
    revisionNum
    revision
    expiresAt
  }
}

Variables:

json
{
  "id": "01900000-0000-7000-8000-9e3a95fe0000",
  "revision": "01900000-0000-7000-8000-b7960e180000",
  "reason": "Correcting a miscount."
}

Send it with the envelope naming the version: "extensions": {"at": {"version": {"name":"genesis","number":0}}}.

Example response

json
{
  "data": {
    "doomApiKey": {
      "id": "01900000-0000-7000-8000-9e3a95fe0000",
      "sysId": "AK-EXMP-0000-000F",
      "type": "ApiKey",
      "caption": "Blue jeans",
      "status": "doomed",
      "parentId": "01900000-0000-7000-8000-e0a63e120000",
      "rootId": "01900000-0000-7000-8000-a1295a650000",
      "createdAt": "2027-01-31T00:00:00.000Z",
      "updatedAt": "2027-01-31T00:00:00.000Z",
      "revisionNum": 1,
      "revision": "01900000-0000-7000-8000-53c6eea90000",
      "expiresAt": "2028-01-31T00:00:00.000Z"
    }
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": {
          "name": "genesis",
          "number": 0
        },
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}

Errors this call can answer

Used in