API Clients & API Keys
Overview
This domain opens a channel for a customer's external systems to call the LINE Management API without signing in as a user. It is structured in two layers.
api_client— the calling application at the platform level, holding a client id and client secretapi_key— a key that binds that application to one specific LINE OA and organization
Anything done through this channel is tagged, for example audience.api_client_id and
audience.api_key_id, along with audience_member_log.trigger_type set to api. That makes it
possible to trace after the fact which records came from an external system.
Core Data Structure
api_client
name,description,client_id,client_secretstatusof typeCommonStatus(defaults toactive), with soft deletes viadeleted_date- The
(client_id, client_secret, status)index is shaped for the authentication lookup itself
api_key
titleandkey- Scope columns:
api_client_id,line_oa_idandorganization_id. All three are plain columns; they are not declared as foreign keys in Prisma. - The
(organization_id, line_oa_id, status)index backs the lookup of active keys per channel
Related Files
prisma/schema.prisma:819— theApiClientmodelprisma/schema.prisma:837— theApiKeymodelprisma/schema.prisma:438— theaudience.api_client_idandaudience.api_key_idcolumnsseed-data/13.api_client.sql,seed-data/14.api_key.sql— a mock pair seeded for testingschema-dumps/2026-07-24/schema.sql:864,:903
Connections to Other Services
- cms-api-go exposes the
api-keymodule for issuing and revoking keys per customer. - client-api-go and cms-api-go both run middleware that validates the API key before allowing a call to a public endpoint. A common real-world case is an external CRM pushing records in to add members to an audience.
- Connects to Audience and LINE OA Channels.