# Creating identities

An identity is the core entity on Public Mint service. It represents an individual or company and is required to be able to execute most of the operations.

The creation of an identity is executed in 2 distinct steps:

1. Upload all the identity KYC documentation (ex: ID Card, proof-of-address, selfie, etc.) to Public Mint's AWS secure S3 bucket;
2. Create the identity passing the required information, including the documents uploaded from step 1.

## Step 1 - Upload KYC documents

The first step when creating an identity is to upload the KYC documents to Public Mint's AWS secure S3 bucket.&#x20;

You need to first request a pre-signed url for each of the documents to be uploaded, using the following API method:

## POST /presign-url

<mark style="color:green;">`POST`</mark> `[ENVIRONMENT_HOST]/presign-url`

Request a pre-sign url for a document to be uploaded.

#### Request Body

| Name                                       | Type   | Description                         |
| ------------------------------------------ | ------ | ----------------------------------- |
| filename<mark style="color:red;">\*</mark> | String | The name of the file to be uploaded |

{% tabs %}
{% tab title="200: OK Response with the details to be used for upload." %}

```javascript
{
    "data": {
        "url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/",
        "fields": {
            "key": "f1/ad/2a/17/Q9TdlaDeAqvdwrjM.jpeg",
            "bucket": "pmint-custodial-api-sandbox-identity-docs",
            "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
            "X-Amz-Credential": "ASIAXVB7MGLQKWDL2ONQ/20220401/eu-west-1/s3/aws4_request",
            "X-Amz-Date": "20220401T101751Z",
            "X-Amz-Security-Token": "FwoGZXIvYXdzEKT//////////wEaDMSysV9GDJK8pUzCMCLaASCB2eCZORx/NJqlFlHiC5fhSKE8UM5ZzbVWHAiUUAsHJhWKXIRSfsRQAFdTkxSR/mpqtXwGcDSI8B/v8KfIcq+gi+Zr1zSycaN2NyG0e53Rg6nsFTD5Wg4PIO2DkTmknFhvEjI5PhOBcfylSc3dBhu28H8JuYE422K28dI/1a2LoGhfZBXEmTXothptBpr9+SWGWaG1ESigDdGdYa3lalSnS0jycLAPZUR4a3ZyEh3phVDPN3y/a84Zv/3UnWON29fS6+j1nk4aD11NHV/WLu0mHeL+2+uUs5RDKM+im5IGMi2R1GxPnv2bq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"X-Amz-Signature": "2b9a7f914ce0d8aa5a16b3ae5811c4668f3714212c4f4eb34742c960729d79fb"
        }
    }
}
```

{% endtab %}
{% endtabs %}

With the response from the previous request, you can upload the file to aWS S3 bucket. Please refer to [**AWS documentation**](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-post-example.html) on how to do that.

## Step 2 - Create the identity

With the documents uploaded to the S3 bucket, the next step is create the identity on the Public Mint services, passing all the information including the uploaded documents. Refer to the [**Identities API** ](/api/reference/identities.md#create_an_identity)for details on how to do it.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.publicmint.io/api/identities.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
