ZRM Docs
API ReferenceCredential

credential.create

Type: Mutation · Auth: Workspace-aware

Input

FieldTypeRequiredDefaultDescription
workspaceIdstringNoID of the associated workspace
siteIdstringYesID of the associated site
systemIdstringNoID of the associated system
credentialTypeenum(card, pin, fob, biometric, master_code, installer_code, other)YesCredential type
credentialIdentifierstringYesCredential identifier
assignedPersonNamestringYesAssigned person name
assignedPersonTypeenum(employee, customer_contact, vendor, temporary, system_account)YesAssigned person type
contactIdstringNoID of the associated contact
accessGroupsunknownYes[]Access groups
activationDatestring.date-timeYesActivation date
expirationDatestring.date-timeNoExpiration date
approvalStatusenum(pending, approved, denied)Yes"pending"Approval status
revocationStatusenum(active, revoked, suspended, expired)Yes"active"Revocation status
requestedBystringNoRequested by
approvedBystringNoApproved by
revokedBystringNoRevoked by
revokedAtstring.date-timeNoRevoked at
revocationReasonstringNoRevocation reason
auditNotesstringNoAudit notes
metadataunknownNoMetadata
visibilityModeenum(global, workspace_local, shared)Yes"workspace_local"Visibility mode

Example

{
  "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
  "siteId": "550e8400-e29b-41d4-a716-446655440000",
  "systemId": "550e8400-e29b-41d4-a716-446655440000",
  "credentialType": "card",
  "credentialIdentifier": "example",
  "assignedPersonName": "example",
  "assignedPersonType": "employee",
  "accessGroups": [],
  "activationDate": "2024-01-15T09:00:00.000Z",
  "approvalStatus": "pending",
  "revocationStatus": "active",
  "visibilityMode": "global"
}

On this page