Gravv
/Docs
Search docs or ask a question⌘K
DocsAgent
ChangelogTry sandbox
API Reference KYC overview

KYC overview

Verify customers and retrieve verification status.

2 min read

Use the KYC API to start customer verification, upload supporting documents, and retrieve verification documents or status.

Verification flows

Gravv supports two verification flows:

1.
Hosted flow. Call POST /v1/customers/kyc/start. The customer completes verification on a hosted page. This is the simplest integration.
2.
Server-to-server (S2S) flow. You collect and submit the documents yourself:
1.
Upload each required document as a base64-encoded string with its metadata.
2.
Start S2S verification after you upload all required documents.

In both flows, the outcome is the customer's basic KYC status. Read kyc on GET /v1/customers/{customer_id}, or subscribe to customer KYC webhook events. While the review runs, GET /v1/customers/{customer_id}/kyc/status shows its current state. Errors are strings that start with a code, such as INVALID_REQUEST: ….

Note

For business customers, complete KYC verification for every associated person before you start the business's own verification. Otherwise the start returns ASSOCIATED_PERSONS_INCOMPLETE. Business documents use idDocType COMPANY_DOC with four sub-types. See KYC.

Step errors

When you skip a step or call one out of order, the error code names the step, and the message names the customer, what is missing and the next call to make.

CodeHTTPReturned byMeaning
DOCUMENTS_MISSING400start-s2sRequired documents are missing. The message lists each one with its idDocType and idDocSubType
ASSOCIATED_PERSONS_INCOMPLETE400start, start-s2sA business has associated persons whose KYC is not completed. The message names each person and the step they need, and on start-s2s also lists any company documents still missing
KYC_IN_PROGRESS409start-s2sThe review of an earlier submission is still running. Poll kyc/status instead of starting again
SUBMISSION_INCOMPLETE400start-s2sThe review refused the submission. The message gives the reason, and KYC stays unsubmitted
DOCUMENT_REJECTED400start-s2sThe review refused one uploaded file. The message names it, with its document_id and the reason
KYC_ALREADY_COMPLETED409, or 404 on kyc/statusstart-s2s, upload-document, kyc/statusThe customer is already verified. On kyc/status, KYC was completed by automatic document verification, with no review to report
INVALID_DOCUMENT_TYPE400upload-documentThe idDocType is unknown or REGISTRATION_CERTIFICATE, or the idDocSubType doesn't fit it
DOCUMENT_TYPE_NOT_ALLOWED400upload-documentThe document belongs on another customer, such as a passport on a business
KYC_NOT_INITIATED404kyc/statusNo verification has been submitted for the customer yet

Endpoints

EndpointDescription
POST /v1/customers/kyc/startStart hosted KYC verification for a customer
POST /v1/customers/kyc/upload-documentUpload a base64-encoded KYC document (S2S step 1)
POST /v1/customers/kyc/start-s2sStart server-to-server verification using uploaded documents (S2S step 2)
GET /v1/customers/{customer_id}/kyc/documentsList a customer's uploaded documents with metadata
GET /v1/customers/{customer_id}/kyc/documents/{document_id}/downloadDownload one side of one document as a data URI, for a compliance review. A scoped key needs customer:update. See Download KYC documents
GET /v1/customers/{customer_id}/kyc/statusGet the current review status and result

Reading verification status

FieldWhile in reviewAfter review
reviewStatuspendingcompleted
reviewResultomittedcontains the decision

Authentication

All requests use https://api.gravv.xyz/v1/ and authenticate with the Api-Key header. See Authentication for details.

Was this page helpful? Yes No