SMS Messaging API

Preview, send, and track single-recipient SMS messages from approved Line numbers.

v2026-09-20OpenAPI 3.1.0Download the OpenAPI description

The approved Line SMS API beta.

Every request needs an organisation-scoped test or live bearer key. Live sends require a permitted sender, a current recipient permission or service context, sufficient wallet credits, and an Idempotency-Key. A queued response means Line accepted durable work. It does not mean the provider or handset received it.

Test keys use isolated sandbox records. They never call Twilio, debit the live wallet, or start live workflows.

Base URL

https://useline.io
get/api/v1/accountsession token
Test authentication and inspect limits

Response

200The active account and granted limits.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/account' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
get/api/v1/phone-numberssession token
List permitted SMS senders

Response

200Assigned SMS-capable numbers permitted for this key.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/phone-numbers' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
post/api/v1/messages/previewsession token
Preview encoding, segments, cost, and policy

Request body

fromstringrequired

An approved organisation-owned sender in E.164 format.

tostringrequired

One permitted recipient in E.164 format.

bodystringrequired
client_referencestring
metadataobject
max_segmentsinteger

Reject the send when the encoded body exceeds this limit. The service maximum is 10.

max_creditsnumber

Reject the send when the estimate exceeds this decimal credit ceiling.

Response

200A non-sending preview with a policy result.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X POST 'https://useline.io/api/v1/messages/preview' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com' \
  -H 'Content-Type: application/json'
get/api/v1/messagessession token
List authorised SMS messages

Parameters

limitquery · integer
cursorquery · string

Response

200A stable cursor page of messages.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/messages' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
post/api/v1/messagessession token
Accept one SMS for durable dispatch

Parameters

Idempotency-Keyheader · stringrequired

Request body

fromstringrequired

An approved organisation-owned sender in E.164 format.

tostringrequired

One permitted recipient in E.164 format.

bodystringrequired
client_referencestring
metadataobject
max_segmentsinteger

Reject the send when the encoded body exceeds this limit. The service maximum is 10.

max_creditsnumber

Reject the send when the estimate exceeds this decimal credit ceiling.

Response

201The message and durable dispatch work were created.application/json
idstring · uuidrequired
conversation_idstring | null · uuid
statusstringrequired

One of: queued, dispatching, submitted, sent, delivered, failed, undelivered, expired, canceled, submission_unknown

livemodebooleanrequired
fromstringrequired
tostringrequired
bodystring
encodingstring | null

One of: GSM-7, UCS-2

segmentsinteger | null
estimated_creditsstring | null
settled_creditsstring | null
resource_versioninteger
created_atstring · date-time

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
402
The live wallet has insufficient available credits.
403
API access is inactive or the key lacks a required scope.
409
The idempotency key conflicts with another request or is still resolving.
422
A sender, destination, consent, suppression, segment, or cost policy blocked the send.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X POST 'https://useline.io/api/v1/messages' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com' \
  -H 'Content-Type: application/json'
get/api/v1/messages/{messageId}session token
Get one authorised SMS message

Parameters

messageIdpath · string · uuidrequired

Response

200The message.application/json
idstring · uuidrequired
conversation_idstring | null · uuid
statusstringrequired

One of: queued, dispatching, submitted, sent, delivered, failed, undelivered, expired, canceled, submission_unknown

livemodebooleanrequired
fromstringrequired
tostringrequired
bodystring
encodingstring | null

One of: GSM-7, UCS-2

segmentsinteger | null
estimated_creditsstring | null
settled_creditsstring | null
resource_versioninteger
created_atstring · date-time

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
404
The message is absent or inaccessible.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/messages/:messageId' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
get/api/v1/usagesession token
Read wallet, reservations, and application limits

Response

200Current balance, reserved credits, and application use.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/usage' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
get/api/v1/eventssession token
Poll customer events

Parameters

limitquery · integer
cursorquery · string

Response

200A stable cursor page of events.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/events' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
get/api/v1/events/{eventId}session token
Get one authoritative event

Parameters

eventIdpath · string · uuidrequired

Response

200The event.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
404
The event is absent or inaccessible.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/events/:eventId' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
get/api/v1/webhookssession token
List webhook subscriptions

Response

200Webhook subscriptions for the key environment.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X GET 'https://useline.io/api/v1/webhooks' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'
post/api/v1/webhookssession token
Create a signed webhook subscription

Request body

urlstring · urirequired
eventsarray of stringrequired
sender_idsarray of string

Response

201The subscription. The signing secret appears once.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
422
The URL or sender filter is not permitted.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X POST 'https://useline.io/api/v1/webhooks' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com' \
  -H 'Content-Type: application/json'
delete/api/v1/webhooks/{webhookId}session token
Revoke a webhook subscription

Parameters

webhookIdpath · string · uuidrequired

Response

200The subscription was revoked.

Errors

400
The request is invalid.
401
The API key is invalid, expired, or revoked.
403
API access is inactive or the key lacks a required scope.
404
The subscription is absent or inaccessible.
429
A key or organisation rate limit was reached.
503
The operation is temporarily unavailable.

Example request

curl -X DELETE 'https://useline.io/api/v1/webhooks/:webhookId' \
  -H 'Authorization: Bearer $LINE_SESSION_TOKEN' \
  -H 'Origin: https://example.com'