Skip to main content

Team & Access Overview and System Roles

Verifik workspaces separate billing ownership (Workspace Owner) from delegated human operators (Staff) and scoped machine credentials (Sub-Team API Keys). Every protected /v2/... request passes through a deterministic multi-layer access control pipeline that combines module & action RBAC, endpoint allowlists/blocklists, Sub-Team scope & monthly budgets, Cost Center (CECO) policies, Just-in-Time (JIT) temporary grants, and an immutable audit trail.

Zero-impact backward compatibility

Workspaces that have not configured Staff RBAC policies, custom roles, or Sub-Teams continue working with zero breaking changes:

  • Workspace Owners and SuperAdmins bypass all staff role caps, team scopes, and budget locks.
  • Unconfigured accounts (ClientSettings absent or staffAccessPolicy.teamScopedVisibility disabled) apply zero team-scope filtering on reads or writes.
  • Legacy Spanish role slugs (administrador, desarrollador, contabilidad, empleado) normalize transparently to their canonical system presets.
  • Non-staff end-user session JWTs (for example SmartEnroll or SmartAccess applicant sessions without staffId) pass RBAC staff middleware cleanly while remaining blocked on owner_only endpoints.

Actors & Token Types​

Actor / CredentialJWT Claim SignatureRole / Scope BehaviorTypical Use Case
Workspace OwnerclientId without staffId or teamIdFull permissions (*), can delete workspace settings and manage all teams/rolesAccount creator, root security & billing admin
Staff MemberclientId + staffIdSubject to effective role/override/JIT permissions, endpoint policy, and team scopeHuman portal users, country managers, auditors
Team-Scoped API KeyclientId + teamIdBound to one Sub-Team's monthlyBudget, endpointPolicy, CECO lock, and ownershipBackend microservices, country workers, batch scripts
End-User Session JWTSession token without staffId (appRegistrationId, etc.)Exempt from staff permission checks; blocked from owner_only administrative actionsEnd-user KYC, liveness, and login flows

Access Evaluation Pipeline​

Every request from an authenticated Staff member or Team API key is evaluated in strict order before touching upstream registries or billing:

Incoming Request (Authorization: Bearer <JWT>)
│
├─► 1. JWT Verification & Revocation Check
│ (client JWTPhrase for owner tokens; staff JWTPhrase for staff tokens)
│
├─► 2. Effective Permission Resolution (Staff)
│ customPermissions || customRole.permissions || DEFAULT_MATRIX[role]
│ + Active non-revoked temporaryGrants
│ - Hard Owner-only guardrail (workspaceSettings.delete = false)
│
├─► 3. Route Module/Action RBAC Check
│ Requires (resource, action) → 403 insufficient_staff_permissions
│
├─► 4. Endpoint Policy Evaluation (Staff > Team > Role)
│ mode: "all" | "allowlist" | "blocklist" on /v2/... path
│
├─► 5. Sub-Team Budget & CECO Lock Check (API lookups & SmartReports)
│ - Active & monthly/feature budget OK → 403 team_paused / team_budget_exceeded
│ - Valid x-cost-center vs allowedCostCenters → 400 cost_center_not_allowed_for_team
│
├─► 6. Team-Scoped Visibility Filter (when teamScopedVisibility = true)
│ Read union: primary team + additionalTeams + parentTeam descendants
│ Cross-team mutation → 403 team_out_of_scope
│
└─► 7. Immutable Audit Trail (StaffAuditLog)
Logs actor, action, resourceType, team, IP, userAgent, metadata

Permission Resolution Precedence & Guardrails​

When computing a staff member's effective permissions (GET /v2/staff/me/permissions):

  1. Custom Role (customRole): If the staff member references a ClientRole, that role's normalized matrix serves as the base; otherwise the built-in system preset (DEFAULT_MATRIX_CODES[role]) is used.
  2. Per-Staff Override (customPermissions): When set directly on the Staff record, customPermissions replaces the role's matrix as the base.
  3. Temporary Grants (temporaryGrants): Active, non-revoked grants whose expiresAt is in the future (or null for permanent grants) are merged additively (true unlocks the granted (resource, action) pair without widening unrelated modules).
  4. Legacy Custom Role Compatibility: Custom roles created before smartReportsResults was introduced automatically inherit smartReportsBatch flags unless smartReportsResults is explicitly configured.
  5. Owner-Only Guardrail: workspaceSettings.delete is always forced to false for all staff roles and overrides.
  6. Anti-Escalation Protection: No staff actor (including admin or team_manager) can create a role, assign a role, or grant overrides exceeding their own effective permission set — attempts throw 403 cannot_escalate_permissions.

Built-In System Roles​

Every invited staff member receives one of 8 immutable built-in system presets (or a tenant-specific custom role via POST /v2/client-roles):

Role SlugPersonaCore CapabilitiesKey Restrictions & Boundaries
adminWorkspace AdministratorFull CRUD, execute, approve, and export across all operational modules; team.readAll + team.manageOwnTeam; API key managementCannot delete workspace settings (workspaceSettings.delete) or escalate above own ceiling
team_managerCountry / Department LeadManages staff, child sub-teams, monthly budgets, access requests (team.manageOwnTeam), operations, and CECO statement export (billingUsage.export)Scoped strictly to own team, additionalTeams, and parentTeam descendants; no workspace credits/cards, API key creation, or sibling team access
compliance_officerKYC / KYB & Fleet ReviewerApproves/rejects KYC & KYB dossiers, acknowledges SmartFleet rules/alerts, executes checks, exports compliance reportsNo API key management, billing mutations, or team admin
developerIntegration EngineerFull SmartCheck Playground, projects/flows, templates, webhooks (manageKeys), API keys (create/delete/manageKeys), technical lookupsNo manual KYC/KYB approval and no billing or team management
financeBilling & AccountingManages credits, cards, subscriptions, invoices, Cost Centers (CO/CECO), and Usage/CECO statement exportsZero access to PII records (SmartEnroll, SmartBusiness), API Playground, or API keys
operatorDay-to-Day Verification OpsExecutes API checks, SmartScan, biometrics, SmartBatch presets/jobs, SmartLinks, and fleet operational updatesCannot manage teams, billing, API keys, or delete core configurations
report_builderDocument Template DesignerDesigns SmartReport templates and Batch Configurations (smartReportsTemplates & smartReportsBatch)Zero access to executed report results (smartReportsResults), applicant PII, API keys, or billing (allowAccessRequests: false)
viewerStrict Read-Only AuditorRead-only visibility into dashboards, records, monitoring status, usage summaries, and non-PII reportsZero mutations, executions, exports, or administrative controls

Legacy Role Slug Normalization​

Legacy SlugCanonical Role Normalized To
administradoradmin
desarrolladordeveloper
contabilidadfinance
empleadooperator
Any unrecognized stringviewer (fail-safe least privilege)
Need the full 27-module matrix?

See API, Permissions Matrix & MCP Reference for every module resource key, action code (RCUDEAXKLM), endpoint list, error catalog, and all 24 MCP tools.


Custom Roles & Endpoint Policies​

Workspace admins and Owners can inspect all built-in presets, duplicate one as a starting point, or create custom roles with per-endpoint URL policies (mode: "all" | "allowlist" | "blocklist").

# 1. Inspect the live catalog (resources, actions, built-in presets, custom roles)
curl -X GET https://api.verifik.co/v2/client-roles/catalog \
-H "Authorization: Bearer $VERIFIK_JWT"

# 2. Duplicate a built-in role preset (for example report_builder or operator)
curl -X POST https://api.verifik.co/v2/client-roles/report_builder/duplicate \
-H "Authorization: Bearer $VERIFIK_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Senior Template Designer",
"slug": "senior-template-designer",
"description": "Designs SmartReport templates with export preview access"
}'

# 3. Create a custom role with an endpoint allowlist policy
curl -X POST https://api.verifik.co/v2/client-roles \
-H "Authorization: Bearer $VERIFIK_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Colombia KYC Reviewer",
"basedOn": "compliance_officer",
"allowAccessRequests": true,
"requestableResources": ["smartReportsResults", "smartBusinessRecords"],
"endpointPolicy": {
"mode": "allowlist",
"features": ["/v2/co/cedula", "/v2/co/runt/vehiculo", "/v2/smart-reports"]
}
}'

Just-in-Time (JIT) Access Requests & Revocation​

When a staff member hits a restricted resource or an exhausted Sub-Team budget, Verifik returns 403 with canRequestAccess: true (unless disabled on the role, such as report_builder where allowAccessRequests defaults to false).

  1. Submit a request (POST /v2/staff-access-requests): Supports type: "resource_access", "role_upgrade", or "budget_increase", with requested duration "24h", "7d", "30d", or "permanent".
  2. Inspect own requests (GET /v2/staff-access-requests/mine) or cancel (POST /v2/staff-access-requests/:id/cancel).
  3. Scoped approval/rejection:
    • Workspace Owners and team.readAll admins review all workspace requests.
    • team_manager leads can approve or reject requests only for staff belonging to their own/additional/descendant Sub-Teams (403 team_out_of_scope otherwise).
  4. Immediate revocation:
    • Call POST /v2/staff-access-requests/:id/revoke (or DELETE /v2/staff/:id/grants/:grantId) to immediately expire a temporary grant.
    • Call POST /v2/staff/:id/revoke-session to rotate the staff member's JWTPhrase and invalidate all active Staff JWTs immediately.
# Staff submits a 7-day temporary access request
curl -X POST https://api.verifik.co/v2/staff-access-requests \
-H "Authorization: Bearer $STAFF_JWT" \
-H "Content-Type: application/json" \
-d '{
"type": "resource_access",
"requestedResource": "smartReportsResults",
"requestedAction": "read",
"requestedDuration": "7d",
"reason": "Temporary incident audit for Colombia November batch"
}'

# Team Manager or Admin approves or revokes the request
curl -X POST https://api.verifik.co/v2/staff-access-requests/<REQUEST_ID>/approve \
-H "Authorization: Bearer $MANAGER_JWT" \
-H "Content-Type: application/json" \
-d '{"reviewNotes": "Approved for Q4 reconciliation"}'

curl -X POST https://api.verifik.co/v2/staff-access-requests/<REQUEST_ID>/revoke \
-H "Authorization: Bearer $MANAGER_JWT"

Immutable RBAC & Team Audit Trail​

Every security-sensitive mutation records an immutable StaffAuditLog document containing actor identity, target resource, Sub-Team context, IP address, user agent, and structured diff metadata.

  • Endpoint: GET https://api.verifik.co/v2/staff-audit-logs
  • Required permission: team.read
  • Scoped visibility: Global admins (team.readAll) view all workspace logs; team_manager callers see only events tied to their managed sub-teams (team + additionalTeams + descendants) or triggered by themselves.
  • Query parameters:
    • team: Filter by Sub-Team ObjectId
    • action: Filter by exact event action (for example staff.update, staff.invite, team.create, team.api_key_create, access_request.approve, smart_report.signed_download)
    • resourceType: staff | team | clientRole | staffAccessRequest | clientSettings | smartReport | smartReportTemplate | batchConfiguration
    • startDate, endDate: ISO-8601 date/time bounds
    • page, limit: Pagination (limit <= 200)
    • format: json (default) or csv (neutralizes spreadsheet formula prefixes =, +, -, @, tab, CR)
{
"data": [
{
"_id": "6741f09a2b3c4d5e6f708111",
"client": "674011112222333344445555",
"team": "6740aaaa1111222233334444",
"actorType": "staff",
"actorEmail": "latam-lead@company.com",
"action": "access_request.approve",
"resourceType": "staffAccessRequest",
"resourceId": "6741ef102b3c4d5e6f708001",
"ipAddress": "198.51.100.12",
"createdAt": "2026-11-27T18:22:10.412Z"
}
],
"meta": { "page": 1, "limit": 50, "total": 1 }
}

Next Steps​