Preview, send, and track single-recipient SMS messages from approved Line numbers.
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
/api/v1/accountsession tokenResponse
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'
/api/v1/phone-numberssession tokenResponse
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'
/api/v1/messages/previewsession tokenRequest body
fromstringrequiredAn approved organisation-owned sender in E.164 format.
tostringrequiredOne permitted recipient in E.164 format.
bodystringrequiredclient_referencestringmetadataobjectmax_segmentsintegerReject the send when the encoded body exceeds this limit. The service maximum is 10.
max_creditsnumberReject the send when the estimate exceeds this decimal credit ceiling.
Response
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'
/api/v1/messagessession tokenParameters
limitquery · integercursorquery · stringResponse
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'
/api/v1/messagessession tokenParameters
Idempotency-Keyheader · stringrequiredRequest body
fromstringrequiredAn approved organisation-owned sender in E.164 format.
tostringrequiredOne permitted recipient in E.164 format.
bodystringrequiredclient_referencestringmetadataobjectmax_segmentsintegerReject the send when the encoded body exceeds this limit. The service maximum is 10.
max_creditsnumberReject the send when the estimate exceeds this decimal credit ceiling.
Response
idstring · uuidrequiredconversation_idstring | null · uuidstatusstringrequiredOne of: queued, dispatching, submitted, sent, delivered, failed, undelivered, expired, canceled, submission_unknown
livemodebooleanrequiredfromstringrequiredtostringrequiredbodystringencodingstring | nullOne of: GSM-7, UCS-2
segmentsinteger | nullestimated_creditsstring | nullsettled_creditsstring | nullresource_versionintegercreated_atstring · date-timeErrors
- 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'
/api/v1/messages/{messageId}session tokenParameters
messageIdpath · string · uuidrequiredResponse
idstring · uuidrequiredconversation_idstring | null · uuidstatusstringrequiredOne of: queued, dispatching, submitted, sent, delivered, failed, undelivered, expired, canceled, submission_unknown
livemodebooleanrequiredfromstringrequiredtostringrequiredbodystringencodingstring | nullOne of: GSM-7, UCS-2
segmentsinteger | nullestimated_creditsstring | nullsettled_creditsstring | nullresource_versionintegercreated_atstring · date-timeErrors
- 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'
/api/v1/usagesession tokenResponse
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'
/api/v1/eventssession tokenParameters
limitquery · integercursorquery · stringResponse
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'
/api/v1/events/{eventId}session tokenParameters
eventIdpath · string · uuidrequiredResponse
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'
/api/v1/webhookssession tokenResponse
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'
/api/v1/webhookssession tokenRequest body
urlstring · urirequiredeventsarray of stringrequiredsender_idsarray of stringResponse
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'
/api/v1/webhooks/{webhookId}session tokenParameters
webhookIdpath · string · uuidrequiredResponse
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'