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.

Argumente

  • input!

    Standard

    {
      "withinDays": null,
      "pagination": null,
      "limit": null
    }
Gibt zurück!
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.

Argumente

  • vertical!
  • role!
  • countryString
  • level!

    Standard

    "BASIC"
Gibt zurück!
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.

Argumente

  • id!
Gibt zurück
QUERY

kycApplicationsForAccount

#

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

Argumente

  • accountId!
  • vertical!
  • role!
  • pagination!
Gibt zurück!
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.

Argumente

  • input!

    Standard

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

kycPolicy

#

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

Argumente

  • idID!
Gibt zurück
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.

Gibt zurück[!]!
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.

Argumente

  • input!

    Standard

    {
      "activeOnly": false
    }
Gibt zurück!
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.

Argumente

  • input!

    Standard

    {
      "status": null,
      "search": null,
      "pagination": {
        "limit": 10,
        "page": 1,
        "after": null
      }
    }
Gibt zurück!
QUERY

myKycApplications

#

Get my KYC applications

Gibt zurück[!]!

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.

Argumente

  • idID!
Gibt zurück!
MUTATION

adminCreateTenantProviderConfig

#

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

Argumente

  • input!
Gibt zurück!
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.

Argumente

  • applicationId!
  • documentId!
Gibt zurück!
MUTATION

approveKycApplication

#

Approve a KYC application (admin only)

Argumente

  • input!
Gibt zurück!
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.

Argumente

  • input!
Gibt zurück!
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.

Argumente

  • input!
Gibt zurück!
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.

Argumente

  • input!
Gibt zurück!
MUTATION

createKycRequirement

#

Create a new tenant-scoped KYC requirement.

Argumente

  • input!
Gibt zurück!
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.

Argumente

  • idID!
Gibt zurück!
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.

Argumente

  • idID!
Gibt zurückBoolean!
MUTATION

detachKycRequirementFromPolicy

#

Detach a requirement from a policy. Idempotent.

Argumente

  • input!
Gibt zurückBoolean!
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.

Argumente

  • documentId!
Gibt zurück!
MUTATION

rejectKycApplication

#

Reject a KYC application (admin only)

Argumente

  • input!
Gibt zurück!
MUTATION

setDriverKycDocumentExpiry

#

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

Argumente

  • documentId!
  • expiresAt!
  • reasonString!
Gibt zurück!
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

Argumente

  • input!
Gibt zurück!
MUTATION

updateKycPolicy

#

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

Argumente

  • idID!
  • input!
Gibt zurück!
MUTATION

updateKycRequirement

#

Update a KYC requirement's display name.

Argumente

  • idID!
  • input!
Gibt zurück!
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.

Argumente

  • input!
Gibt zurück!