Send LINE Notify Message POST
Sends a message (with an optional image) through a LINE Notify token linked to your account. POST /line/send2 is an alias that behaves exactly the same (kept for compatibility with older integrations).
WARNING
LINE discontinued the LINE Notify service on 31 March 2025 — this endpoint is kept for backward compatibility only. Sending may fail and return status 500. Not recommended for new integrations.
Authorization
API Key (Authentication) — send the header Authorization: Bearer <API_KEY> (API keys start with smsk_)
HTTP Request
http
POST https://public-api.smsup-plus.com/line/sendContent Type
application/json
Parameter Description
| Property | Type | Required | Description |
|---|---|---|---|
tokenId | string | Required | ID of your account's LINE Notify token (see LINE Token Dashboard) |
message | string | Required | Message text |
imageUrl | string | Optional | Image URL to attach (used as both thumbnail and full-size image) |
Response Description
| Property | Type | Description |
|---|---|---|
status | number | Result — 200 when sent (see Possible Errors for other values) |
description | string | Result description |
Request Example
bash
curl -X POST 'https://public-api.smsup-plus.com/line/send' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"tokenId": "3f2b8c1e-7a4d-4e9b-9c11-5d6e7f8a9b0c",
"message": "Notice: order #10023 has shipped",
"imageUrl": "https://www.example.com/images/shipped.png"
}'js
const res = await fetch('https://public-api.smsup-plus.com/line/send', {
method: 'POST',
headers: { Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({
tokenId: '3f2b8c1e-7a4d-4e9b-9c11-5d6e7f8a9b0c',
message: 'Notice: order #10023 has shipped',
imageUrl: 'https://www.example.com/images/shipped.png',
}),
})
console.log(await res.json())Response Example
json
{
"status": 200,
"description": "LINE notification sent."
}Possible Errors
This endpoint always answers HTTP 200 (except authentication errors) — check the status field in the body.
| HTTP | Response | Cause |
|---|---|---|
| 200 | {"status":400,"description":"tokenId and message are required."} | Body is not JSON, or tokenId / message is missing |
| 200 | {"status":404,"description":"LINE token not found."} | tokenId not found in your account |
| 200 | {"status":403,"description":"LINE token is inactive."} | The token has been deactivated |
| 200 | {"status":500,"description":"Failed to send LINE notification."} | LINE rejected or failed the send (e.g. expired token / LINE Notify discontinued) |
| 200 | {"status":503,"description":"LINE gateway not configured."} | LINE sending is not enabled on the platform |
| 200 | {"status":401,"description":"Unauthorized."} | The account could not be resolved from the credentials |
| 401 | {"error":"invalid api key"} | Invalid API key — see Errors |
