kyc28 ops

KYC API

Know-Your-Customer applications, provider integrations, requirement policies, and review queues.

Queries

QUERY

expiringKycDocuments

#

Approved documents in the reviewer's workspace that lapse soon, soonest first. A lapsed mandatory document takes its holder's approval with it, so this is what to renew before that happens.

Arguments

  • input!

    Default

    {
      "withinDays": null,
      "pagination": null,
      "limit": null
    }
Returns!
QUERY

getKycRequirements

#

Get KYC requirements for a specific role and vertical. This query returns the active KYC policy and all required checks (documents) that must be provided for verification.

Arguments

  • vertical!
  • role!
  • countryString
  • level!

    Default

    "BASIC"
Returns!
QUERY

kycApplication

#

Get a KYC application by ID: staff read any in their tenant, everyone else only their own. Someone else's reads as not found.

Arguments

  • id!
Returns
QUERY

kycApplicationsForAccount

#

Full history for one account and role, scoped to the reviewer's tenant.

Arguments

  • accountId!
  • vertical!
  • role!
  • pagination!
Returns!
QUERY

kycPolicies

#

List KYC policies for the current tenant. Returns all policies visible to the current tenant, including tenant-specific policies and platform defaults. Supports filtering by vertical, role, active status, and text search on policy_key. Results are paginated.

Arguments

  • input!

    Default

    {
      "vertical": null,
      "role": null,
      "activeOnly": false,
      "search": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      },
      "sort": null
    }
Returns!
QUERY

kycPolicy

#

Get a KYC policy by ID with its requirements. Returns the policy details including all associated requirements.

Arguments

  • idID!
Returns
QUERY

kycRequirementsAdmin

#

List all KYC requirements defined by the current tenant. Tenant-scoped — no pagination yet because the catalog is small (typically <50 entries even for large tenants). Add pagination if real-world data shows otherwise.

Returns[!]!
QUERY

kycRetentionPolicies

#

List KYC document retention policies for the current tenant. Returns all retention policies visible to the current tenant, including tenant-specific policies and platform defaults. Policies are ordered by retention_days ascending.

Arguments

  • input!

    Default

    {
      "activeOnly": false
    }
Returns!
QUERY

listPendingKycApplications

#

List pending KYC applications (admin only) Returns applications filtered by status (default: Pending) with support for search by application ID or account ID. Results are paginated.

Arguments

  • input!

    Default

    {
      "status": null,
      "search": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Returns!
QUERY

myKycApplications

#

Get my KYC applications

Returns[!]!

Mutations

MUTATION

activateKycPolicy

#

Activate a KYC policy. This will set the specified policy as active and deactivate any other versions of the same policy key for the same tenant.

Arguments

  • idID!
Returns!
MUTATION

adminCreateTenantProviderConfig

#

Create a KYC provider configuration for the current tenant. # Authorization Requires TenantAdmin or PlatformAdmin role.

Arguments

  • input!
Returns!
MUTATION

applyKycOcrToApplication

#

Apply the persisted AI OCR fields onto a KYC application + source document. Admin-only. Returns the updated application alongside the list of fields actually written (existing non-empty values are preserved). The mutation refuses when OCR confidence is below 0.50 — admins should re-run OCR or fill manually in that case.

Arguments

  • applicationId!
  • documentId!
Returns!
MUTATION

approveKycApplication

#

Approve a KYC application (admin only)

Arguments

  • input!
Returns!
MUTATION

attachKycRequirementToPolicy

#

Attach (or upsert) a KYC requirement onto a policy with overrides. Calling this with an existing (policy, requirement) pair updates the junction in place rather than erroring.

Arguments

  • input!
Returns!
MUTATION

createKycApplication

#

Create a new KYC application. The application starts in DRAFT status, allowing documents to be uploaded. For third-party providers (e.g., Sumsub), a provider session is returned with an access token for the provider's web SDK.

Arguments

  • input!
Returns!
MUTATION

createKycPolicy

#

Create a new KYC policy and (optionally) attach existing tenant-scoped requirements via the policy_requirement junction. If active is true and the policy key already has an active version, the existing active version will be deactivated.

Arguments

  • input!
Returns!
MUTATION

createKycRequirement

#

Create a new tenant-scoped KYC requirement.

Arguments

  • input!
Returns!
MUTATION

deactivateKycPolicy

#

Deactivate a KYC policy. This will mark the specified policy as inactive. Note: This does not delete the policy, it can be reactivated later.

Arguments

  • idID!
Returns!
MUTATION

deleteKycRequirement

#

Delete a KYC requirement. Returns true if the requirement was deleted, false if it didn't exist. Errors out if any taxi service class still references the requirement — the admin should detach it from those classes first.

Arguments

  • idID!
ReturnsBoolean!
MUTATION

detachKycRequirementFromPolicy

#

Detach a requirement from a policy. Idempotent.

Arguments

  • input!
ReturnsBoolean!
MUTATION

ocrKycDocument

#

Run AI OCR against one KYC document image. Admin-only. Returns the persisted OCR row. Subsequent calls overwrite the row in place — the only history lives in ai_call_log.

Arguments

  • documentId!
Returns!
MUTATION

rejectKycApplication

#

Reject a KYC application (admin only)

Arguments

  • input!
Returns!
MUTATION

setDriverKycDocumentExpiry

#

Change an approved or expired driver's document expiry, with immediate expiry handling.

Arguments

  • documentId!
  • expiresAt!
  • reasonString!
Returns!
MUTATION

submitKycForVerification

#

Submit a KYC application for verification. This transitions an application from DRAFT to PENDING status. Before calling this mutation, ensure all required documents have been uploaded using the uploadKycDocument mutation. This mutation will validate that: - The application is in DRAFT status - All mandatory requirements have been fulfilled with uploaded documents - The application belongs to the authenticated user After successful submission: - For third-party providers (Sumsub, Onfido): verification happens automatically and the provider will call back via webhook when complete - For manual verification: the application is queued for admin review

Arguments

  • input!
Returns!
MUTATION

updateKycPolicy

#

Update a KYC policy's fields. Only the provided fields will be updated.

Arguments

  • idID!
  • input!
Returns!
MUTATION

updateKycRequirement

#

Update a KYC requirement's display name.

Arguments

  • idID!
  • input!
Returns!
MUTATION

uploadKycDocument

#

Upload a document for a KYC application in DRAFT status. This mutation attaches a document to an application. The application must be in DRAFT status. You can call this multiple times to upload different documents. After uploading all required documents, call submitKycForVerification to transition the application to PENDING status. The returned document includes an upload field that can be used to fetch the file's downloadUrl through the upload service.

Arguments

  • input!
Returns!