Activities
Endpoints for recording interactions and activities with clients.
Register Client Activity
POST /api/activities
Creates a new activity (e.g., interaction via email, SMS, or WhatsApp) for a client and updates their last contact information.
Use cases:
- Record follow-up after negative feedback
- Document campaign communications
- Maintain client interaction history
Request Body
json
{
"client_id": "ef9fa264-3850-4bd2-875e-2b40a4dd432f",
"name": "Welcome message sent",
"description": "WhatsApp was sent with loyalty program information",
"type": "whatsapp"
}| Field | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | Client ID (UUID format) |
name | string | Yes | Activity name (3-250 characters) |
description | string | Yes | Activity description (3-250 characters) |
type | string | Yes | Activity type: whatsapp, email, or sms |
Activity Types
| Type | Description |
|---|---|
whatsapp | WhatsApp message |
email | Email sent |
sms | SMS sent |
Request Example
bash
curl -X POST "https://api-b2s.experienciab2s.com/api/activities" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"client_id": "ef9fa264-3850-4bd2-875e-2b40a4dd432f",
"name": "Welcome message sent",
"description": "WhatsApp was sent with loyalty program information",
"type": "whatsapp"
}'Success Response (201)
json
{
"message": "Activity created with success"
}Response Codes
| Code | Description |
|---|---|
| 201 | Activity created successfully |
| 400 | Validation error |
| 403 | Invalid token or unauthorized user |
| 404 | Token or client not found |
