Skip to content

Commit 04b9b63

Browse files
authored
Add /v2/bot/audienceGroup/shared path (#85)
# Shared Audiences in Business Manager API Support We have added and supported new API endpoints related to Shared Audiences in Business Manager. ## API to Get Shared Audience Information You can obtain detailed information about a specific audience shared in Business Manager by calling the endpoint: - GET `https://api.line.me/v2/bot/audienceGroup/shared/{audienceGroupId}` ## API to Get List of Shared Audiences You can acquire a list of audiences shared in Business Manager using the following endpoint: - GET `https://api.line.me/v2/bot/audienceGroup/shared/list` By using the "Get Shared Audience Information" endpoint, you can retrieve more detailed data about each audience. ## Documents and Reference - News Announcement: [Shared Audience Feature Release](https://developers.line.biz/en/news/2025/02/12/shared-audience/) - API Reference: - [Get List of Shared Audiences](https://developers.line.biz/en/reference/messaging-api/#get-shared-audience-list) - [Get Shared Audience Information](https://developers.line.biz/en/reference/messaging-api/#get-shared-audience) - Documentation on Audience Sharing: [Using Audience Sharing](https://developers.line.biz/en/docs/messaging-api/using-audience/#audience-sharing) For more information, please refer to the links provided above.
1 parent 5eeed11 commit 04b9b63

File tree

1 file changed

+276
-0
lines changed

1 file changed

+276
-0
lines changed

manage-audience.yml

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -530,6 +530,207 @@ paths:
530530
description: "OK"
531531
# empty json response
532532

533+
"/v2/bot/audienceGroup/shared/{audienceGroupId}":
534+
parameters:
535+
- name: audienceGroupId
536+
in: path
537+
required: true
538+
description: "The audience ID."
539+
schema:
540+
type: integer
541+
format: int64
542+
get:
543+
externalDocs:
544+
url: https://developers.line.biz/en/reference/messaging-api/#get-shared-audience
545+
tags:
546+
- manage-audience
547+
operationId: getSharedAudienceData
548+
description: "Gets audience data."
549+
responses:
550+
"200":
551+
description: "OK"
552+
content:
553+
"application/json":
554+
schema:
555+
"$ref": "#/components/schemas/GetSharedAudienceDataResponse"
556+
examples:
557+
UPLOADING_USER_IDS:
558+
summary: "Example of an audience used for uploading user IDs"
559+
value:
560+
audienceGroup:
561+
audienceGroupId: 1234567890123
562+
createRoute: OA_MANAGER
563+
type: UPLOAD
564+
description: "audienceGroupName_01"
565+
status: READY
566+
audienceCount: 1887
567+
created: 1608617466
568+
permission: READ
569+
isIfaAudience: false
570+
expireTimestamp: 1624342266
571+
jobs:
572+
- audienceGroupJobId: 12345678
573+
audienceGroupId: 1234567890123
574+
description: "audience_list.txt"
575+
type: DIFF_ADD
576+
status: FINISHED
577+
failedType: AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT
578+
audienceCount: 0
579+
created: 1608617472
580+
jobStatus: FINISHED
581+
CLICK_BASED:
582+
summary: "Example of an audience used for click-based retargeting"
583+
value:
584+
audienceGroup:
585+
audienceGroupId: 1234567890987
586+
createRoute: OA_MANAGER
587+
type: CLICK
588+
description: "audienceGroupName_02"
589+
status: IN_PROGRESS
590+
audienceCount: 8619
591+
created: 1611114828
592+
permission: READ
593+
isIfaAudience: false
594+
expireTimestamp: 1626753228
595+
requestId: c10c3d86-f565-...
596+
clickUrl: https://example.com/
597+
jobs: [ ]
598+
APP_EVENTS:
599+
summary: "Example of an audience used for app events"
600+
value:
601+
audienceGroup:
602+
audienceGroupId: 2345678909876
603+
createRoute: AD_MANAGER
604+
type: APP_EVENT
605+
description: "audienceGroupName_03"
606+
status: READY
607+
audienceCount: 8619
608+
created: 1608619802
609+
permission: READ
610+
activated: 1610068515
611+
inactiveTimestamp: 1625620516
612+
isIfaAudience: false
613+
jobs: [ ]
614+
owner:
615+
serviceType: lap
616+
id: A012345678
617+
name: Ad Account Name
618+
"400":
619+
description: "Bad request"
620+
content:
621+
"application/json":
622+
schema:
623+
$ref: "#/components/schemas/ErrorResponse"
624+
example:
625+
message: audience group not found
626+
details:
627+
- message: AUDIENCE_GROUP_NOT_FOUND
628+
629+
"/v2/bot/audienceGroup/shared/list":
630+
get:
631+
externalDocs:
632+
url: https://developers.line.biz/en/reference/messaging-api/#get-shared-audience-list
633+
tags:
634+
- manage-audience
635+
operationId: getSharedAudienceGroups
636+
description: "Gets data for more than one audience, including those shared by the Business Manager."
637+
parameters:
638+
- name: page
639+
in: query
640+
required: true
641+
schema:
642+
type: integer
643+
format: int64
644+
minimum: 1
645+
description: "The page to return when getting (paginated) results. Must be 1 or higher."
646+
- name: description
647+
in: query
648+
required: false
649+
schema:
650+
type: string
651+
description: |+
652+
The name of the audience(s) to return.
653+
You can search for partial matches.
654+
This is case-insensitive, meaning AUDIENCE and audience are considered identical.
655+
If omitted, the name of the audience(s) will not be used as a search criterion.
656+
- name: status
657+
in: query
658+
required: false
659+
schema:
660+
"$ref": "#/components/schemas/AudienceGroupStatus"
661+
description: |+
662+
The status of the audience(s) to return. If omitted, the status of the audience(s) will not be used as a search criterion.
663+
- name: size
664+
in: query
665+
required: false
666+
schema:
667+
type: integer
668+
format: int64
669+
example: 20
670+
maximum: 40
671+
description: |+
672+
The number of audiences per page. Default: 20
673+
Max: 40
674+
- name: createRoute
675+
in: query
676+
required: false
677+
schema:
678+
"$ref": "#/components/schemas/AudienceGroupCreateRoute"
679+
description: |+
680+
How the audience was created. If omitted, all audiences are included.
681+
682+
`OA_MANAGER`: Return only audiences created with LINE Official Account Manager (opens new window).
683+
`MESSAGING_API`: Return only audiences created with Messaging API.
684+
responses:
685+
"200":
686+
description: "OK"
687+
content:
688+
"application/json":
689+
schema:
690+
"$ref": "#/components/schemas/GetSharedAudienceGroupsResponse"
691+
examples:
692+
TWO_AUDIENCES:
693+
summary: "Example of when there are two audiences that match the specified filter"
694+
value:
695+
audienceGroups:
696+
- audienceGroupId: 1234567890123
697+
createRoute: OA_MANAGER
698+
type: CLICK
699+
description: "audienceGroupName_01"
700+
status: IN_PROGRESS
701+
audienceCount: 8619
702+
created: 1611114828
703+
permission: READ
704+
isIfaAudience: false
705+
expireTimestamp: 1626753228
706+
requestId: c10c3d86-f565-...
707+
clickUrl: https://example.com/
708+
- audienceGroupId: 2345678901234
709+
createRoute: AD_MANAGER
710+
type: APP_EVENT
711+
description: "audienceGroupName_02"
712+
status: READY
713+
audienceCount: 3368
714+
created: 1608619802
715+
permission: READ
716+
activated: 1610068515
717+
inactiveTimestamp: 1625620516
718+
isIfaAudience: false
719+
hasNextPage: false
720+
totalCount: 2
721+
readWriteAudienceGroupTotalCount: 0
722+
size: 40
723+
page: 1
724+
NO_AUDIENCE:
725+
summary: "Example of when there is no audience that matches the specified filter"
726+
value:
727+
audienceGroups: []
728+
hasNextPage: false
729+
totalCount: 0
730+
readWriteAudienceGroupTotalCount: 0
731+
size: 40
732+
page: 1
733+
533734
components:
534735
securitySchemes:
535736
Bearer:
@@ -809,6 +1010,28 @@ components:
8091010
maxItems: 50
8101011
items:
8111012
"$ref": "#/components/schemas/AudienceGroupJob"
1013+
adaccount:
1014+
"$ref": "#/components/schemas/Adaccount"
1015+
GetSharedAudienceDataResponse:
1016+
externalDocs:
1017+
url: https://developers.line.biz/en/reference/messaging-api/#get-audience-group
1018+
type: object
1019+
description: "Get audience data"
1020+
properties:
1021+
audienceGroup:
1022+
"$ref": "#/components/schemas/AudienceGroup"
1023+
jobs:
1024+
type: array
1025+
description: |+
1026+
An array of jobs.
1027+
This array is used to keep track of each attempt to add new user IDs or IFAs to an audience for uploading user IDs.
1028+
Empty array is returned for any other type of audience.
1029+
Max: 50
1030+
maxItems: 50
1031+
items:
1032+
"$ref": "#/components/schemas/AudienceGroupJob"
1033+
owner:
1034+
"$ref": "#/components/schemas/DetailedOwner"
8121035
AudienceGroup:
8131036
# https://developers.line.biz/en/reference/messaging-api/#get-audience-groups
8141037
# https://developers.line.biz/en/reference/messaging-api/#get-audience-group
@@ -886,6 +1109,29 @@ components:
8861109
type: integer
8871110
format: int64
8881111
description: "When the job was created (in UNIX time)."
1112+
Adaccount:
1113+
description: "Adaccount"
1114+
type: object
1115+
properties:
1116+
name:
1117+
type: string
1118+
description: "Ad account name."
1119+
DetailedOwner:
1120+
description: "Owner of this audience group."
1121+
type: object
1122+
properties:
1123+
serviceType:
1124+
type: string
1125+
description: "Service name where the audience group has been created."
1126+
example: lap
1127+
id:
1128+
type: string
1129+
description: |-
1130+
Owner ID in the service.
1131+
example: A012345678
1132+
name:
1133+
type: string
1134+
description: "Owner account name."
8891135
AudienceGroupStatus:
8901136
# https://developers.line.biz/en/reference/messaging-api/#get-audience-groups
8911137
# https://developers.line.biz/en/reference/messaging-api/#get-audience-group
@@ -975,6 +1221,36 @@ components:
9751221
type: integer
9761222
format: int64
9771223
description: "The maximum number of audiences on the current page."
1224+
GetSharedAudienceGroupsResponse:
1225+
externalDocs:
1226+
url: https://developers.line.biz/en/reference/messaging-api/#get-audience-groups
1227+
type: object
1228+
description: "Gets data for more than one audience."
1229+
properties:
1230+
audienceGroups:
1231+
description: "An array of audience data. If there are no audiences that match the specified filter, an empty array will be returned."
1232+
type: array
1233+
items:
1234+
"$ref": "#/components/schemas/AudienceGroup"
1235+
hasNextPage:
1236+
type: boolean
1237+
description: "true when this is not the last page."
1238+
totalCount:
1239+
type: integer
1240+
format: int64
1241+
description: "The total number of audiences that can be returned with the specified filter."
1242+
readWriteAudienceGroupTotalCount:
1243+
type: integer
1244+
format: int64
1245+
description: "Of the audiences you can get with the specified filter, the number of audiences with the update permission set to READ_WRITE."
1246+
page:
1247+
type: integer
1248+
format: int64
1249+
description: "The current page number."
1250+
size:
1251+
type: integer
1252+
format: int64
1253+
description: "The maximum number of audiences on the current page."
9781254
GetAudienceGroupAuthorityLevelResponse:
9791255
externalDocs:
9801256
url: https://developers.line.biz/en/reference/messaging-api/#get-authority-level

0 commit comments

Comments
 (0)