Space Docs
API ReferenceCredential

credential.create

Type: Mutation · Auth: Workspace-aware

Input

FieldTypeRequiredDefaultDescription
workspaceIdstringNo—ID of the associated workspace
siteIdstringYes—ID of the associated site
systemIdstringNo—ID of the associated system
credentialTypeenum(card, pin, fob, biometric, master_code, installer_code, other)Yes—Credential type
credentialIdentifierstringYes—Credential identifier
assignedPersonNamestringYes—Assigned person name
assignedPersonTypeenum(employee, customer_contact, vendor, temporary, system_account)Yes—Assigned person type
contactIdstringNo—ID of the associated contact
accessGroupsunknownYes[]Access groups
activationDatestring.date-timeYes—Activation date
expirationDatestring.date-timeNo—Expiration date
approvalStatusenum(pending, approved, denied)Yes"pending"Approval status
revocationStatusenum(active, revoked, suspended, expired)Yes"active"Revocation status
requestedBystringNo—Requested by
approvedBystringNo—Approved by
revokedBystringNo—Revoked by
revokedAtstring.date-timeNo—Revoked at
revocationReasonstringNo—Revocation reason
auditNotesstringNo—Audit notes
metadataunknownNo—Metadata
visibilityModeunknownNo—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"
}

On this page