Request Example

Text Message (Minimal)

{
  "user_id": "user-98765",
  "type": "text",
  "message": "Halo, apakah produk ini masih tersedia?",
  "metadata": {
    "name": "Budi Santoso",
    "email": "[email protected]",
    "phone": "+6281234567890"
  }
}

Image Message (Complete)

{
  "user_id": "user-12345",
  "type": "image",
  "session": "session-xyz456",
  "timestamp": "2025-07-15T07:30:00Z",
  "metadata": {
    "name": "Budi Santoso",
    "email": "[email protected]",
    "phone": "+6281234567890"
  },
  "additional_info": {
    "url": "<https://example.com/files/screenshot_error.jpg>",
    "caption": "Ini tampilan error di aplikasi saya."
  }
}

Location Message

{
  "user_id": "user-77889",
  "type": "location",
  "timestamp": "2025-07-15T10:00:00Z",
  "location": {
    "latitude": -6.200000,
    "longitude": 106.816666,
    "address": "Jl. Medan Merdeka Barat, Jakarta Pusat"
  }
}

cURL Example

curl -X POST <https://nlp-processing.ocatelkom.co.id/api/v1/inbound/send-message> \\
  -H "Content-Type: application/json" \\
  -H "X-API-KEY: YOUR_API_KEY_HERE" \\
  -d '{
    "user_id": "user-98765",
    "type": "text",
    "message": "Halo"
  }'

Last updated