klink.cloud - Product User Manual
  • Overview
    • 👋Welcome to klink.cloud
  • Getting Started
    • 🟦Setup Channels
      • Facebook Messenger
        • Connect to Facebook Messenger
        • Primary Routing Setup (Facebook & Instagram)
      • Facebook Feed
        • Connect to Facebook Feed
        • Primary Routing Setup (Facebook & Instagram)
      • LINE OA
        • Get Channel Secret and Channel Access Token
        • Connect to LINE OA
      • Instagram
      • Viber for Business
      • Google Workspace Email Setup
      • How to Setup Telegram Bot Channel
      • How to setup Telegram Business Account
      • How to set up WhatsApp Business Channel (Meta)
      • How to set up WhatsApp Mobile Channel
  • How to use
    • 📞Call
      • Inbound Call Handling
      • Outbound Call Handling
    • 💬Chat
      • Inbound Chat Handling
      • Outbound Chat Handling
      • Facebook Feed Handling
    • 🔖Tickets
      • Create a Ticket
      • Assign / Transfer Ticket
    • 📇Contact
      • How to Import Leads / Contacts
      • Contact Custom Fields
      • Individual Contacts
      • Company Contacts
      • Import / Export CSV
  • Advanced Setup
    • Setup Workflow Automation
    • Setup Queue Group
    • 🕖Setup SLA Targets
    • Setup Queue, Workflow, and SLA
  • Dashboard & Reports
    • 📊Reporting
      • CDR
      • Recording
      • Call Reports
        • Agent Call Statistics
        • Agent Call Activity
        • Trunk Activity
        • Queue AVG Waiting & Talking Time
        • Queue Performance
        • Agent Missed Call Activity
        • Agent Call Summary
        • Satisfaction Survey
      • Agent Status Report
      • CX Log
    • 📉Analytics Dashboard
      • 📶Call Dashboard
      • 📈Chat Dashboard
      • 💎Ticket Dashboard
  • Integrations
    • 🛒Ecommerce Marketplace
      • Shopee Integrations
      • Lazada Integrations
    • 🔈CRM Integrations
      • Salesforce CRM Integration
      • How to create Viber Messaging API Application
      • How to send transactional Viber Business Message
  • Messaging API
    • Line Messaging API
  • Features Roadmap & FAQ
    • ⏱️Features Road Map
    • 📢Release Notes
      • Chat Room Folder Enhancements
      • Enable/Disable Auto-Assign Toggle in Queue Settings
      • Agent Takeover Bot Chat Room
      • Workflow Automation - New Action "Send Message"
      • Enhancement of Hold Function
      • Workflow Automation Rule
      • Non-Voice Analytics Dashboard
      • WhatsApp Mobile Integration
      • Telegram Group Chat Integration for Inbox Module
      • Business Portfolio Integration - Facebook Feed
      • Call Recording Pause and Resume Feature
      • Advanced Hold Functionality for Efficient Conversation Management
      • Viber 24-Hour Response Timer
      • Enhanced Queue Settings and Workflow Automation Controls
      • Telegram Business Integration
      • Multi-Tab Call Support
      • Business Portfolio- (Meta) Messenger Integration
      • Mail Integration Enhancement and Telegram Integration
      • Facebook Feed Enhancement
      • Outlook Email Integration Enhancement (Beta)
      • Queue Setting (Beta)
      • Permission Enhancements and Multiple Assigns
      • CX Logs Enhancement
      • SMS In-bound Beta Version, SMS Integration Setting
      • Facebook Feed Integration (Beta)
      • SLA Setting and Business Hour Functionalities
      • Wrap Up Form Features and Enhancements
      • New Features & Enhancements
      • New Features and Improvement
      • New Features and Major Bug Fixes
    • FAQ
Powered by GitBook
On this page
  • Overview
  • Prerequisites
  • Retrieving Channel ID
  • Messaging Endpoints
  • Request Examples
  • Endpoint
  • Authentication
  • Request Format
  • Response
  • Notes
  1. Messaging API

Line Messaging API

Overview

The Line Messaging API enables businesses to send secure, real-time messages via the LINE Official Account (OA) API. This API allows businesses to manage and automate messaging for improved customer engagement. Designed for transactional messaging, this API ensures timely notifications and seamless interactions between businesses and their customers on the LINE platform.

Use Case Examples

The Line Messaging API is ideal for sending critical notifications and updates, including:

  • Order Notifications – Inform customers about order statuses (e.g., "Your order #12345 has been shipped.")

  • Payment Confirmations – Notify users when payments are received (e.g., "Payment of $50 was successfully received.")

  • Appointment Reminders – Send reminders for upcoming bookings (e.g., "Reminder: Your appointment is scheduled for tomorrow at 10 AM.")

  • Account Alerts – Enhance security with login alerts or password reset confirmations (e.g., "Suspicious login detected on your account.")

  • Delivery Updates – Keep customers informed about their package delivery status.

Prerequisites

Before using this API, ensure the following:

  • Admin Access – The user must have admin privileges in the klink.cloud platform.

  • Access Token – An access token must be generated in the Settings > Developer section of the klink.cloud dashboard.

  • Connected LINE Official Account – Your LINE Official Account must be connected to the klink.cloud platform. Check Settings > Message Integration to ensure the LINE OA channel is properly linked.

  • Retrieve Channel ID – You must retrieve the correct channelId for the LINE channel using the Channel Listing API.

Retrieving Channel ID

Before sending messages, you need to find the correct channelId by querying the Channel Listing API.

List Channels

Endpoint:

GET /api/v1/channels

This endpoint allows you to retrieve a paginated list of all available channels.

Optional Parameters

Name

Type

Description

keyword

string

Search channels by keyword. Supports partial matching.

Request Example

curl -G https://api.klink.cloud/api/v1/channels \
  -H "Authorization: Bearer {token}" \
  -d keyword={your_keyword_here}
import ApiClient from '@example/protocol-api'

const client = new ApiClient(token)

await client.channels.list()
from protocol_api import ApiClient

client = ApiClient(token)

client.channels.list()
$client = new \Protocol\ApiClient($token);

$client->channels->list();
{
  "requestId": "557520e4-7197-4d56-8a24-ee8c2782d6e4",
  "page": 1,
  "pageSize": 10,
  "lastPage": 8,
  "total": 73
    "data":[
      {
      "id": "f6154dda-bd9a-4d03-8a77-ff3421070009",
      "createdAt": "2025-03-02T16:42:53.796Z",
      "updatedAt": "2025-03-02T16:42:54.078Z",
      "deletedAt": null,
      "name": "K-Link BSS UAT DEMO KURO",
      "type": "line",
      "brandName": "K-Link BSS UAT DEMO KURO"
    },
    {
      "id": ...............
    }
  ]
}

Messaging Endpoints

Send Message

Endpoint:

POST /api/v1/message/send

This endpoint allows you to send a transactional message to a contact on the Line channel using the secure LINE Official Account (OA) API.

Required Parameters

Name
Type
Description

channelId

string

The unique identifier of channel. Retrieve it using the Channel Listing API.

message

string

The message content to be sent.

One of the Following is Required:

Name
Type
Description

contactId

string

The unique identifier of a contact in klink.cloud's platform. Required if platformUserId is not provided.

platformUserId

string

The unique user identifier (UID) of the customer’s Line account. Required if contactId is not provided.

Request Examples

Endpoint

POST /api/v1/message/send

Authentication

Include the Authorization header with a Bearer token:

Authorization: Bearer {token}

Request Format

curl -G https://api.klink.cloud/api/v1/message/send \
  -H "Authorization: Bearer {token}" \
  -d channelId="..." \
  -d message="Hello" \
  -d contactId="..."
import ApiClient from '@example/protocol-api'

const client = new ApiClient(token);

await client.line.create({
  channelId: '...',
  message: 'Hello',
  contactId: '...',
});
from protocol_api import ApiClient

client = ApiClient(token)

client.line.create(
    channelId='...',
    message='Hello',
    contactId='...',
)
$client = new \Protocol\ApiClient($token);

$client->line->create([
    'channelId' => '...',
    'message' => 'Hello',
    'contactId' => '...',
]);

Response

{
  "status": "success",
  "channel": "Line",
  "message": "Successfully sent message to platform user Id ...",
  "requestId": "..."
}

Notes

  • Ensure that the Authorization token is valid.

  • Either contactId or platformUserId must be provided.

  • contactId refers to the unique contact ID stored within klink.cloud’s platform.

  • platformUserId is the unique user identifier (UID) of the customer’s Line account.

  • The channelId must be retrieved using the Channel Listing API

  • This API is designed for sending transactional messages via the secure LINE Official Account API.

Last updated 2 months ago

For more details, visit .

klink.cloud API Documentation