Identity
Messages are what conversations are made of in Supesa — they are the basic building blocks of your conversations with your Supesa contacts. On this page, we'll dive into the different identity endpoints you can use to manage identitys programmatically. We'll look at how to query, send, update, and delete identitys.
The identity model
The identity model contains all the information about the identitys and attachments you send to your contacts and groups, including how your contacts have reacted to them.
Properties
- Name
mmo- Type
- object
- Description
An object containing the details of a MMO provider and auth
- Name
bank- Type
- object
- Description
An object containing the details of a Bank provider and auth
- Name
govid- Type
- object
- Description
An object containing the details of a Government issued ID
- Name
crypto- Type
- object
- Description
An object containing the details of a Crypto wallet and auth
Link a new external account
This endpoint allows you to link a new external account, or submit a Government ID for the purpose of KYC
Important Notes
By default, an object if all objects must be supplied, though only the object of what is being submitted should not be empty.
Required Attributes
- Name
mmo- Type
- object
- Description
An object containing the details of a MMO provider and auth
- Name
bank- Type
- object
- Description
An object containing the details of a Bank provider and auth
- Name
govid- Type
- object
- Description
An object containing the details of a Government issued ID
- Name
crypto- Type
- object
- Description
An object containing the details of a Crypto wallet and auth
Request
curl -G https://api.supesa.io/v1/identity/create \
-H "content-type: application/json" \
-d '{
"mmo": {
"access_token": "string",
"user_id": "string",
"phone_number": "string",
"mmo_name": "string",
"fx_iso": "string",
"relay_catch_all": false
},
"bank": {
"access_token": "string",
"user_id": "string",
"bank_ac": "string",
"bank_sc": "string",
"bank_name": "string",
"fx_iso": "string",
"relay_catch_all": false
},
"govid": {
"access_token": "string",
"user_id": "string",
"gov_id_number": "string"
},
"crypto": {
"access_token": "string",
"user_id": "string",
"public_address": "string",
"private_key": "string",
"fx_iso": "string",
"relay_catch_all": false
}
}'
Response
{
"code": 201,
"message": {
"mmo": [
{
"id": 41,
"created_at": "2023-10-31T22:38:53.617868+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"phone_number": "+234888383893",
"mmo_name": "MTNMobileMoney",
"fx_iso": "NGN",
"relay_catch_all": false,
"identity_uuid": "fb38b3b9-8866-464a-a581-42da4f4cfba7"
}
]
},
"ref": "a6252318-9348-4c4f-b1df-66809a7cd7bb"
}
Update a linked external account
This endpoint allows you to update link a new external account, or updated a submitted Government ID for the purpose of KYC
Important Notes
By default, an object if all objects must be supplied, though only the object of what is being submitted should not be empty.
Additionally, the access_token, user_id, identity_uuid needs to be provided alongside any values that are due to be changed.
Required Attributes
- Name
mmo- Type
- object
- Description
An object containing the details of a MMO provider and auth
- Name
bank- Type
- object
- Description
An object containing the details of a Bank provider and auth
- Name
govid- Type
- object
- Description
An object containing the details of a Government issued ID
- Name
crypto- Type
- object
- Description
An object containing the details of a Crypto wallet and auth
Request
curl -G https://api.supesa.io/v1/identity/update \
-H "content-type: application/json" \
-d '{
"mmo": {
"access_token": "string",
"user_id": "string",
"phone_number": "string",
"mmo_name": "string",
"fx_iso": "string",
"relay_catch_all": false,
"identity_uuid": "string"
},
"bank": {
"access_token": "string",
"user_id": "string",
"bank_ac": "string",
"bank_sc": "string",
"bank_name": "string",
"fx_iso": "string",
"relay_catch_all": false,
"identity_uuid": "string"
},
"govid": {
"access_token": "string",
"user_id": "string",
"gov_id_number": "string",
"identity_uuid": "string"
},
"crypto": {
"access_token": "string",
"user_id": "string",
"public_address": "string",
"private_key": "string",
"fx_iso": "string",
"relay_catch_all": false,
"identity_uuid": "string"
}
}'
Response
{
"code": 200,
"message": {
"mmo": [
{
"id": 41,
"created_at": "2023-10-31T22:38:53.617868+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"phone_number": "+234888383894",
"mmo_name": "MTNMobileMoney",
"fx_iso": "NGN",
"relay_catch_all": false,
"identity_uuid": "fb38b3b9-8866-464a-a581-42da4f4cfba7"
}
]
},
"ref": "dfb787c3-f406-4f39-8c85-013367174f2e"
}
Delete a linked external account
This endpoint allows you to delete link a new external account, or delete a submitted Government ID
Important Notes
By default, an object if all objects must be supplied, though only the object of what is being submitted should not be empty.
Additionally, the access_token, user_id, identity_uuid needs to be provided for the type of external account due to be deleted.
Required Attributes
- Name
mmo- Type
- object
- Description
An object containing the details of a MMO provider and auth
- Name
bank- Type
- object
- Description
An object containing the details of a Bank provider and auth
- Name
govid- Type
- object
- Description
An object containing the details of a Government issued ID
- Name
crypto- Type
- object
- Description
An object containing the details of a Crypto wallet and auth
Request
curl -G https://api.supesa.io/v1/identity/delete \
-H "content-type: application/json" \
-d '{
"mmo": {
"access_token": "string",
"user_id": "string",
"phone_number": "string",
"mmo_name": "string",
"fx_iso": "string",
"relay_catch_all": false,
"identity_uuid": "string"
},
"bank": {
"access_token": "string",
"user_id": "string",
"bank_ac": "string",
"bank_sc": "string",
"bank_name": "string",
"fx_iso": "string",
"relay_catch_all": false,
"identity_uuid": "string"
},
"govid": {
"access_token": "string",
"user_id": "string",
"gov_id_number": "string",
"identity_uuid": "string"
},
"crypto": {
"access_token": "string",
"user_id": "string",
"public_address": "string",
"private_key": "string",
"fx_iso": "string",
"relay_catch_all": false,
"identity_uuid": "string"
}
}'
Response
{
"code": 200,
"message": {
"mmo": [
{
"id": 41,
"created_at": "2023-10-31T22:38:53.617868+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"phone_number": "+234888383894",
"mmo_name": "MTNMobileMoney",
"fx_iso": "NGN",
"relay_catch_all": false,
"identity_uuid": "fb38b3b9-8866-464a-a581-42da4f4cfba7"
}
]
},
"ref": "2e6c0679-15f6-4220-9acc-7833e5080e78"
}
View all linked accounts & identities
This endpoint allows you to view all linked accounts and Goverment IDs.
Required attributes
- Name
access_token- Type
- string
- Description
Your unique Acess Token
- Name
user_id- Type
- string
- Description
Your unique User Id
Request
curl https://api.supesa.io/v1/identity/view \
-H "content-type: application/json" \
-d '{
"access_token": "eyJhbGciOiJIUzI1NiI...",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab"
}
'
Response
{
"code": 200,
"message": {
"mmo": [
{
"id": 35,
"created_at": "2023-10-17T13:58:52.03438+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"phone_number": "1234567",
"mmo_name": "MPesa",
"fx_iso": "DZD",
"relay_catch_all": false,
"identity_uuid": "8c5d7aaa-976b-48df-829d-c027a7a56312"
}
],
"gov": [
{
"id": 7,
"created_at": "2023-10-26T09:34:15.903724+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"gov_id_number": "TEST123",
"identity_uuid": "f954afd7-16c7-46a7-86e1-dfe568822992"
}
],
"crypto": [
{
"id": 60,
"created_at": "2023-10-16T20:30:23.171737+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"public_address": "0xCbcC8394e4A9Bb...",
"private_key": "0xc365970fd02dbc94...",
"fx_iso": "GHS",
"relay_catch_all": false,
"identity_uuid": "e194e174-d52a-432b-b67a-4d83fd282cba",
"primary_network_wallet": false
},
{
"id": 61,
"created_at": "2023-10-16T20:30:23.218067+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"public_address": "0xCbcC8394e4A9Bb...",
"private_key": "0xc365970fd02dbc94...",
"fx_iso": "GBP",
"relay_catch_all": false,
"identity_uuid": "18780f7c-b789-42cb-830b-83de3c27b083",
"primary_network_wallet": false
},
{
"id": 62,
"created_at": "2023-10-16T20:30:23.285492+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"public_address": "0xCbcC8394e4A9B...",
"private_key": "0xc365970fd02dbc9...",
"fx_iso": "USD",
"relay_catch_all": false,
"identity_uuid": "4e45cb4b-fc87-451a-ade5-2039268b99f6",
"primary_network_wallet": false
},
{
"id": 59,
"created_at": "2023-10-16T20:30:23.123003+00:00",
"user_id": "bfcfd1fa-8a74-4727-87ce-fbeee2b536ab",
"public_address": "0xCbcC8394e4A...",
"private_key": "0xc365970fd02...",
"fx_iso": "NGN",
"relay_catch_all": false,
"identity_uuid": "dd9a4922-a035-40e3-8f74-85d262c8a685",
"primary_network_wallet": false
}
]
},
"ref": "8f730eb0-44ea-4e3c-a051-efd5ccd7985e"
}