Create Identities

Step-by-step example to create an Identity

In this example we'll show how to use our APIs to create a valid identity that can go through the KYC process on Public Mint's services.

Before you start

Public Mint's service APIs offer a series of methods that can be used to integrate with Public Mint services and blockchain. Before you start, it's recommended that you review the full documentation available online on developers.publicmint.io.

Become a Partner

To use Public Mint's services, you need to be registered as partner and have the API Key to access the APIs. Please contact support@publicmint.com to apply.

Environments

Public Mint has two publicly available environments that can be used by anyone: production and sandbox

Production

The Production environment is Public Mint's main environment for partners and users. It's connected to real banks and KYC verification systems.

Sandbox

The Sandbox environment is targeted for integration development by Partners and others that want to use Public Mint's services and blockchain. It's not connected to KYC verification systems or actual banking rails.

Creating Identities

Creating a new identity is as simple as making a POST request to the /identities endpoint and passing all the required information. Read here for more details.

Example

Request
curl -X POST \
  https://api.sandbox.publicmint.io/identities \
  -H 'Content-Type: application/json' \
  -H 'apiKey: [MY_API_KEY]' \
  -d '{
    "name": "John Doe",
    "email": "john.doe@mycompany.com",
    "companyOfficer": false,
    "birthday": "1998-09-09",
    "gender": "Male",
    "identityType": "person",
    "address": {
        "street": "24404 Karianne Club",
        "postalCode": "98605",
        "city": "Bingen",
        "country": "US",
        "state": "WA"
    },
    "phone": {
        "number": "5015321379",
        "sms": true
    },
    "tax": {
        "idNumber": "872343907",
        "state": "WA",
        "country": "US"
    }
}'
Response
{
    "id": "4da8aa4f-4a01-4bf6-a72d-a8bac268c304",
    "app_id": "3f488bf9-52c1-4236-83d2-a99caacd3dc4",
    "verification_status": "pending",
    "blocked": false,
    "status": "active",
    ...
}

Take note of the id field from the response. That is the identity unique identifier and will be used on the remaining steps.

Upload Identity documents

The identity verification process requires the confirmation of the personal details supplied: identity and address. That is done by uploading the necessary documents and linking them to the newly created identity. Learn more here.

Example

Request
curl -X POST \
  https://api.sandbox.publicmint.io/documents \
  -H 'Content-Length: [TOTAL_SIZE]' \
  -H 'Content-Type: multipart/form-data; boundary=--------------------------943719922750551202326880' \
  -H 'apiKey: [MY_API_KEY]' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F description=Passport \
  -F label=passport \
  -F identityId=4da8aa4f-4a01-4bf6-a72d-a8bac268c304 \
  -F documentType=Passport \
  -F documentSide=FrontSide \
  -F file=@[PATH_TO_FILE]/passport.jpeg
Response
{
    "id": "2f0a3fad-3e1c-4628-a757-70aa3bfef3cd",
    "identity_id": "4da8aa4f-4a01-4bf6-a72d-a8bac268c304",
    "status": "active",
    ...
}

You should upload as many documents as necessary (making one POST request per document) to prove and confirm the identity created.

Verify Identity

With the identity created and the documents uploaded, the KYC process will start automatically. When the process ends, the identity's verification_status field will be updated to reflect the final result. Only identities with verification_status tagged as approved can execute fiat operations.

Sandbox

In the sandbox environment you can override the standard KYC process and do a manual approval of the identity. To do that, you must make a POST request to the /identities/:id/sandbox-approve-kyc endpoint. Note that this is only possible in the sandbox environment.

Example

Request
https://api.sandbox.publicmint.io/identities/4da8aa4f-4a01-4bf6-a72d-a8bac268c304/sandbox-approve-kyc \
  -H 'apiKey: [MY_API_KEY]'
Response
{
    "message": "Identity sent for approval"
}

Last updated