OneRoute
  • Introduction
  • Prerequisites
  • Whatsapp API
    • Sandbox (Test API Key)
    • Getting Started
    • Endpoints
      • Fetch Channels
      • Fetch Channel Templates
      • Send Template Message
      • Send Campaign Message
      • Send Session Message
    • FAQ
  • EMAIL API
    • Getting Started
    • Endpoints
      • Fetch Email Channels
      • Send Email to Customers
  • SMS API
    • Getting Started
    • Endpoints
      • Fetch SMS Channels
      • Send SMS to Customers
      • Send OTP SMS to Customers
      • Fetch SMS Messages
      • Get SMS DLR Message
  • ONEOTP API
    • Getting Started
    • Endpoints
      • Fetch OTP Templates
      • Send OTP
      • Verify OTP
  • EMBED
    • Getting Started
    • Installation
    • Push Notification
  • OTHERS
    • Receiving Events - Webhooks
    • Fetch Channel By Id
    • Fetch Logs
Powered by GitBook
On this page
  • Send WhatsApp Session Message
  • Example Request Payload

Was this helpful?

  1. Whatsapp API
  2. Endpoints

Send Session Message

Send WhatsApp Session Message

POST https://api.oneroute.io/api/public/conversation/text

This API only works when you have received a Whatsapp message from the customer in the last 24 hours.

Headers

Name
Type
Description

apiKey

string

API Key for authentication.

Request Body

Name
Type
Description

from

string

Whatsapp number you are sending from. Must be connected to a channel on OneRoute.

to

string

Whatsapp number to send the message to. Must be a valid Whatsapp number.

message

string

The message to send to the customer.

{
    "data": {
        "id": "c5cb6663-19fb-4551-abee-ddab2d7355d8",
        "content": "Hello :)",
        "contentType": "TEXT",
        "sender": {
            "name": "covid2020",
            "authUser": true,
            "lastActivity": "2021-06-03T14:37:24.684Z"
        },
        "externalId": "gBGHI0kFNWAgTwIJQFXbLV4JUIzD",
        "conversation_id": "65763b7f-b9a1-4370-b2ca-9cacfb0d65c2",
        "updatedAt": "2021-06-03T14:37:25.664Z",
        "createdAt": "2021-06-03T14:37:25.664Z",
        "subject": null,
        "imageUrl": null,
        "videoUrl": null,
        "documentUrl": null,
        "audioUrl": null,
        "quoted_message_id": null
    },
    "message": "Message sent to customer",
    "success": true
}
{
    "data": null,
    "message": "Invalid API Key",
    "success": false
}

Example Request Payload

{
    "from": "234XXXXXXXXXX",
    "message":"Session message",
    "to": "234XXXXXXXXX"
}
PreviousSend Campaign MessageNextFAQ

Last updated 3 years ago

Was this helpful?