πŸ’¬PUSH API send message

Overview

When you need to send personalized messages to specific users, you can integrate using FIRST LINE's PUSH API. This integration lets you deliver messages more effectively.

In addition, using the PUSH API can help you save time and resources because you don't need to build a messaging system from scratch. With just a few simple steps, you can start sending personalized messages to your users.

API

curl -X POST
    -H "Content-Type: application/json"
    https://{API_HOST}/api/v1/***

Response

Returns in JSON format, and an HTTP status code of 200 indicates the message was sent successfully.

{}

URL Parameters

Parameter
Description

contactable_type

Channel types include the following options:

  • Live chat:App\LivechatContact

  • LINE OA:App\LineContact

  • Facebook Messenger:App\FbContact

  • Instagram:App\IgContact

  • Telegram:App\TelegramContact

  • Viber:App\ViberContact

  • WeChat:App\WechatContact

contactable_id

The customer system ID corresponding to the channel type

type

Message types are divided into the following:

  • text: text

  • carousel: carousel

  • image_carousel: image carousel

  • button: button

  • quickreply: quick reply

message

message The information is the content defined according to different message types. For example, when type is set to text , the content ofmessage might be 'Hi! How are you!'.

is_force

When a conversation is in certain states, such as the customer actively chatting with an agent, sending messages via the API is not allowed by default. But if this value is set to 1, it forces the message to be sent even if the conversation has already started.

Message field message format

Text message Text

Button

Attributes
Description

explain_text

Body description

options[].label

Text description of the button or option

options[].value

The message value to send

options[].type

Option type (e.g., text, phonenumber, url)

options[].number

Phone number (exists only when type is phonenumber)

options[].url

URL to open (exists only when type is url)

Quick Reply

Attributes
Description

explain_text

Body message, text field

options[].label

Option label

options[].value

Option value

options[].type

Option type, for example: url or text

options[].url

When the option type is url, the URL corresponding to that option (exists only when type is url)

Used to send horizontally scrollable carousel content. Each carousel item includes an image, a short description, and buttons.

Attributes
Description

alt_text

Prompt message or sent when the message format is not supported

columns[].image_url

URL of the background image

columns[].title

Title

columns[].text

Text description

columns[].actions[].text

Text for the action button or link

columns[].actions[].value

Value for the action button or link

columns[].actions[].url

URL for the action button or link (exists only when type is url)

columns[].actions[].type

Type for the action button or link, e.g., url or text

columns[].actions[].label

Label for the action button or link (if present)

Attributes
Description

alt_text

Prompt message or sent when the message format is not supported

columns[].image_url

URL of the background image

columns[].action.type

Type of the action (may be null), e.g., url or text

columns[].action.url

URL of the action (may be null)

columns[].action.value

Value of the action (may be null)

columns[].button.text

Button text

columns[].button.background_color

Button background color, as HEX color code

columns[].button.border_color

Button border color, as HEX color code

columns[].button.color

Button text color, as HEX color code

columns[].badge.text

Badge text

columns[].badge.background_color

Badge background color, as HEX color code

columns[].badge.border_color

Badge border color, as HEX color code

columns[].badge.color

Badge text color, as HEX color code

Last updated