With Lumo's Public API, you can access your Lumo data from your own systems and tools and combine it with your own setup. For detailed implementation specifications, see the "API documentation" inside Lumo.
What is the Public API?
The Public API is a mechanism for programmatically retrieving your Lumo data from external systems and applications.
You can call your Lumo data from your own systems without using Lumo's web interface. By combining the data you have accumulated with your own analytics platforms and tools, you can automate and streamline your work.
This is a feature for engineers. Using it requires knowledge of building systems with APIs.
What you can do with the API
The Public API lets you retrieve chat history, broadcast results, and customer information, send LINE messages, and link identities.
| What you can do | Details |
|---|---|
| Retrieve chat history | Retrieve the history of chats you exchanged with customers through your LINE Official Account, for a specified period |
| Retrieve broadcast results | Retrieve the list and details of message broadcasts, statistics such as opens and clicks, and per-recipient details |
| Look up customer information | Look up customer information in Lumo based on a LINE User ID, together with the friend's acquisition route (first and latest) |
| Send messages | Send a LINE message to a specified friend using an Auto Send Message template. You can also specify a phone number to send a LINE notification message to someone who isn't a friend |
| ID linking | Connect a LINE friend with their member information (a HubSpot contact), starting from LINE Login on your own site (with the HubSpot integration) |
By specifying the target LINE Official Account and the period and number of records to retrieve, you can pull out only the data you need. You can import broadcast results into your own data analytics platform, or send a LINE message triggered by an event in your own system. We plan to keep adding more features over time.
ID linking is for you if you already have LINE Login on your member site or a similar place. Pass the access token you get at login to Lumo, and that customer's LINE friend connects to the member information matched on the HubSpot contact property you specify. You can start following up on LINE right after someone signs up, without building any extra screens. It is available for LINE Official Accounts that have the HubSpot integration set up.
For the latest list of available features and detailed specifications, see the "API documentation" inside Lumo.
Sending a LINE notification message to a phone number
When sending messages, specify a phone number (phoneNumber) instead of a friend's LINE User ID (to) to send a LINE notification message to someone who isn't a friend. The LINE Official Account must be approved for LINE notification messages.
| Field | Details |
|---|---|
phoneNumber |
The recipient's phone number. Use it instead of to. Specify only a number the customer gave you as their own. The number is hashed on receipt and isn't stored |
phoneCountryCode |
The country calling code when the phone number isn't in international format, as 1 to 4 digits (for example, 81). When omitted, the number is read as a number of the LINE Official Account's country |
externalId |
Your own system's ID for that person. Specify it together with externalIdSource |
externalIdSource |
The name of the ID system externalId belongs to (for example, membership). Specify it together with externalId |
Rules for sending
The accepted response means the send was queued. It doesn't tell you whether the notification arrived.
- LINE delivers the notification to whoever holds that phone number on LINE. Lumo can't verify that the number belongs to the person you mean
- When the number isn't on LINE, or LINE refuses the send, the notification doesn't arrive, and the response doesn't report it
- An Auto Send Message with two or more LINE notification messages can't be sent
- Sends leave at about 4 per second per LINE Official Account, a pace shared with that account's other LINE notification message sends. Requests beyond it wait and are retried, but one that still can't be sent after some tens of minutes isn't sent. Spread a large volume out over time
- Sending the same Auto Send Message to the same phone number more than once on the same day keeps one send record
- When the Auto Send Message is part of an A/B test, no variant is drawn for a send to a phone number. The one you specified is sent as it is
Linking IDs when the notification button is tapped
Turn on "Link identity when the button is tapped" on the Auto Send Message, and a person who taps the notification button and goes through LINE Login is recorded as the friend the notification was sent to. With externalId and externalIdSource, that friend is also linked to your own ID.
- Only the first person who taps the button within 72 hours of sending is linked
- Only notifications whose delivery was confirmed as completed
- If the ID already belongs to another friend, or the friend already has another ID of the same kind, nothing changes
- With the switch off, nothing is linked
The detailed specification of each field is in the "API documentation" inside Lumo.
Getting started
To use the Public API, you issue an API key in an Enterprise plan workspace and implement your system so that it can call your Lumo data.
The Public API is available on the Enterprise plan. An API key is the key Lumo uses to authenticate access from your system. You issue and manage API keys under "API Key" in your workspace settings. Only workspace admins can generate or regenerate an API key.
Issuing an API key
You issue an API key in your workspace settings.
- Open "Workspace Settings" and select "API Key"
- Click "Generate API key"
- Copy the displayed API key and store it in a safe place
The API key is shown only once, at the time it is issued. Keep it in a safe place. It cannot be displayed again after you close the screen, so if you lose it, you will need to regenerate it.
Building it into your system
Using the API key you issued, implement your system so it can call your Lumo data.
For the specifications you need to implement it, such as how to build requests and the format of the data you can retrieve, see "View API documentation".
Managing your API key
You can review and regenerate your issued API key under "API Key" in your workspace settings.
| Action | Details |
|---|---|
| View | An issued key shows only its first few characters, masked. You can copy the full key only right after issuing it — it can't be shown or copied again later |
| Regenerate | Disable your current API key and issue a new one |
Regenerating an API key
If you lose your API key, or if there is a chance it has been exposed to a third party, regenerate it. Only workspace admins can regenerate it.
- Open "API Key" in your workspace settings
- Click "Regenerate"
- Click "Regenerate" in the confirmation dialog
When you regenerate, the previous API key becomes invalid, and this action cannot be undone. After regenerating, be sure to set the new API key in your system again.
Using it safely
An API key is a key that can access your Lumo data. Manage it carefully so it is not exposed to third parties.
- Do not share your API key with third parties
- Do not write your API key directly into source code or public repositories
- If there is a chance your API key has been leaked, regenerate it immediately
- The API has a limit on the number of requests per time period. If you exceed the limit, your requests will be temporarily restricted
- When sending messages, you can attach an
Idempotency-Keyheader to each request. Sending again with the same key never delivers twice, so retrying on a shaky connection is safe
For details on usage limits, such as the request limit, see the "API documentation" inside Lumo.
Frequently asked questions
Common questions about using the Public API are answered below.
I lost my API key
Because the API key is shown only once when it is issued, it cannot be displayed again. Regenerate it from "API Key" in your workspace settings. After regenerating, you will need to set the new API key in your system again.
What data can I retrieve?
You can retrieve chat history, message broadcast results (statistics and per-recipient details), and the customer information that corresponds to a LINE User ID, including the friend's acquisition route (first and latest). You can also send LINE messages using an Auto Send Message template, and link identities starting from LINE Login. We plan to keep adding more features over time.
Which plans can use it?
The Public API is available on the Enterprise plan. On other plans, pressing "Generate API key" shows an upgrade prompt, and you can't issue a key. You can upgrade your plan from "Settings" > "Usage & Billing".
Where can I find details on how to implement it?
From "View API documentation" under "API Key" in your workspace settings, you can find the specifications you need to implement it, such as how to build requests and the format of the data you can retrieve.