--> Main GitHub Profile <--
Your service should allow potential users to use these functionalities:
- Create contacts given their personal information (Name, E-Mail, etc)
- List all contacts
- Send a message to a contact
- List all previous conversations
- Receive messages from an external service via a webhook
Please support at least substituting the following:
- Name of contact
- Current Bitcoin Price in $
./gradlew spotlessApply build && docker-compose up --buildGET /api/v1/conversations
Response:
{
"recipientId": "string",
"senderId": "string",
"messages": [
"Message"
]
}POST /api/v1/conversations
Request:
{
"recipientId": "string",
"senderId": "string",
"content": "string"
}GET /api/v1/contacts
Response:
[
{
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string"
}
]POST /api/v1/contacts
Request:
{
"firstName": "string",
"lastName": "string",
"email": "string",
"phoneNumber": "string"
}POST /api/v1/webhooks
Request:
{
"recipient": "Contact",
"sender": "Contact",
"message": "string"
}When creating a new message, the content may be filled with placeholders. The placeholders will be replaced when the message is read.
| Placeholder | Replacement |
|---|---|
| {{recipient}} | First name and last name of recipient |
| {{sender}} | First name and last name of sender |
| 0.1 BTC | BTC value in USD, e.g. 0.1 BTC -> 10 USD |