Cream Channel/Chat API

This is an API description for Chatting.

To start with, obtain a token for 365 days with the API.

Obtain App Token for 365 Days

post
Body
clientIdstringRequired

Client ID

clientSecretstringRequired

Client Secret

Responses
200Success
application/json
post
POST /api/v1/ext/auth/oauth/apptoken HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 159

{
  "clientId": "7b5bf8c3-c396-4ec8-846f-16255b6defae",
  "clientSecret": "CRPUBNFgPKCs0C0+WImwGAIzIZa59dzCTbtzNdzoPQzRUCsRFabGrrmlYsW+upT2G7NPJaDW0fAiWHXYUUV1O03A=="
}
200Success
{
  "status": true,
  "code": "AUTH_000",
  "data": {
    "accessToken": "{{App Token for Other APIs}}",
    "expiredAt": "2025-10-18 17:26:50.934"
  }
}

When the accessToken is obtained. Check the channel list.

Channels - List All

get
Authorizations
Responses
200Success
application/json
get
GET /oapi/v1/channel HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200Success
{
  "status": true,
  "module": "OAPI",
  "code": "OAPI_000",
  "data": [
    {
      "_id": "{{Channel ID}}",
      "mediaPlatform": "WhatsApp",
      "vendor": "Official",
      "displayName": "(+1 555-7213 1345) VeServe CS Test Account",
      "officialAccountId": "4708471361058472"
    }
  ]
}

Remember to put the token in the Authorization header.

Channel - Send Message

post
Authorizations
Path parameters
channelIdstringRequiredExample: 6704a190fce9b223ed673aec
Body
externalUserIdstringRequired

Whatsapp Phone Number

msgTypestringRequired

Type of Message

contentstringRequired

Content of the message

Responses
200Success
application/json
post
POST /oapi/v1/channel/{channelId}/message/send HTTP/1.1
Host: 
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 59

{
  "externalUserId": "text",
  "msgType": "text",
  "content": "text"
}
200Success
{
  "status": true,
  "module": "OAPI",
  "code": "OAPI_000",
  "data": {
    "msgId": "67122aea5eef7ea9df3aa777",
    "msgRefId": "wamid.HBgLODUyOTQ1ODc1MzMVAgARGBIyNTk3MzdCRDMzRUMwQTEwREQA"
  }
}

Send message with the send api.

Last updated