Skip to content

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"
}
FieldTypeRequiredDescription
client_idstringYesClient ID (UUID format)
namestringYesActivity name (3-250 characters)
descriptionstringYesActivity description (3-250 characters)
typestringYesActivity type: whatsapp, email, or sms

Activity Types

TypeDescription
whatsappWhatsApp message
emailEmail sent
smsSMS 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

CodeDescription
201Activity created successfully
400Validation error
403Invalid token or unauthorized user
404Token or client not found

Integration Documentation