Search…
Identities
The following endpoints are used to insert and retrieve entries representing identities from the database.

The identity object

The identity object represents the identity of an individual (or company) in the database.

Identity entity model

Name
Type
Description
Constraints
address
Object
Address information.
Not Null
appId
String
Application ID. Format: uuid.
Not Null
birthday
String
Identity birthday. Format: Date.
Between 18 and 99 years
blocked
Boolean
Identity blocked status.
Not Null
createdAt
DateTime
Identity created at date.
Not Null
email
String
Identity email. Format: email
Not Null
gender
String
Identity gender.
[male, female, undefined]
id
String
Identity identifier. Format: uuid.
Not Null
identityConfirmed
Boolean
Identity with info confirmed.
Not Null
identityOwner
String
Identity company owner. Format: uuid.
Nullable
name
String
Identity name.
Not Null
phone
Object
Identity phone information.
Not Null
tax
Object
Identity tax information.
Not Null
type
String
Identity type.
[person, company]
kycStatus
Array
Identity kyc information.
updatedAt
DateTime
Identity updated at date.
Not Null

Address information

Name
Type
Description
Constraints
city
String
Address city.
Not Null
country
String
Address country code.
Not Null
postalCode
String
Address postalCode.
Not Null
state
String
Address state.
Required when country is US
street
String
Address street.
Not Null

Phone information

Name
Type
Description
Constraints
number
String
Phone number.
Not Null
sms
Boolean
Available for sms.
Not Null

Tax information

Name
Type
Description
Constraints
country
String
Tax country code.
Not Null
idNumber
String
Tax id number.
Not Null
state
String
Tax state.
Required when country is US
formationRegion
String
Company formation region.
Required when identity type is company

Create an identity

post
[ENVIRONMENT HOSTNAME]
/identities
POST /identities

Request Parameters

None

Body parameters

Name
Type
Description
Constraints
Required
address
Object
Address information.
Not null
true
birthday
String
Identity birthday. Format: Date.
Between 18 and 99 years
Required if type is person
documents
Array
Identity documents.
Not null
faceImages
Array[String]
Identity face images. Format: uri
Not null
email
String
Identity email. Format: email
Not null
true
gender
String
Identity gender
[Male, Female, Undefined]
Required if type is person
identityOwner
String
Identity company owner. Format: uuid.
Required if type is company
name
String
Identity name.
Not null
Required
phone
Object
Identity phone information.
Not null
Required
tax
Object
Identity tax information.
Not null
Required
type
String
Identity type.
Not null
[person, company]

Body address parameters

Name
Type
Description
Constraints
Required
city
String
Address city.
Not null
true
country
String
Address country.
Not null
true
postalCode
String
Address postal code
Not null
true
state
String
Address state
Not null
Required if country is US
street
String
Address street.
Not null
Required

Body documents parameters

Name
Type
Description
Constraints
Required
description
String
Document description.
label
String
Document label.
side
String
Document side.
[FrontSide, BackSide]
true
type
String
Document type
[DriverLicense,IdentityCard,Other,Passport,ResidencePermit,UtilityBill]
true
url
String
DocumentUrl. Format: uri
Not null
true

Body phone parameters

Name
Type
Description
Constraints
Required
number
String
Phone number.
Not null
sms
String
Available for sms.

Body tax parameters

Name
Type
Description
Constraints
Required
country
String
Tax country code.
Not null
true
idNumber
String
Tax id number.
Not null
true
state
String
Tax state.
Not null
Required if country is US
formationRegion
String
Company formation region.
Not null
Required if type is company

Response Options

400 Bad Request
  • validation_failed
    • If the required parameters are not provided.
    • If additional parameters are provided.
    • If some of the parameters type is invalid.
    • If some of the parameters constraints is not respected.
  • email_already_in_use
404 Not Found
  • identity_owner_not_found
    • If a non existent identity owner id is provided.
422 Unprocessable entity
  • identity_owner_must_be_of_type_person
    • If identity owner is not of type person.
200 OK

Example Call

Request
CURL
Response
1
POST [ENVIRONMENT HOSTNAME]/identities
2
3
{
4
"address": {
5
"city": "Braga",
6
"country": "PT",
7
"postalCode": "4444-333",
8
"state": "Braga",
9
"street": "Avenida D. João I, 40"
10
},
11
"birthday": "2000-11-11",
12
"email": "[email protected]",
13
"gender": "Male",
14
"name": "João Pedro Soares",
15
"phone": {
16
"number": "910000000",
17
"sms": false
18
},
19
"tax": {
20
"country": "PT",
21
"idNumber": "1111111111",
22
"state": "Braga"
23
},
24
"type": "person",
25
"documents": [{
26
"description": "ID card",
27
"label": "id card",
28
"side": "FrontSide",
29
"type": "IdentityCard",
30
"url": "https://[pmint_aws_s3_bucket].s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
31
}],
32
"faceImages": ["https://[pmint_aws_s3_bucket].s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"]
33
}
Copied!
1
curl --location --request POST 'https://api.sandbox.publicmint.io/identities' \
2
--header 'apiKey: dfQ0ouwt0R14TPd2wxBzKtslWrBN5zfm' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"address": {
6
"city": "Braga",
7
"country": "PT",
8
"postalCode": "4444-333",
9
"state": "Braga",
10
"street": "Avenida D. João I, 40"
11
},
12
"birthday": "2000-11-11",
13
"email": "[email protected]",
14
"gender": "Male",
15
"name": "João Pedro Soares",
16
"phone": {
17
"number": "910000000",
18
"sms": false
19
},
20
"tax": {
21
"country": "PT",
22
"idNumber": "1111111111",
23
"state": "Braga"
24
},
25
"type": "person",
26
"documents": [{
27
"description": "ID card",
28
"label": "id card",
29
"side": "FrontSide",
30
"type": "IdentityCard",
31
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
32
}],
33
"faceImages": ["https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"]
34
}
35
'
Copied!
1
{
2
"data": {
3
"documents": [
4
{
5
"createdAt": "2022-03-31T13:08:52.049Z",
6
"deletedAt": null,
7
"description": "ID card",
8
"id": "bfca84a4-3e52-4a7d-92da-b17c6a5e59ac",
9
"identityId": "38882f21-ce8f-4e18-8b83-e43e082912ef",
10
"label": "id card",
11
"side": "frontSide",
12
"type": "identityCard",
13
"updatedAt": "2022-03-31T13:08:52.049Z",
14
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
15
},
16
{
17
"createdAt": "2022-03-31T13:08:52.114Z",
18
"deletedAt": null,
19
"description": null,
20
"id": "0b12e957-5643-4943-9eeb-6755c02721e0",
21
"identityId": "38882f21-ce8f-4e18-8b83-e43e082912ef",
22
"label": null,
23
"side": "frontSide",
24
"type": "faceImage",
25
"updatedAt": "2022-03-31T13:08:52.114Z",
26
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
27
}
28
],
29
"address": {
30
"city": "Braga",
31
"state": "Braga",
32
"street": "Avenida D. João I, 40",
33
"country": "PT",
34
"postalCode": "4444-333"
35
},
36
"appId": "80937bc6-9578-45c8-b691-ea6b8a5d17e9",
37
"birthday": "2000-11-11",
38
"blocked": false,
39
"createdAt": "2022-03-31T13:08:52.030Z",
40
"email": "[email protected]",
41
"gender": "Male",
42
"id": "38882f21-ce8f-4e18-8b83-e43e082912ef",
43
"identityConfirmed": false,
44
"identityOwner": null,
45
"name": "João Pedro Soares",
46
"phone": {
47
"sms": false,
48
"number": "910000000"
49
},
50
"tax": {
51
"state": "Braga",
52
"country": "PT",
53
"idNumber": "1111111111"
54
},
55
"type": "person",
56
"updatedAt": "2022-03-31T13:08:52.030Z"
57
}
58
}
Copied!
On the Sandbox environment, you can use the approve KYC endpoint to simulate and approve or reject the identity you created.

Get an identity

get
[ENVIRONMENT HOSTNAME]
/identities/:id
GET /identities/:id

Request Parameters

Path parameters

Name
Type
Description
Constraints
Required
id
String
Identity identifier. Format: uuid.
true

Example Call

Request
CURL
Response
1
GET [ENVIRONMENT HOSTNAME]/identities/38882f21-ce8f-4e18-8b83-e43e082912ef
Copied!
1
curl --location --request GET 'https://api.sandbox.publicmint.io/identities/38882f21-ce8f-4e18-8b83-e43e082912ef' \
2
--header 'apiKey: dfQ0ouwt0R14TPd2wxBzKtslWrBN5zfm'
Copied!
1
{
2
"data": {
3
"address": {
4
"city": "Braga",
5
"state": "Braga",
6
"street": "Avenida D. João I, 40",
7
"country": "PT",
8
"postalCode": "4444-333"
9
},
10
"appId": "80937bc6-9578-45c8-b691-ea6b8a5d17e9",
11
"birthday": "2000-11-11",
12
"blocked": false,
13
"createdAt": "2022-03-31T13:08:52.030Z",
14
"email": "[email protected]",
15
"gender": "Male",
16
"id": "38882f21-ce8f-4e18-8b83-e43e082912ef",
17
"identityConfirmed": false,
18
"identityOwner": null,
19
"name": "João Pedro Soares",
20
"phone": {
21
"sms": false,
22
"number": "910000000"
23
},
24
"tax": {
25
"state": "Braga",
26
"country": "PT",
27
"idNumber": "1111111111"
28
},
29
"type": "person",
30
"updatedAt": "2022-03-31T13:08:52.030Z"
31
}
32
}
Copied!

Get identities

get
[ENVIRONMENT HOSTNAME]
/identities
GET /identities

Available filters

Name
Type
Example
appId
default
filter[appId]=foobar
blocked
default
filter[blocked]=true
email
default,like
filter[email]=like:@publicmint.com
id
id, default
filter[id]=in:foobar
identityOwner
in,default
filter[identityOwner]=biz
name
default
filter[name]=fred
riskRating
in,nin,default
filter[riskRating]=nin:foo,bar
type
default
filter[type]=person

Available sorts

Name
Example
createdAt
sort=createdAt sort=-createdAt
updatedAt
sort=updatedAt sort=-updatedAt

Paginate options

Name
Description
Example
size
Defines the number of results per page. Default = 30.
page[size]=2
number
Defines the number of the page to retrieve. Default = 1
page[number]=2
all
Return all identities without pagination
all=true

Response Options

200 OK

Example Call

Request
CURL
Response
1
GET [ENVIRONMENT HOSTNAME]/identities
2
3
// PAGINATED
4
5
GET [ENVIRONMENT HOSTNAME]/identities?page[number]=1&page[size]=1
Copied!
1
curl --location --request GET 'https://api.sandbox.publicmint.io/identities' \
2
--header 'apiKey: dfQ0ouwt0R14TPd2wxBzKtslWrBN5zfm'
Copied!
1
{
2
"data": [
3
{
4
"address": {
5
"city": "Braga",
6
"state": "Braga",
7
"street": "Avenida D. João I, 40",
8
"country": "PT",
9
"postalCode": "4444-333"
10
},
11
"appId": "80937bc6-9578-45c8-b691-ea6b8a5d17e9",
12
"birthday": "2000-11-11",
13
"blocked": false,
14
"createdAt": "2022-03-31T13:08:52.030Z",
15
"email": "[email protected]",
16
"gender": "Male",
17
"id": "38882f21-ce8f-4e18-8b83-e43e082912ef",
18
"identityConfirmed": false,
19
"identityOwner": null,
20
"name": "João Pedro Soares",
21
"phone": {
22
"sms": false,
23
"number": "910000000"
24
},
25
"tax": {
26
"state": "Braga",
27
"country": "PT",
28
"idNumber": "1111111111"
29
},
30
"type": "person",
31
"updatedAt": "2022-03-31T13:08:52.030Z"
32
}
33
],
34
"total": 1
35
}
Copied!

Update an identity

patch
[ENVIRONMENT_HOSTNAME]
/identities/:id
PATCH /identities/:id

Path parameters

Name
Type
Description
Constraints
Required
id
String
Identity identifier. Format: uuid.
true

Request Parameters

Body parameters

Name
Type
Description
Constraints
Required
address
Object
Address information.
Not null
birthday
String
Identity birthday. Format: Date.
Between 18 and 99 years
documents
Array
Identity documents.
Not null
email
String
Identity email. Format: email
Not null
faceImages
Array[String]
Identity face images. Format: uri
Not null
gender
String
Identity gender
[Male, Female, Undefined]
identityOwner
String
Identity company owner. Format: uuid.
name
String
Identity name.
Not null
phone
Object
Identity phone information.
Not null
tax
Object
Identity tax information.
Not null
type
String
Identity type.
Not null
Note: Fields name, birthday, gender, tax.country and tax.idNumber can't be updated if identity is already confirmed (identityConfirmed = true)

Body address parameters

Name
Type
Description
Constraints
Required
city
String
Address city.
Not null
true
country
String
Address country.
Not null
true
postalCode
String
Address postal code
Not null
true
state
String
Address state
Not null
Required if country is US
street
String
Address street.
Not null
Required

Body documents parameters

Name
Type
Description
Constraints
Required
description
String
Document description.
label
String
Document label.
side
String
Document side.
[FrontSide, BackSide]
true
type
String
Document type
[DriverLicense,IdentityCard,Other,Passport,ResidencePermit,UtilityBill]
true
url
String
DocumentUrl. Format: uri
Not null
true

Body phone parameters

Name
Type
Description
Constraints
Required
number
String
Phone number.
Not null
sms
String
Available for sms.

Body tax parameters

Name
Type
Description
Constraints
Required
country
String
Tax country code.
Not null
true
idNumber
String
Tax id number.
Not null
true
state
String
Tax state.
Not null
Required if country is US
formationRegion
String
Company formation region.
Not null
Required if type is company

Response Options

400 Bad Request
  • validation_failed
    • If the required parameters are not provided.
    • If additional parameters are provided.
    • If some of the parameters type is invalid.
    • If some of the parameters constraints is not respected.
  • email_already_in_use
404 Not Found
  • identity_owner_not_found
    • If a non existent identity owner id is provided.
422 Unprocessable entity
  • identity_owner_must_be_of_type_person
    • If identity owner is not of type person.
200 OK

Example Call

Request
CURL
Response
1
PATCH [ENVIRONMENT HOSTNAME]/identities/38882f21-ce8f-4e18-8b83-e43e082912ef
2
3
{
4
"address": {
5
"city": "Braga",
6
"country": "PT",
7
"postalCode": "4444-333",
8
"state": "Braga",
9
"street": "Avenida D. João I, 40"
10
},
11
"birthday": "2000-11-11",
12
"email": "[email protected]",
13
"gender": "Male",
14
"name": "João Pedro Soares",
15
"phone": {
16
"number": "910000000",
17
"sms": false
18
},
19
"tax": {
20
"country": "PT",
21
"idNumber": "1111111111",
22
"state": "Braga"
23
},
24
"documents": [{
25
"description": "ID card",
26
"label": "id card",
27
"side": "FrontSide",
28
"type": "IdentityCard",
29
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
30
}],
31
"faceImages": ["https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"]
32
}js
Copied!
1
curl --location --request PATCH 'https://api.sandbox.publicmint.io/identities/38882f21-ce8f-4e18-8b83-e43e082912ef' \
2
--header 'apiKey: dfQ0ouwt0R14TPd2wxBzKtslWrBN5zfm' \
3
--header 'Content-Type: application/json' \
4
--data-raw '{
5
"address": {
6
"city": "Braga",
7
"country": "PT",
8
"postalCode": "4444-333",
9
"state": "Braga",
10
"street": "Avenida D. João I, 40"
11
},
12
"birthday": "2000-11-11",
13
"email": "[email protected]",
14
"gender": "Male",
15
"name": "João Pedro Soares",
16
"phone": {
17
"number": "910000000",
18
"sms": false
19
},
20
"tax": {
21
"country": "PT",
22
"idNumber": "1111111111",
23
"state": "Braga"
24
},
25
"documents": [{
26
"description": "ID card",
27
"label": "id card",
28
"side": "FrontSide",
29
"type": "IdentityCard",
30
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
31
}],
32
"faceImages": ["https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"]
33
}'
Copied!
1
{
2
"data": {
3
"documents": [
4
{
5
"createdAt": "2022-03-31T15:17:56.812Z",
6
"deletedAt": null,
7
"description": "ID card",
8
"id": "d25be7eb-510b-4400-ae10-45991a9ebd86",
9
"identityId": "38882f21-ce8f-4e18-8b83-e43e082912ef",
10
"label": "id card",
11
"side": "frontSide",
12
"type": "identityCard",
13
"updatedAt": "2022-03-31T15:17:56.812Z",
14
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
15
},
16
{
17
"createdAt": "2022-03-31T15:17:56.823Z",
18
"deletedAt": null,
19
"description": null,
20
"id": "1e802b4b-4f89-49f6-ae8a-6e1ebc731dfb",
21
"identityId": "38882f21-ce8f-4e18-8b83-e43e082912ef",
22
"label": null,
23
"side": "frontSide",
24
"type": "faceImage",
25
"updatedAt": "2022-03-31T15:17:56.823Z",
26
"url": "https://pmint-custodial-api-sandbox-identity-docs.s3.amazonaws.com/fd/fc/09/dd/4nHVF9Hz9FArIrUo.jpeg"
27
}
28
],
29
"address": {
30
"city": "Braga",
31
"state": "Braga",
32
"street": "Avenida D. João I, 40",
33
"country": "PT",
34
"postalCode": "4444-333"
35
},
36
"appId": "80937bc6-9578-45c8-b691-ea6b8a5d17e9",
37
"birthday": "2000-11-11",
38
"blocked": false,
39
"createdAt": "2022-03-31T13:08:52.030Z",
40
"email": "[email protected]",
41
"gender": "Male",
42
"id": "38882f21-ce8f-4e18-8b83-e43e082912ef",
43
"identityConfirmed": false,
44
"identityOwner": null,
45
"name": "João Pedro Soares",
46
"phone": {
47
"sms": false,
48
"number": "910000000"
49
},
50
"tax": {
51
"state": "Braga",
52
"country": "PT",
53
"idNumber": "1111111111"
54
},
55
"type": "person",
56
"updatedAt": "2022-03-31T15:17:56.711Z"
57
}
58
}
Copied!

Delete an identity

delete
[ENVIRONMENT_HOSTNAME]
/identities/:id
DELETE /identities/:id

Path parameters

Name
Type
Description
Constraints
Required
id
String
Identity identifier. Format: uuid.
true

Response Options

400 Bad Request
  • validation_failed
    • If an invalid identity id is provided.
404 Not Found
  • identity_not_found
    • If a non existent identity id is provided.
204 OK

Example Call

Request
CURL
1
DELETE [ENVIRONMENT HOSTNAME]/identities/38882f21-ce8f-4e18-8b83-e43e082912ef
Copied!
1
curl --location --request DELETE 'https://api.sandbox.publicmint.io/identities/38882f21-ce8f-4e18-8b83-e43e082912ef' \
2
--header 'apiKey: dfQ0ouwt0R14TPd2wxBzKtslWrBN5zfm'
Copied!