Wallet
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 message endpoints you can use to manage messages programmatically. We'll look at how to query, send, update, and delete messages.
The message model
The message model contains all the information about the messages and attachments you send to your contacts and groups, including how your contacts have reacted to them.
Properties
- Name
id- Type
- string
- Description
Unique identifier for the message.
- Name
conversation_id- Type
- string
- Description
Unique identifier for the conversation the message belongs to.
- Name
contact- Type
- object
- Description
The contact object for the contact who sent the message.
- Name
message- Type
- string
- Description
The message content.
- Name
reactions- Type
- array
- Description
An array of reaction objects associated with the message.
- Name
attachments- Type
- array
- Description
An array of attachment objects associated with the message.
- Name
read_at- Type
- timestamp
- Description
Timestamp of when the message was read.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the message was created.
- Name
updated_at- Type
- timestamp
- Description
Timestamp of when the message was last updated.
Create a new token
This endpoint allows you to create a new token within your wallet. By default, you'll have access to NGN, GHS, USD and EUR.
Required Attributes
- Name
access_token- Type
- string
- Description
Your unique Acess Token
- Name
user_id- Type
- string
- Description
Your unique User Id
- Name
tkn_list- Type
- array
- Description
The tokens you want to add to your wallet
- Name
entropy- Type
- string
- Description
The entropy you want to add to the wallet creation
Request
curl -G https://api.supesa.io/v1/network/wallet/createNew \
-H "content-type: application/json" \
-d '{
"access_token":"string",
"user_id":"string",
"tkn_list":[
"string"
],
"entropy":"string"
}'
Response
{
"status": "201",
"msg": [
{
"id": "SIuAFUNKdSYHZF2w",
"conversation_id": "xgQQXg3hrtjh7AvZ",
"contact": {
"id": "WAz8eIbvDR60rouK",
"username": "KevinMcCallister",
"phone_number": "1-800-759-3000",
"avatar_url": "https://assets.supesa.io/avatars/buzzboy.jpg",
"last_active_at": 705103200,
"created_at": 692233200
},
"message": "It’s a nice night for a neck injury.",
"reactions": [],
"attachments": [],
"read_at": 705103200,
"created_at": 692233200,
"updated_at": 692233200
},
{
"id": "hSIhXBhNe8X1d8Et",
// ..
}
]
}