AlmondTill/G3N API

issueCollaboratorInvite

mutation · in the family Identity and access

What it does

Send a collaborator their sign-up invite — a one-time code you pass along; issuing again replaces the old one.

Staff: mint (or rotate) the ONE outstanding show-once invite token for an active collaborator: the plaintext token rides this result once; a re-issue makes the prior token stale (the pointer-currency law — the single live slot); a non-active collaborator refuses CONFLICT/REF_STATE. NO staff password-set lane exists on this plane ever — this rotation IS the recovery lane (the merchant never knows the secret). Template class; requires the unrestricted capability.

Before you call

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

Capability area: Identity and access — Who can sign in and what each role allows — users, roles and their assignments.

Roles that may call it:

What happens

The code appears ONCE in the result and expires in 7 days; the system never emails it — you convey it.

Careful

Whoever redeems the code becomes this collaborator — convey it privately.

Arguments

NameTypeRequiredNotes
collaboratorIdID ID!yes

Returns

CollaboratorInviteMint CollaboratorInviteMint! — The show-once invite mint.

Example request

graphql
mutation ExampleIssueCollaboratorInvite($collaboratorId: ID!) {
  issueCollaboratorInvite(collaboratorId: $collaboratorId) {
    inviteToken
    expiresAt
  }
}

Variables:

json
{
  "collaboratorId": "01900000-0000-7000-8000-8a783b4d0000"
}

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

Example response

json
{
  "data": {
    "issueCollaboratorInvite": {
      "inviteToken": "<your session token>",
      "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