@getlatedev/node 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +125 -127
- package/dist/index.d.mts +64 -527
- package/dist/index.d.ts +64 -527
- package/dist/index.js +0 -14
- package/dist/index.mjs +0 -14
- package/package.json +1 -1
- package/src/client.ts +0 -4
- package/src/generated/sdk.gen.ts +224 -753
- package/src/generated/types.gen.ts +63 -532
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
3
|
import { createClient, createConfig, type OptionsLegacyParser, formDataBodySerializer } from '@hey-api/client-fetch';
|
|
4
|
-
import type { DownloadYouTubeVideoData, DownloadYouTubeVideoError, DownloadYouTubeVideoResponse, GetYouTubeTranscriptData, GetYouTubeTranscriptError, GetYouTubeTranscriptResponse, DownloadInstagramMediaData, DownloadInstagramMediaError, DownloadInstagramMediaResponse, CheckInstagramHashtagsData, CheckInstagramHashtagsError, CheckInstagramHashtagsResponse, DownloadTikTokVideoData, DownloadTikTokVideoError, DownloadTikTokVideoResponse, DownloadTwitterMediaData, DownloadTwitterMediaError, DownloadTwitterMediaResponse, DownloadFacebookVideoData, DownloadFacebookVideoError, DownloadFacebookVideoResponse, DownloadLinkedInVideoData, DownloadLinkedInVideoError, DownloadLinkedInVideoResponse, DownloadBlueskyMediaData, DownloadBlueskyMediaError, DownloadBlueskyMediaResponse, GetAnalyticsData, GetAnalyticsError, GetAnalyticsResponse, GetYouTubeDailyViewsData, GetYouTubeDailyViewsError, GetYouTubeDailyViewsResponse, ListAccountGroupsError, ListAccountGroupsResponse, CreateAccountGroupData, CreateAccountGroupError, CreateAccountGroupResponse, UpdateAccountGroupData, UpdateAccountGroupError, UpdateAccountGroupResponse, DeleteAccountGroupData, DeleteAccountGroupError, DeleteAccountGroupResponse, GetMediaPresignedUrlData, GetMediaPresignedUrlError, GetMediaPresignedUrlResponse, SearchRedditData, SearchRedditError, SearchRedditResponse, GetRedditFeedData, GetRedditFeedError, GetRedditFeedResponse, GetUsageStatsError, GetUsageStatsResponse, ListPostsData, ListPostsError, ListPostsResponse, CreatePostData, CreatePostError, CreatePostResponse, GetPostData, GetPostError, GetPostResponse, UpdatePostData, UpdatePostError, UpdatePostResponse, DeletePostData, DeletePostError, DeletePostResponse, BulkUploadPostsData, BulkUploadPostsError, BulkUploadPostsResponse, RetryPostData, RetryPostError, RetryPostResponse, UnpublishPostData, UnpublishPostError, UnpublishPostResponse, ListUsersError, ListUsersResponse, GetUserData, GetUserError, GetUserResponse, ListProfilesData, ListProfilesError, ListProfilesResponse, CreateProfileData, CreateProfileError, CreateProfileResponse, GetProfileData, GetProfileError, GetProfileResponse, UpdateProfileData, UpdateProfileError, UpdateProfileResponse, DeleteProfileData, DeleteProfileError, DeleteProfileResponse, ListAccountsData, ListAccountsError, ListAccountsResponse, GetFollowerStatsData, GetFollowerStatsError, GetFollowerStatsResponse, UpdateAccountData, UpdateAccountError, UpdateAccountResponse, DeleteAccountData, DeleteAccountError, DeleteAccountResponse, GetAllAccountsHealthData, GetAllAccountsHealthError, GetAllAccountsHealthResponse, GetAccountHealthData, GetAccountHealthError, GetAccountHealthResponse, ListApiKeysError, ListApiKeysResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse, DeleteApiKeyData, DeleteApiKeyError, DeleteApiKeyResponse, CreateInviteTokenData, CreateInviteTokenError, CreateInviteTokenResponse, GetConnectUrlData, GetConnectUrlError, GetConnectUrlResponse, HandleOAuthCallbackData, HandleOAuthCallbackError, HandleOAuthCallbackResponse, ListFacebookPagesData, ListFacebookPagesError, ListFacebookPagesResponse, SelectFacebookPageData, SelectFacebookPageError, SelectFacebookPageResponse, ListGoogleBusinessLocationsData, ListGoogleBusinessLocationsError, ListGoogleBusinessLocationsResponse, SelectGoogleBusinessLocationData, SelectGoogleBusinessLocationError, SelectGoogleBusinessLocationResponse, GetGoogleBusinessReviewsData, GetGoogleBusinessReviewsError, GetGoogleBusinessReviewsResponse, GetGoogleBusinessFoodMenusData, GetGoogleBusinessFoodMenusError, GetGoogleBusinessFoodMenusResponse, UpdateGoogleBusinessFoodMenusData, UpdateGoogleBusinessFoodMenusError, UpdateGoogleBusinessFoodMenusResponse, GetGoogleBusinessLocationDetailsData, GetGoogleBusinessLocationDetailsError, GetGoogleBusinessLocationDetailsResponse, UpdateGoogleBusinessLocationDetailsData, UpdateGoogleBusinessLocationDetailsError, UpdateGoogleBusinessLocationDetailsResponse, ListGoogleBusinessMediaData, ListGoogleBusinessMediaError, ListGoogleBusinessMediaResponse, CreateGoogleBusinessMediaData, CreateGoogleBusinessMediaError, CreateGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaData, DeleteGoogleBusinessMediaError, DeleteGoogleBusinessMediaResponse, GetGoogleBusinessAttributesData, GetGoogleBusinessAttributesError, GetGoogleBusinessAttributesResponse, UpdateGoogleBusinessAttributesData, UpdateGoogleBusinessAttributesError, UpdateGoogleBusinessAttributesResponse, ListGoogleBusinessPlaceActionsData, ListGoogleBusinessPlaceActionsError, ListGoogleBusinessPlaceActionsResponse, CreateGoogleBusinessPlaceActionData, CreateGoogleBusinessPlaceActionError, CreateGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionData, DeleteGoogleBusinessPlaceActionError, DeleteGoogleBusinessPlaceActionResponse, GetPendingOAuthDataData, GetPendingOAuthDataError, GetPendingOAuthDataResponse, ListLinkedInOrganizationsData, ListLinkedInOrganizationsError, ListLinkedInOrganizationsResponse, SelectLinkedInOrganizationData, SelectLinkedInOrganizationError, SelectLinkedInOrganizationResponse, ListPinterestBoardsForSelectionData, ListPinterestBoardsForSelectionError, ListPinterestBoardsForSelectionResponse, SelectPinterestBoardData, SelectPinterestBoardError, SelectPinterestBoardResponse, ListSnapchatProfilesData, ListSnapchatProfilesError, ListSnapchatProfilesResponse, SelectSnapchatProfileData, SelectSnapchatProfileError, SelectSnapchatProfileResponse, ConnectBlueskyCredentialsData, ConnectBlueskyCredentialsError, ConnectBlueskyCredentialsResponse, GetTelegramConnectStatusData, GetTelegramConnectStatusError, GetTelegramConnectStatusResponse, InitiateTelegramConnectData, InitiateTelegramConnectError, InitiateTelegramConnectResponse, CompleteTelegramConnectData, CompleteTelegramConnectError, CompleteTelegramConnectResponse, GetFacebookPagesData, GetFacebookPagesError, GetFacebookPagesResponse, UpdateFacebookPageData, UpdateFacebookPageError, UpdateFacebookPageResponse, GetLinkedInOrganizationsData, GetLinkedInOrganizationsError, GetLinkedInOrganizationsResponse, GetLinkedInAggregateAnalyticsData, GetLinkedInAggregateAnalyticsError, GetLinkedInAggregateAnalyticsResponse, GetLinkedInPostAnalyticsData, GetLinkedInPostAnalyticsError, GetLinkedInPostAnalyticsResponse, UpdateLinkedInOrganizationData, UpdateLinkedInOrganizationError, UpdateLinkedInOrganizationResponse, GetLinkedInMentionsData, GetLinkedInMentionsError, GetLinkedInMentionsResponse, GetPinterestBoardsData, GetPinterestBoardsError, GetPinterestBoardsResponse, UpdatePinterestBoardsData, UpdatePinterestBoardsError, UpdatePinterestBoardsResponse, GetGmbLocationsData, GetGmbLocationsError, GetGmbLocationsResponse, UpdateGmbLocationData, UpdateGmbLocationError, UpdateGmbLocationResponse, GetRedditSubredditsData, GetRedditSubredditsError, GetRedditSubredditsResponse, UpdateRedditSubredditsData, UpdateRedditSubredditsError, UpdateRedditSubredditsResponse, GetRedditFlairsData, GetRedditFlairsError, GetRedditFlairsResponse, ListQueueSlotsData, ListQueueSlotsError, ListQueueSlotsResponse, CreateQueueSlotData, CreateQueueSlotError, CreateQueueSlotResponse, UpdateQueueSlotData, UpdateQueueSlotError, UpdateQueueSlotResponse, DeleteQueueSlotData, DeleteQueueSlotError, DeleteQueueSlotResponse, PreviewQueueData, PreviewQueueError, PreviewQueueResponse, GetNextQueueSlotData, GetNextQueueSlotError, GetNextQueueSlotResponse, GetWebhookSettingsError, GetWebhookSettingsResponse, CreateWebhookSettingsData, CreateWebhookSettingsError, CreateWebhookSettingsResponse, UpdateWebhookSettingsData, UpdateWebhookSettingsError, UpdateWebhookSettingsResponse, DeleteWebhookSettingsData, DeleteWebhookSettingsError, DeleteWebhookSettingsResponse, TestWebhookData, TestWebhookError, TestWebhookResponse, GetWebhookLogsData, GetWebhookLogsError, GetWebhookLogsResponse, ListLogsData, ListLogsError, ListLogsResponse, GetLogData, GetLogError, GetLogResponse, ListPostsLogsData, ListPostsLogsError, ListPostsLogsResponse, ListConnectionLogsData, ListConnectionLogsError, ListConnectionLogsResponse, GetPostLogsData, GetPostLogsError, GetPostLogsResponse, ListInboxConversationsData, ListInboxConversationsError, ListInboxConversationsResponse, GetInboxConversationData, GetInboxConversationError, GetInboxConversationResponse, UpdateInboxConversationData, UpdateInboxConversationError, UpdateInboxConversationResponse, GetInboxConversationMessagesData, GetInboxConversationMessagesError, GetInboxConversationMessagesResponse, SendInboxMessageData, SendInboxMessageError, SendInboxMessageResponse, EditInboxMessageData, EditInboxMessageError, EditInboxMessageResponse, GetMessengerMenuData, GetMessengerMenuError, GetMessengerMenuResponse, SetMessengerMenuData, SetMessengerMenuError, SetMessengerMenuResponse, DeleteMessengerMenuData, DeleteMessengerMenuError, DeleteMessengerMenuResponse, GetInstagramIceBreakersData, GetInstagramIceBreakersError, GetInstagramIceBreakersResponse, SetInstagramIceBreakersData, SetInstagramIceBreakersError, SetInstagramIceBreakersResponse, DeleteInstagramIceBreakersData, DeleteInstagramIceBreakersError, DeleteInstagramIceBreakersResponse, GetTelegramCommandsData, GetTelegramCommandsError, GetTelegramCommandsResponse, SetTelegramCommandsData, SetTelegramCommandsError, SetTelegramCommandsResponse, DeleteTelegramCommandsData, DeleteTelegramCommandsError, DeleteTelegramCommandsResponse, ListInboxCommentsData, ListInboxCommentsError, ListInboxCommentsResponse, GetInboxPostCommentsData, GetInboxPostCommentsError, GetInboxPostCommentsResponse, ReplyToInboxPostData, ReplyToInboxPostError, ReplyToInboxPostResponse, DeleteInboxCommentData, DeleteInboxCommentError, DeleteInboxCommentResponse, HideInboxCommentData, HideInboxCommentError, HideInboxCommentResponse, UnhideInboxCommentData, UnhideInboxCommentError, UnhideInboxCommentResponse, LikeInboxCommentData, LikeInboxCommentError, LikeInboxCommentResponse, UnlikeInboxCommentData, UnlikeInboxCommentError, UnlikeInboxCommentResponse, SendPrivateReplyToCommentData, SendPrivateReplyToCommentError, SendPrivateReplyToCommentResponse, ListInboxReviewsData, ListInboxReviewsError, ListInboxReviewsResponse, ReplyToInboxReviewData, ReplyToInboxReviewError, ReplyToInboxReviewResponse, DeleteInboxReviewReplyData, DeleteInboxReviewReplyError, DeleteInboxReviewReplyResponse } from './types.gen';
|
|
4
|
+
import type { DownloadYouTubeVideoData, DownloadYouTubeVideoError, DownloadYouTubeVideoResponse, GetYouTubeTranscriptData, GetYouTubeTranscriptError, GetYouTubeTranscriptResponse, DownloadInstagramMediaData, DownloadInstagramMediaError, DownloadInstagramMediaResponse, CheckInstagramHashtagsData, CheckInstagramHashtagsError, CheckInstagramHashtagsResponse, DownloadTikTokVideoData, DownloadTikTokVideoError, DownloadTikTokVideoResponse, DownloadTwitterMediaData, DownloadTwitterMediaError, DownloadTwitterMediaResponse, DownloadFacebookVideoData, DownloadFacebookVideoError, DownloadFacebookVideoResponse, DownloadLinkedInVideoData, DownloadLinkedInVideoError, DownloadLinkedInVideoResponse, DownloadBlueskyMediaData, DownloadBlueskyMediaError, DownloadBlueskyMediaResponse, GetAnalyticsData, GetAnalyticsError, GetAnalyticsResponse, GetYouTubeDailyViewsData, GetYouTubeDailyViewsError, GetYouTubeDailyViewsResponse, ListAccountGroupsError, ListAccountGroupsResponse, CreateAccountGroupData, CreateAccountGroupError, CreateAccountGroupResponse, UpdateAccountGroupData, UpdateAccountGroupError, UpdateAccountGroupResponse, DeleteAccountGroupData, DeleteAccountGroupError, DeleteAccountGroupResponse, GetMediaPresignedUrlData, GetMediaPresignedUrlError, GetMediaPresignedUrlResponse, SearchRedditData, SearchRedditError, SearchRedditResponse, GetRedditFeedData, GetRedditFeedError, GetRedditFeedResponse, GetUsageStatsError, GetUsageStatsResponse, ListPostsData, ListPostsError, ListPostsResponse, CreatePostData, CreatePostError, CreatePostResponse, GetPostData, GetPostError, GetPostResponse, UpdatePostData, UpdatePostError, UpdatePostResponse, DeletePostData, DeletePostError, DeletePostResponse, BulkUploadPostsData, BulkUploadPostsError, BulkUploadPostsResponse, RetryPostData, RetryPostError, RetryPostResponse, UnpublishPostData, UnpublishPostError, UnpublishPostResponse, ListUsersError, ListUsersResponse, GetUserData, GetUserError, GetUserResponse, ListProfilesData, ListProfilesError, ListProfilesResponse, CreateProfileData, CreateProfileError, CreateProfileResponse, GetProfileData, GetProfileError, GetProfileResponse, UpdateProfileData, UpdateProfileError, UpdateProfileResponse, DeleteProfileData, DeleteProfileError, DeleteProfileResponse, ListAccountsData, ListAccountsError, ListAccountsResponse, GetFollowerStatsData, GetFollowerStatsError, GetFollowerStatsResponse, UpdateAccountData, UpdateAccountError, UpdateAccountResponse, DeleteAccountData, DeleteAccountError, DeleteAccountResponse, GetAllAccountsHealthData, GetAllAccountsHealthError, GetAllAccountsHealthResponse, GetAccountHealthData, GetAccountHealthError, GetAccountHealthResponse, ListApiKeysError, ListApiKeysResponse, CreateApiKeyData, CreateApiKeyError, CreateApiKeyResponse, DeleteApiKeyData, DeleteApiKeyError, DeleteApiKeyResponse, CreateInviteTokenData, CreateInviteTokenError, CreateInviteTokenResponse, GetConnectUrlData, GetConnectUrlError, GetConnectUrlResponse, HandleOAuthCallbackData, HandleOAuthCallbackError, HandleOAuthCallbackResponse, ListFacebookPagesData, ListFacebookPagesError, ListFacebookPagesResponse, SelectFacebookPageData, SelectFacebookPageError, SelectFacebookPageResponse, ListGoogleBusinessLocationsData, ListGoogleBusinessLocationsError, ListGoogleBusinessLocationsResponse, SelectGoogleBusinessLocationData, SelectGoogleBusinessLocationError, SelectGoogleBusinessLocationResponse, GetGoogleBusinessReviewsData, GetGoogleBusinessReviewsError, GetGoogleBusinessReviewsResponse, GetGoogleBusinessFoodMenusData, GetGoogleBusinessFoodMenusError, GetGoogleBusinessFoodMenusResponse, UpdateGoogleBusinessFoodMenusData, UpdateGoogleBusinessFoodMenusError, UpdateGoogleBusinessFoodMenusResponse, GetGoogleBusinessLocationDetailsData, GetGoogleBusinessLocationDetailsError, GetGoogleBusinessLocationDetailsResponse, UpdateGoogleBusinessLocationDetailsData, UpdateGoogleBusinessLocationDetailsError, UpdateGoogleBusinessLocationDetailsResponse, ListGoogleBusinessMediaData, ListGoogleBusinessMediaError, ListGoogleBusinessMediaResponse, CreateGoogleBusinessMediaData, CreateGoogleBusinessMediaError, CreateGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaData, DeleteGoogleBusinessMediaError, DeleteGoogleBusinessMediaResponse, GetGoogleBusinessAttributesData, GetGoogleBusinessAttributesError, GetGoogleBusinessAttributesResponse, UpdateGoogleBusinessAttributesData, UpdateGoogleBusinessAttributesError, UpdateGoogleBusinessAttributesResponse, ListGoogleBusinessPlaceActionsData, ListGoogleBusinessPlaceActionsError, ListGoogleBusinessPlaceActionsResponse, CreateGoogleBusinessPlaceActionData, CreateGoogleBusinessPlaceActionError, CreateGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionData, DeleteGoogleBusinessPlaceActionError, DeleteGoogleBusinessPlaceActionResponse, GetPendingOAuthDataData, GetPendingOAuthDataError, GetPendingOAuthDataResponse, ListLinkedInOrganizationsData, ListLinkedInOrganizationsError, ListLinkedInOrganizationsResponse, SelectLinkedInOrganizationData, SelectLinkedInOrganizationError, SelectLinkedInOrganizationResponse, ListPinterestBoardsForSelectionData, ListPinterestBoardsForSelectionError, ListPinterestBoardsForSelectionResponse, SelectPinterestBoardData, SelectPinterestBoardError, SelectPinterestBoardResponse, ListSnapchatProfilesData, ListSnapchatProfilesError, ListSnapchatProfilesResponse, SelectSnapchatProfileData, SelectSnapchatProfileError, SelectSnapchatProfileResponse, ConnectBlueskyCredentialsData, ConnectBlueskyCredentialsError, ConnectBlueskyCredentialsResponse, GetTelegramConnectStatusData, GetTelegramConnectStatusError, GetTelegramConnectStatusResponse, InitiateTelegramConnectData, InitiateTelegramConnectError, InitiateTelegramConnectResponse, CompleteTelegramConnectData, CompleteTelegramConnectError, CompleteTelegramConnectResponse, GetFacebookPagesData, GetFacebookPagesError, GetFacebookPagesResponse, UpdateFacebookPageData, UpdateFacebookPageError, UpdateFacebookPageResponse, GetLinkedInOrganizationsData, GetLinkedInOrganizationsError, GetLinkedInOrganizationsResponse, GetLinkedInAggregateAnalyticsData, GetLinkedInAggregateAnalyticsError, GetLinkedInAggregateAnalyticsResponse, GetLinkedInPostAnalyticsData, GetLinkedInPostAnalyticsError, GetLinkedInPostAnalyticsResponse, UpdateLinkedInOrganizationData, UpdateLinkedInOrganizationError, UpdateLinkedInOrganizationResponse, GetLinkedInMentionsData, GetLinkedInMentionsError, GetLinkedInMentionsResponse, GetPinterestBoardsData, GetPinterestBoardsError, GetPinterestBoardsResponse, UpdatePinterestBoardsData, UpdatePinterestBoardsError, UpdatePinterestBoardsResponse, GetGmbLocationsData, GetGmbLocationsError, GetGmbLocationsResponse, UpdateGmbLocationData, UpdateGmbLocationError, UpdateGmbLocationResponse, GetRedditSubredditsData, GetRedditSubredditsError, GetRedditSubredditsResponse, UpdateRedditSubredditsData, UpdateRedditSubredditsError, UpdateRedditSubredditsResponse, GetRedditFlairsData, GetRedditFlairsError, GetRedditFlairsResponse, ListQueueSlotsData, ListQueueSlotsError, ListQueueSlotsResponse, CreateQueueSlotData, CreateQueueSlotError, CreateQueueSlotResponse, UpdateQueueSlotData, UpdateQueueSlotError, UpdateQueueSlotResponse, DeleteQueueSlotData, DeleteQueueSlotError, DeleteQueueSlotResponse, PreviewQueueData, PreviewQueueError, PreviewQueueResponse, GetNextQueueSlotData, GetNextQueueSlotError, GetNextQueueSlotResponse, GetWebhookSettingsError, GetWebhookSettingsResponse, CreateWebhookSettingsData, CreateWebhookSettingsError, CreateWebhookSettingsResponse, UpdateWebhookSettingsData, UpdateWebhookSettingsError, UpdateWebhookSettingsResponse, DeleteWebhookSettingsData, DeleteWebhookSettingsError, DeleteWebhookSettingsResponse, TestWebhookData, TestWebhookError, TestWebhookResponse, GetWebhookLogsData, GetWebhookLogsError, GetWebhookLogsResponse, ListPostsLogsData, ListPostsLogsError, ListPostsLogsResponse, ListConnectionLogsData, ListConnectionLogsError, ListConnectionLogsResponse, GetPostLogsData, GetPostLogsError, GetPostLogsResponse, ListInboxConversationsData, ListInboxConversationsError, ListInboxConversationsResponse, GetInboxConversationData, GetInboxConversationError, GetInboxConversationResponse, UpdateInboxConversationData, UpdateInboxConversationError, UpdateInboxConversationResponse, GetInboxConversationMessagesData, GetInboxConversationMessagesError, GetInboxConversationMessagesResponse, SendInboxMessageData, SendInboxMessageError, SendInboxMessageResponse, EditInboxMessageData, EditInboxMessageError, EditInboxMessageResponse, GetMessengerMenuData, GetMessengerMenuError, GetMessengerMenuResponse, SetMessengerMenuData, SetMessengerMenuError, SetMessengerMenuResponse, DeleteMessengerMenuData, DeleteMessengerMenuError, DeleteMessengerMenuResponse, GetInstagramIceBreakersData, GetInstagramIceBreakersError, GetInstagramIceBreakersResponse, SetInstagramIceBreakersData, SetInstagramIceBreakersError, SetInstagramIceBreakersResponse, DeleteInstagramIceBreakersData, DeleteInstagramIceBreakersError, DeleteInstagramIceBreakersResponse, GetTelegramCommandsData, GetTelegramCommandsError, GetTelegramCommandsResponse, SetTelegramCommandsData, SetTelegramCommandsError, SetTelegramCommandsResponse, DeleteTelegramCommandsData, DeleteTelegramCommandsError, DeleteTelegramCommandsResponse, ListInboxCommentsData, ListInboxCommentsError, ListInboxCommentsResponse, GetInboxPostCommentsData, GetInboxPostCommentsError, GetInboxPostCommentsResponse, ReplyToInboxPostData, ReplyToInboxPostError, ReplyToInboxPostResponse, DeleteInboxCommentData, DeleteInboxCommentError, DeleteInboxCommentResponse, HideInboxCommentData, HideInboxCommentError, HideInboxCommentResponse, UnhideInboxCommentData, UnhideInboxCommentError, UnhideInboxCommentResponse, LikeInboxCommentData, LikeInboxCommentError, LikeInboxCommentResponse, UnlikeInboxCommentData, UnlikeInboxCommentError, UnlikeInboxCommentResponse, SendPrivateReplyToCommentData, SendPrivateReplyToCommentError, SendPrivateReplyToCommentResponse, ListInboxReviewsData, ListInboxReviewsError, ListInboxReviewsResponse, ReplyToInboxReviewData, ReplyToInboxReviewError, ReplyToInboxReviewResponse, DeleteInboxReviewReplyData, DeleteInboxReviewReplyError, DeleteInboxReviewReplyResponse } from './types.gen';
|
|
5
5
|
|
|
6
6
|
export const client = createClient(createConfig());
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* Download YouTube video
|
|
9
|
+
* Download YouTube video
|
|
10
10
|
* Download YouTube videos or audio. Returns available formats or direct download URL.
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
13
13
|
*
|
|
14
14
|
*/
|
|
15
15
|
export const downloadYouTubeVideo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadYouTubeVideoData, ThrowOnError>) => {
|
|
@@ -20,10 +20,10 @@ export const downloadYouTubeVideo = <ThrowOnError extends boolean = false>(optio
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Get YouTube
|
|
23
|
+
* Get YouTube transcript
|
|
24
24
|
* Extract transcript/captions from a YouTube video.
|
|
25
25
|
*
|
|
26
|
-
*
|
|
26
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
27
27
|
*
|
|
28
28
|
*/
|
|
29
29
|
export const getYouTubeTranscript = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYouTubeTranscriptData, ThrowOnError>) => {
|
|
@@ -34,10 +34,10 @@ export const getYouTubeTranscript = <ThrowOnError extends boolean = false>(optio
|
|
|
34
34
|
};
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
* Download Instagram
|
|
37
|
+
* Download Instagram media
|
|
38
38
|
* Download Instagram reels, posts, or photos.
|
|
39
39
|
*
|
|
40
|
-
*
|
|
40
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
41
41
|
*
|
|
42
42
|
*/
|
|
43
43
|
export const downloadInstagramMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadInstagramMediaData, ThrowOnError>) => {
|
|
@@ -48,10 +48,10 @@ export const downloadInstagramMedia = <ThrowOnError extends boolean = false>(opt
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Check
|
|
51
|
+
* Check IG hashtag bans
|
|
52
52
|
* Check if Instagram hashtags are banned, restricted, or safe to use.
|
|
53
53
|
*
|
|
54
|
-
*
|
|
54
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
55
55
|
*
|
|
56
56
|
*/
|
|
57
57
|
export const checkInstagramHashtags = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CheckInstagramHashtagsData, ThrowOnError>) => {
|
|
@@ -65,7 +65,7 @@ export const checkInstagramHashtags = <ThrowOnError extends boolean = false>(opt
|
|
|
65
65
|
* Download TikTok video
|
|
66
66
|
* Download TikTok videos with or without watermark.
|
|
67
67
|
*
|
|
68
|
-
*
|
|
68
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
69
69
|
*
|
|
70
70
|
*/
|
|
71
71
|
export const downloadTikTokVideo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadTikTokVideoData, ThrowOnError>) => {
|
|
@@ -76,10 +76,10 @@ export const downloadTikTokVideo = <ThrowOnError extends boolean = false>(option
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
|
-
* Download Twitter/X
|
|
79
|
+
* Download Twitter/X media
|
|
80
80
|
* Download videos from Twitter/X posts.
|
|
81
81
|
*
|
|
82
|
-
*
|
|
82
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
83
83
|
*
|
|
84
84
|
*/
|
|
85
85
|
export const downloadTwitterMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadTwitterMediaData, ThrowOnError>) => {
|
|
@@ -93,7 +93,7 @@ export const downloadTwitterMedia = <ThrowOnError extends boolean = false>(optio
|
|
|
93
93
|
* Download Facebook video
|
|
94
94
|
* Download videos and reels from Facebook.
|
|
95
95
|
*
|
|
96
|
-
*
|
|
96
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
97
97
|
*
|
|
98
98
|
*/
|
|
99
99
|
export const downloadFacebookVideo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadFacebookVideoData, ThrowOnError>) => {
|
|
@@ -107,7 +107,7 @@ export const downloadFacebookVideo = <ThrowOnError extends boolean = false>(opti
|
|
|
107
107
|
* Download LinkedIn video
|
|
108
108
|
* Download videos from LinkedIn posts.
|
|
109
109
|
*
|
|
110
|
-
*
|
|
110
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
111
111
|
*
|
|
112
112
|
*/
|
|
113
113
|
export const downloadLinkedInVideo = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadLinkedInVideoData, ThrowOnError>) => {
|
|
@@ -118,10 +118,10 @@ export const downloadLinkedInVideo = <ThrowOnError extends boolean = false>(opti
|
|
|
118
118
|
};
|
|
119
119
|
|
|
120
120
|
/**
|
|
121
|
-
* Download Bluesky
|
|
121
|
+
* Download Bluesky media
|
|
122
122
|
* Download videos from Bluesky posts.
|
|
123
123
|
*
|
|
124
|
-
*
|
|
124
|
+
* Rate limits: Build (50/day), Accelerate (500/day), Unlimited (unlimited).
|
|
125
125
|
*
|
|
126
126
|
*/
|
|
127
127
|
export const downloadBlueskyMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DownloadBlueskyMediaData, ThrowOnError>) => {
|
|
@@ -132,43 +132,10 @@ export const downloadBlueskyMedia = <ThrowOnError extends boolean = false>(optio
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
* Returns analytics for posts.
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
* **Important: Understanding Post IDs**
|
|
140
|
-
*
|
|
141
|
-
* This endpoint uses two types of posts:
|
|
142
|
-
* - **Late Posts** - Posts scheduled/created via the Late API (e.g., via `POST /v1/posts`)
|
|
143
|
-
* - **External Posts** - Posts synced from social platforms for analytics tracking
|
|
144
|
-
*
|
|
145
|
-
* When you schedule a post via Late and it gets published, **both** records exist:
|
|
146
|
-
* 1. The original Late Post (returned when you created the post)
|
|
147
|
-
* 2. An External Post (created when we sync analytics from the platform)
|
|
148
|
-
*
|
|
149
|
-
* **List endpoint behavior:**
|
|
150
|
-
* - Returns External Post IDs (`_id` field)
|
|
151
|
-
* - Use the `isExternal` field to identify post origin:
|
|
152
|
-
* - `isExternal: true` - Synced from platform (may have been originally scheduled via Late)
|
|
153
|
-
* - `isExternal: false` - Late-scheduled post (shown when querying by Late post ID)
|
|
154
|
-
*
|
|
155
|
-
* **Single post behavior (`postId` parameter):**
|
|
156
|
-
* - Accepts **both** Late Post IDs and External Post IDs
|
|
157
|
-
* - If you pass a Late Post ID, the API automatically resolves it to the corresponding External Post analytics
|
|
158
|
-
* - Both return the same analytics data for the same underlying social media post
|
|
159
|
-
*
|
|
160
|
-
* **Correlating posts:** Use `latePostId` to link analytics entries back to the original post created via `POST /v1/posts`. This field contains the Late Post ID when the external post originated from Late. Alternatively, use `platformPostUrl` (e.g., `https://www.instagram.com/reel/ABC123/`) as a stable identifier.
|
|
161
|
-
*
|
|
162
|
-
* **Note:** For follower count history and growth metrics, use the dedicated `/v1/accounts/follower-stats` endpoint.
|
|
163
|
-
*
|
|
164
|
-
* **LinkedIn Analytics:**
|
|
165
|
-
* - **Personal Accounts:** Per-post analytics available for posts published through Late. External posts cannot be synced due to LinkedIn API restrictions.
|
|
166
|
-
* - **Organization Accounts:** Full analytics support including external post syncing.
|
|
167
|
-
*
|
|
168
|
-
* **Telegram Analytics:**
|
|
169
|
-
* - **Not available.** The Telegram Bot API does not provide message view counts, forwards, or engagement metrics. This is a Telegram platform limitation, not a Late limitation. View counts are only visible to channel admins in the Telegram app.
|
|
170
|
-
*
|
|
171
|
-
* **Data Freshness:** Analytics data is cached and refreshed at most once per hour. When you call this endpoint, if the cache is older than 60 minutes, a background refresh is triggered and you'll see updated data on subsequent requests. There is no rate limit on API requests.
|
|
135
|
+
* Get post analytics
|
|
136
|
+
* Returns analytics for posts. With postId, returns a single post. Without it, returns a paginated list with overview stats.
|
|
137
|
+
* This endpoint returns External Post IDs by default. The postId parameter accepts both Late Post IDs and External Post IDs, auto-resolving Late IDs to External Post analytics. Use latePostId in responses to link back to your original post, or platformPostUrl as a stable identifier. isExternal indicates post origin (true = synced from platform).
|
|
138
|
+
* For follower stats, use /v1/accounts/follower-stats. LinkedIn personal accounts: per-post analytics only for Late-published posts. Telegram: not available. Data is cached and refreshed at most once per hour.
|
|
172
139
|
*
|
|
173
140
|
*/
|
|
174
141
|
export const getAnalytics = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAnalyticsData, ThrowOnError>) => {
|
|
@@ -179,19 +146,13 @@ export const getAnalytics = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
179
146
|
};
|
|
180
147
|
|
|
181
148
|
/**
|
|
182
|
-
* YouTube daily views
|
|
149
|
+
* Get YouTube daily views
|
|
183
150
|
* Returns historical daily view counts for a specific YouTube video.
|
|
184
151
|
* Uses YouTube Analytics API v2 to fetch daily breakdowns including views,
|
|
185
152
|
* watch time, and subscriber changes.
|
|
186
153
|
*
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
* If the scope is missing, the response will include a `reauthorizeUrl`.
|
|
190
|
-
*
|
|
191
|
-
* **Data Latency:** YouTube Analytics data has a 2-3 day delay. The `endDate`
|
|
192
|
-
* is automatically capped to 3 days ago.
|
|
193
|
-
*
|
|
194
|
-
* **Date Range:** Maximum 90 days of historical data available. Defaults to last 30 days.
|
|
154
|
+
* Requires the yt-analytics.readonly OAuth scope. Existing YouTube accounts may need to re-authorize. If the scope is missing, the response includes a reauthorizeUrl.
|
|
155
|
+
* Data has a 2-3 day delay; endDate is automatically capped to 3 days ago. Maximum 90 days of historical data. Defaults to last 30 days.
|
|
195
156
|
*
|
|
196
157
|
*/
|
|
197
158
|
export const getYouTubeDailyViews = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetYouTubeDailyViewsData, ThrowOnError>) => {
|
|
@@ -202,7 +163,7 @@ export const getYouTubeDailyViews = <ThrowOnError extends boolean = false>(optio
|
|
|
202
163
|
};
|
|
203
164
|
|
|
204
165
|
/**
|
|
205
|
-
* List
|
|
166
|
+
* List groups
|
|
206
167
|
*/
|
|
207
168
|
export const listAccountGroups = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
208
169
|
return (options?.client ?? client).get<ListAccountGroupsResponse, ListAccountGroupsError, ThrowOnError>({
|
|
@@ -212,7 +173,7 @@ export const listAccountGroups = <ThrowOnError extends boolean = false>(options?
|
|
|
212
173
|
};
|
|
213
174
|
|
|
214
175
|
/**
|
|
215
|
-
* Create
|
|
176
|
+
* Create group
|
|
216
177
|
*/
|
|
217
178
|
export const createAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAccountGroupData, ThrowOnError>) => {
|
|
218
179
|
return (options?.client ?? client).post<CreateAccountGroupResponse, CreateAccountGroupError, ThrowOnError>({
|
|
@@ -222,7 +183,7 @@ export const createAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
222
183
|
};
|
|
223
184
|
|
|
224
185
|
/**
|
|
225
|
-
* Update
|
|
186
|
+
* Update group
|
|
226
187
|
*/
|
|
227
188
|
export const updateAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountGroupData, ThrowOnError>) => {
|
|
228
189
|
return (options?.client ?? client).put<UpdateAccountGroupResponse, UpdateAccountGroupError, ThrowOnError>({
|
|
@@ -232,7 +193,7 @@ export const updateAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
232
193
|
};
|
|
233
194
|
|
|
234
195
|
/**
|
|
235
|
-
* Delete
|
|
196
|
+
* Delete group
|
|
236
197
|
*/
|
|
237
198
|
export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountGroupData, ThrowOnError>) => {
|
|
238
199
|
return (options?.client ?? client).delete<DeleteAccountGroupResponse, DeleteAccountGroupError, ThrowOnError>({
|
|
@@ -242,46 +203,10 @@ export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
242
203
|
};
|
|
243
204
|
|
|
244
205
|
/**
|
|
245
|
-
* Get
|
|
246
|
-
* Get a presigned URL to upload files directly to cloud storage.
|
|
247
|
-
*
|
|
248
|
-
* **How it works:**
|
|
249
|
-
* 1. Call this endpoint with the filename and content type
|
|
250
|
-
* 2. Receive an `uploadUrl` (presigned) and `publicUrl`
|
|
251
|
-
* 3. PUT your file directly to the `uploadUrl`
|
|
252
|
-
* 4. Use the `publicUrl` in your posts
|
|
253
|
-
*
|
|
254
|
-
* **Benefits:**
|
|
255
|
-
* - Supports files up to 5GB
|
|
256
|
-
* - Files upload directly to storage (faster, no server bottleneck)
|
|
257
|
-
* - No 413 errors from server body size limits
|
|
258
|
-
*
|
|
259
|
-
* **Example:**
|
|
260
|
-
* ```javascript
|
|
261
|
-
* // Step 1: Get presigned URL
|
|
262
|
-
* const response = await fetch('https://getlate.dev/api/v1/media/presign', {
|
|
263
|
-
* method: 'POST',
|
|
264
|
-
* headers: {
|
|
265
|
-
* 'Authorization': 'Bearer YOUR_API_KEY',
|
|
266
|
-
* 'Content-Type': 'application/json'
|
|
267
|
-
* },
|
|
268
|
-
* body: JSON.stringify({
|
|
269
|
-
* filename: 'my-video.mp4',
|
|
270
|
-
* contentType: 'video/mp4'
|
|
271
|
-
* })
|
|
272
|
-
* });
|
|
273
|
-
* const { uploadUrl, publicUrl } = await response.json();
|
|
274
|
-
*
|
|
275
|
-
* // Step 2: Upload file directly to storage
|
|
276
|
-
* await fetch(uploadUrl, {
|
|
277
|
-
* method: 'PUT',
|
|
278
|
-
* body: file,
|
|
279
|
-
* headers: { 'Content-Type': 'video/mp4' }
|
|
280
|
-
* });
|
|
206
|
+
* Get presigned upload URL
|
|
207
|
+
* Get a presigned URL to upload files directly to cloud storage. Supports files up to 5GB.
|
|
281
208
|
*
|
|
282
|
-
*
|
|
283
|
-
* // The publicUrl is ready to use immediately after upload completes
|
|
284
|
-
* ```
|
|
209
|
+
* How it works: call this endpoint with the filename and content type, receive an uploadUrl (presigned) and publicUrl, PUT your file directly to the uploadUrl, then use the publicUrl in your posts.
|
|
285
210
|
*
|
|
286
211
|
*/
|
|
287
212
|
export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMediaPresignedUrlData, ThrowOnError>) => {
|
|
@@ -292,7 +217,7 @@ export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(optio
|
|
|
292
217
|
};
|
|
293
218
|
|
|
294
219
|
/**
|
|
295
|
-
* Search
|
|
220
|
+
* Search posts
|
|
296
221
|
*/
|
|
297
222
|
export const searchReddit = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SearchRedditData, ThrowOnError>) => {
|
|
298
223
|
return (options?.client ?? client).get<SearchRedditResponse, SearchRedditError, ThrowOnError>({
|
|
@@ -302,7 +227,7 @@ export const searchReddit = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
302
227
|
};
|
|
303
228
|
|
|
304
229
|
/**
|
|
305
|
-
*
|
|
230
|
+
* Get subreddit feed
|
|
306
231
|
*/
|
|
307
232
|
export const getRedditFeed = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditFeedData, ThrowOnError>) => {
|
|
308
233
|
return (options?.client ?? client).get<GetRedditFeedResponse, GetRedditFeedError, ThrowOnError>({
|
|
@@ -312,7 +237,7 @@ export const getRedditFeed = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
312
237
|
};
|
|
313
238
|
|
|
314
239
|
/**
|
|
315
|
-
* Get plan and usage stats
|
|
240
|
+
* Get plan and usage stats
|
|
316
241
|
*/
|
|
317
242
|
export const getUsageStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
318
243
|
return (options?.client ?? client).get<GetUsageStatsResponse, GetUsageStatsError, ThrowOnError>({
|
|
@@ -322,15 +247,10 @@ export const getUsageStats = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
322
247
|
};
|
|
323
248
|
|
|
324
249
|
/**
|
|
325
|
-
* List posts
|
|
326
|
-
*
|
|
327
|
-
* For published posts, each platform entry includes `platformPostUrl` with the public URL.
|
|
328
|
-
* Use `status=published` filter to fetch only published posts with their URLs.
|
|
250
|
+
* List posts
|
|
251
|
+
* For published posts, each platform entry includes platformPostUrl with the public URL. Use status=published to fetch only published posts with their URLs.
|
|
329
252
|
*
|
|
330
|
-
*
|
|
331
|
-
* - YouTube: posts always include at least one video in mediaItems.
|
|
332
|
-
* - Instagram/TikTok: posts always include media; drafts may omit media until finalized in client.
|
|
333
|
-
* - TikTok: mediaItems will not mix photos and videos in the same post.
|
|
253
|
+
* Platform notes: YouTube posts always include at least one video. Instagram/TikTok posts always include media (drafts may omit media). TikTok does not mix photos and videos in the same post.
|
|
334
254
|
*
|
|
335
255
|
*/
|
|
336
256
|
export const listPosts = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListPostsData, ThrowOnError>) => {
|
|
@@ -341,38 +261,10 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
341
261
|
};
|
|
342
262
|
|
|
343
263
|
/**
|
|
344
|
-
* Create
|
|
345
|
-
*
|
|
346
|
-
*
|
|
347
|
-
*
|
|
348
|
-
*
|
|
349
|
-
* **Content/Caption requirements:**
|
|
350
|
-
* - `content` (caption/description) is optional when:
|
|
351
|
-
* - Media is attached (`mediaItems` or per-platform `customMedia`)
|
|
352
|
-
* - All platforms have `customContent` set
|
|
353
|
-
* - Posting only to YouTube (title is used instead)
|
|
354
|
-
* - Text-only posts (no media) require `content`
|
|
355
|
-
* - Stories do not use captions (content is ignored)
|
|
356
|
-
* - Reels, feed posts, and other media posts can have optional captions
|
|
357
|
-
*
|
|
358
|
-
* Platform constraints:
|
|
359
|
-
* - YouTube requires a video in mediaItems; optional custom thumbnail via MediaItem.thumbnail.
|
|
360
|
-
* - Instagram and TikTok require media; do not mix videos and images for TikTok.
|
|
361
|
-
* - Instagram carousels support up to 10 items; Stories publish as 'story'.
|
|
362
|
-
* - Threads carousels support up to 10 images (no videos in carousels); single posts support one image or video.
|
|
363
|
-
* - Facebook Stories require media (single image or video); set contentType to 'story' in platformSpecificData.
|
|
364
|
-
* - LinkedIn multi-image supports up to 20 images; single PDF documents supported (max 100MB, ~300 pages, cannot mix with other media).
|
|
365
|
-
* - Pinterest supports single image via image_url or a single video per Pin; boardId is required.
|
|
366
|
-
* - Bluesky supports up to 4 images per post. Images may be automatically recompressed to ≤ ~1MB to satisfy Bluesky's blob limit. When no media is attached, a link preview may be generated for URLs in the text.
|
|
367
|
-
* - Snapchat requires media (single image or video); set contentType to 'story', 'saved_story', or 'spotlight' in platformSpecificData. Stories are ephemeral (24h), Saved Stories are permanent, Spotlight is for video content.
|
|
368
|
-
*
|
|
369
|
-
* **Multi-page/multi-location posting:**
|
|
370
|
-
* Some platforms allow posting to multiple pages, organizations, or locations from a single account connection.
|
|
371
|
-
* Use the same accountId multiple times with different targets in platformSpecificData:
|
|
372
|
-
* - Facebook: `pageId` - post to multiple Facebook Pages (list via GET /v1/accounts/{id}/facebook-page)
|
|
373
|
-
* - LinkedIn: `organizationUrn` - post to multiple organizations (list via GET /v1/accounts/{id}/linkedin-organizations)
|
|
374
|
-
* - Google Business: `locationId` - post to multiple locations (list via GET /v1/accounts/{id}/gmb-locations)
|
|
375
|
-
* - Reddit: `subreddit` - post to multiple subreddits from the same account
|
|
264
|
+
* Create post
|
|
265
|
+
* Immediate posts (publishNow: true) include platformPostUrl in the response. Scheduled posts: fetch via GET /v1/posts/{postId} after publish time.
|
|
266
|
+
* content is optional when media is attached, all platforms have customContent, or posting to YouTube only. Text-only posts require content. Stories ignore captions.
|
|
267
|
+
* Platform constraints: YouTube requires video. Instagram/TikTok require media (TikTok cannot mix videos and images). Instagram carousels up to 10 items, Threads up to 10 images. Facebook Stories need single image/video with contentType story. LinkedIn up to 20 images or single PDF. Pinterest single image/video with boardId. Bluesky up to 4 images. Snapchat single image/video.
|
|
376
268
|
*
|
|
377
269
|
*/
|
|
378
270
|
export const createPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreatePostData, ThrowOnError>) => {
|
|
@@ -383,9 +275,8 @@ export const createPost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
383
275
|
};
|
|
384
276
|
|
|
385
277
|
/**
|
|
386
|
-
* Get
|
|
387
|
-
* Fetch a single post by ID. For published posts, this returns
|
|
388
|
-
* for each platform - useful for retrieving post URLs after scheduled posts publish.
|
|
278
|
+
* Get post
|
|
279
|
+
* Fetch a single post by ID. For published posts, this returns platformPostUrl for each platform.
|
|
389
280
|
*
|
|
390
281
|
*/
|
|
391
282
|
export const getPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPostData, ThrowOnError>) => {
|
|
@@ -396,7 +287,7 @@ export const getPost = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
396
287
|
};
|
|
397
288
|
|
|
398
289
|
/**
|
|
399
|
-
* Update
|
|
290
|
+
* Update post
|
|
400
291
|
* Update an existing post. Only draft, scheduled, failed, and partial posts can be edited.
|
|
401
292
|
* Published, publishing, and cancelled posts cannot be modified.
|
|
402
293
|
*
|
|
@@ -409,8 +300,9 @@ export const updatePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
409
300
|
};
|
|
410
301
|
|
|
411
302
|
/**
|
|
412
|
-
* Delete
|
|
413
|
-
* Delete a post.
|
|
303
|
+
* Delete post
|
|
304
|
+
* Delete a draft or scheduled post from Late. Only posts that have not been published can be deleted.
|
|
305
|
+
* To remove a published post from a social media platform, use the [Unpublish endpoint](#tag/Posts/operation/unpublishPost) instead.
|
|
414
306
|
* When deleting a scheduled or draft post that consumed upload quota, the quota will be automatically refunded.
|
|
415
307
|
*
|
|
416
308
|
*/
|
|
@@ -422,7 +314,7 @@ export const deletePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
422
314
|
};
|
|
423
315
|
|
|
424
316
|
/**
|
|
425
|
-
*
|
|
317
|
+
* Bulk upload from CSV
|
|
426
318
|
*/
|
|
427
319
|
export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkUploadPostsData, ThrowOnError>) => {
|
|
428
320
|
return (options?.client ?? client).post<BulkUploadPostsResponse, BulkUploadPostsError, ThrowOnError>({
|
|
@@ -437,7 +329,7 @@ export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: O
|
|
|
437
329
|
};
|
|
438
330
|
|
|
439
331
|
/**
|
|
440
|
-
* Retry
|
|
332
|
+
* Retry failed post
|
|
441
333
|
*/
|
|
442
334
|
export const retryPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RetryPostData, ThrowOnError>) => {
|
|
443
335
|
return (options?.client ?? client).post<RetryPostResponse, RetryPostError, ThrowOnError>({
|
|
@@ -447,21 +339,10 @@ export const retryPost = <ThrowOnError extends boolean = false>(options: Options
|
|
|
447
339
|
};
|
|
448
340
|
|
|
449
341
|
/**
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
* **Supported platforms:** Threads, Facebook, Twitter/X, LinkedIn, YouTube, Pinterest, Reddit, Bluesky, Google Business, Telegram.
|
|
455
|
-
*
|
|
456
|
-
* **Not supported:**
|
|
457
|
-
* - **Instagram:** No deletion API available. Posts must be deleted manually.
|
|
458
|
-
* - **TikTok:** No deletion API available. Posts must be deleted manually.
|
|
459
|
-
* - **Snapchat:** No deletion API available. Posts must be deleted manually.
|
|
460
|
-
*
|
|
461
|
-
* **Platform notes:**
|
|
462
|
-
* - **Threaded posts (Twitter, Threads, Bluesky):** If the post was published as a thread, all items in the thread are deleted (not just the first one). Posts published before this feature was added will only have the first item deleted.
|
|
463
|
-
* - **Telegram:** Messages older than 48 hours may fail to delete (Telegram Bot API limitation).
|
|
464
|
-
* - **YouTube:** This permanently deletes the video from YouTube.
|
|
342
|
+
* Unpublish post
|
|
343
|
+
* Deletes a published post from the specified platform. The post record in Late is kept but its platform status is updated to cancelled.
|
|
344
|
+
* Supported: Threads, Facebook, Twitter/X, LinkedIn, YouTube, Pinterest, Reddit, Bluesky, Google Business, Telegram. Not supported: Instagram, TikTok, Snapchat (must be deleted manually).
|
|
345
|
+
* Threaded posts (Twitter, Threads, Bluesky) delete all items in the thread. Telegram messages older than 48h may fail to delete. YouTube deletion is permanent.
|
|
465
346
|
*
|
|
466
347
|
*/
|
|
467
348
|
export const unpublishPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UnpublishPostData, ThrowOnError>) => {
|
|
@@ -472,7 +353,7 @@ export const unpublishPost = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
472
353
|
};
|
|
473
354
|
|
|
474
355
|
/**
|
|
475
|
-
* List
|
|
356
|
+
* List users
|
|
476
357
|
*/
|
|
477
358
|
export const listUsers = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
478
359
|
return (options?.client ?? client).get<ListUsersResponse, ListUsersError, ThrowOnError>({
|
|
@@ -482,7 +363,7 @@ export const listUsers = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
482
363
|
};
|
|
483
364
|
|
|
484
365
|
/**
|
|
485
|
-
* Get user
|
|
366
|
+
* Get user
|
|
486
367
|
*/
|
|
487
368
|
export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetUserData, ThrowOnError>) => {
|
|
488
369
|
return (options?.client ?? client).get<GetUserResponse, GetUserError, ThrowOnError>({
|
|
@@ -492,9 +373,9 @@ export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
492
373
|
};
|
|
493
374
|
|
|
494
375
|
/**
|
|
495
|
-
* List profiles
|
|
496
|
-
* Returns profiles within the user's plan limit
|
|
497
|
-
* Use
|
|
376
|
+
* List profiles
|
|
377
|
+
* Returns profiles within the user's plan limit, sorted by creation date (oldest first).
|
|
378
|
+
* Use includeOverLimit=true to include profiles that exceed the plan limit (for management/deletion purposes).
|
|
498
379
|
*
|
|
499
380
|
*/
|
|
500
381
|
export const listProfiles = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListProfilesData, ThrowOnError>) => {
|
|
@@ -505,7 +386,7 @@ export const listProfiles = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
505
386
|
};
|
|
506
387
|
|
|
507
388
|
/**
|
|
508
|
-
* Create
|
|
389
|
+
* Create profile
|
|
509
390
|
*/
|
|
510
391
|
export const createProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateProfileData, ThrowOnError>) => {
|
|
511
392
|
return (options?.client ?? client).post<CreateProfileResponse, CreateProfileError, ThrowOnError>({
|
|
@@ -515,7 +396,7 @@ export const createProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
515
396
|
};
|
|
516
397
|
|
|
517
398
|
/**
|
|
518
|
-
* Get
|
|
399
|
+
* Get profile
|
|
519
400
|
*/
|
|
520
401
|
export const getProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetProfileData, ThrowOnError>) => {
|
|
521
402
|
return (options?.client ?? client).get<GetProfileResponse, GetProfileError, ThrowOnError>({
|
|
@@ -525,7 +406,7 @@ export const getProfile = <ThrowOnError extends boolean = false>(options: Option
|
|
|
525
406
|
};
|
|
526
407
|
|
|
527
408
|
/**
|
|
528
|
-
* Update
|
|
409
|
+
* Update profile
|
|
529
410
|
*/
|
|
530
411
|
export const updateProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateProfileData, ThrowOnError>) => {
|
|
531
412
|
return (options?.client ?? client).put<UpdateProfileResponse, UpdateProfileError, ThrowOnError>({
|
|
@@ -535,7 +416,7 @@ export const updateProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
535
416
|
};
|
|
536
417
|
|
|
537
418
|
/**
|
|
538
|
-
* Delete
|
|
419
|
+
* Delete profile
|
|
539
420
|
*/
|
|
540
421
|
export const deleteProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteProfileData, ThrowOnError>) => {
|
|
541
422
|
return (options?.client ?? client).delete<DeleteProfileResponse, DeleteProfileError, ThrowOnError>({
|
|
@@ -545,7 +426,7 @@ export const deleteProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
545
426
|
};
|
|
546
427
|
|
|
547
428
|
/**
|
|
548
|
-
* List
|
|
429
|
+
* List accounts
|
|
549
430
|
* Returns list of connected social accounts.
|
|
550
431
|
* By default, only returns accounts from profiles within the user's plan limit.
|
|
551
432
|
* Follower count data (followersCount, followersLastUpdated) is only included if user has analytics add-on.
|
|
@@ -559,11 +440,9 @@ export const listAccounts = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
559
440
|
};
|
|
560
441
|
|
|
561
442
|
/**
|
|
562
|
-
* Get follower stats
|
|
443
|
+
* Get follower stats
|
|
563
444
|
* Returns follower count history and growth metrics for connected social accounts.
|
|
564
|
-
*
|
|
565
|
-
*
|
|
566
|
-
* **Data Freshness:** Follower counts are automatically refreshed once per day.
|
|
445
|
+
* Requires analytics add-on subscription. Follower counts are refreshed once per day.
|
|
567
446
|
*
|
|
568
447
|
*/
|
|
569
448
|
export const getFollowerStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetFollowerStatsData, ThrowOnError>) => {
|
|
@@ -574,7 +453,7 @@ export const getFollowerStats = <ThrowOnError extends boolean = false>(options?:
|
|
|
574
453
|
};
|
|
575
454
|
|
|
576
455
|
/**
|
|
577
|
-
* Update
|
|
456
|
+
* Update account
|
|
578
457
|
*/
|
|
579
458
|
export const updateAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountData, ThrowOnError>) => {
|
|
580
459
|
return (options?.client ?? client).put<UpdateAccountResponse, UpdateAccountError, ThrowOnError>({
|
|
@@ -584,7 +463,7 @@ export const updateAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
584
463
|
};
|
|
585
464
|
|
|
586
465
|
/**
|
|
587
|
-
* Disconnect
|
|
466
|
+
* Disconnect account
|
|
588
467
|
*/
|
|
589
468
|
export const deleteAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountData, ThrowOnError>) => {
|
|
590
469
|
return (options?.client ?? client).delete<DeleteAccountResponse, DeleteAccountError, ThrowOnError>({
|
|
@@ -594,7 +473,7 @@ export const deleteAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
594
473
|
};
|
|
595
474
|
|
|
596
475
|
/**
|
|
597
|
-
* Check health
|
|
476
|
+
* Check accounts health
|
|
598
477
|
* Returns the health status of all connected social accounts, including token validity,
|
|
599
478
|
* permissions status, and any issues that need attention. Useful for monitoring account
|
|
600
479
|
* connections and identifying accounts that need reconnection.
|
|
@@ -608,7 +487,7 @@ export const getAllAccountsHealth = <ThrowOnError extends boolean = false>(optio
|
|
|
608
487
|
};
|
|
609
488
|
|
|
610
489
|
/**
|
|
611
|
-
* Check health
|
|
490
|
+
* Check account health
|
|
612
491
|
* Returns detailed health information for a specific social account, including token status,
|
|
613
492
|
* granted permissions, missing permissions, and actionable recommendations.
|
|
614
493
|
*
|
|
@@ -621,7 +500,7 @@ export const getAccountHealth = <ThrowOnError extends boolean = false>(options:
|
|
|
621
500
|
};
|
|
622
501
|
|
|
623
502
|
/**
|
|
624
|
-
* List
|
|
503
|
+
* List keys
|
|
625
504
|
*/
|
|
626
505
|
export const listApiKeys = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
627
506
|
return (options?.client ?? client).get<ListApiKeysResponse, ListApiKeysError, ThrowOnError>({
|
|
@@ -631,7 +510,7 @@ export const listApiKeys = <ThrowOnError extends boolean = false>(options?: Opti
|
|
|
631
510
|
};
|
|
632
511
|
|
|
633
512
|
/**
|
|
634
|
-
* Create
|
|
513
|
+
* Create key
|
|
635
514
|
*/
|
|
636
515
|
export const createApiKey = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateApiKeyData, ThrowOnError>) => {
|
|
637
516
|
return (options?.client ?? client).post<CreateApiKeyResponse, CreateApiKeyError, ThrowOnError>({
|
|
@@ -641,7 +520,7 @@ export const createApiKey = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
641
520
|
};
|
|
642
521
|
|
|
643
522
|
/**
|
|
644
|
-
* Delete
|
|
523
|
+
* Delete key
|
|
645
524
|
*/
|
|
646
525
|
export const deleteApiKey = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteApiKeyData, ThrowOnError>) => {
|
|
647
526
|
return (options?.client ?? client).delete<DeleteApiKeyResponse, DeleteApiKeyError, ThrowOnError>({
|
|
@@ -651,7 +530,7 @@ export const deleteApiKey = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
651
530
|
};
|
|
652
531
|
|
|
653
532
|
/**
|
|
654
|
-
* Create
|
|
533
|
+
* Create invite token
|
|
655
534
|
* Generate a secure invite link to grant team members access to your profiles.
|
|
656
535
|
* Invites expire after 7 days and are single-use.
|
|
657
536
|
*
|
|
@@ -664,90 +543,11 @@ export const createInviteToken = <ThrowOnError extends boolean = false>(options:
|
|
|
664
543
|
};
|
|
665
544
|
|
|
666
545
|
/**
|
|
667
|
-
*
|
|
668
|
-
* Initiate an OAuth connection flow for any supported
|
|
669
|
-
*
|
|
670
|
-
*
|
|
671
|
-
*
|
|
672
|
-
*
|
|
673
|
-
* 1. Call this endpoint with your API key and `redirect_url` (optional)
|
|
674
|
-
* 2. Redirect your user to the returned `authUrl`
|
|
675
|
-
* 3. After OAuth, the user is redirected to Late’s hosted page selector at
|
|
676
|
-
* `/connect/facebook/select-page?profileId=X&tempToken=Y&userProfile=Z&redirect_url=YOUR_URL&connect_token=CT`
|
|
677
|
-
* 4. After they pick a page, Late saves the connection and finally redirects to your `redirect_url` (if provided)
|
|
678
|
-
*
|
|
679
|
-
* **Headless/Whitelabel Mode (Facebook, LinkedIn, Pinterest & Google Business Profile):**
|
|
680
|
-
* Build your own fully branded selection UI while Late handles OAuth:
|
|
681
|
-
*
|
|
682
|
-
* **Facebook:**
|
|
683
|
-
* 1. Call this endpoint with your API key and add `&headless=true`, e.g.
|
|
684
|
-
* `GET /v1/connect/facebook?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
685
|
-
* 2. Redirect your user to the returned `authUrl`
|
|
686
|
-
* 3. After OAuth, the user is redirected directly to **your** `redirect_url` with:
|
|
687
|
-
* - `profileId` – your Late profile ID
|
|
688
|
-
* - `tempToken` – temporary Facebook access token
|
|
689
|
-
* - `userProfile` – URL‑encoded JSON user profile
|
|
690
|
-
* - `connect_token` – short‑lived connect token (for API auth)
|
|
691
|
-
* - `platform=facebook`
|
|
692
|
-
* - `step=select_page`
|
|
693
|
-
* 4. Use `tempToken`, `userProfile`, and the `X-Connect-Token` header with:
|
|
694
|
-
* - `GET /v1/connect/facebook/select-page` to fetch pages
|
|
695
|
-
* - `POST /v1/connect/facebook/select-page` to save the selected page
|
|
696
|
-
* 5. In this mode, users never see Late's hosted page selector – only your UI.
|
|
697
|
-
*
|
|
698
|
-
* **LinkedIn:**
|
|
699
|
-
* 1. Call this endpoint with `&headless=true`, e.g.
|
|
700
|
-
* `GET /v1/connect/linkedin?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
701
|
-
* 2. Redirect your user to the returned `authUrl`
|
|
702
|
-
* 3. After OAuth, the user is redirected directly to **your** `redirect_url` with:
|
|
703
|
-
* - `profileId` – your Late profile ID
|
|
704
|
-
* - `pendingDataToken` – token to fetch OAuth data via API (see step 4)
|
|
705
|
-
* - `connect_token` – short-lived connect token (for API auth)
|
|
706
|
-
* - `platform=linkedin`
|
|
707
|
-
* - `step=select_organization`
|
|
708
|
-
* 4. Call `GET /v1/connect/pending-data?token=PENDING_DATA_TOKEN` to fetch the OAuth data:
|
|
709
|
-
* - `tempToken` – temporary LinkedIn access token
|
|
710
|
-
* - `userProfile` – JSON object with `id`, `username`, `displayName`, `profilePicture`
|
|
711
|
-
* - `organizations` – JSON array with `id`, `urn`, `name`, `vanityName` for each org
|
|
712
|
-
* - `refreshToken` / `expiresIn` – token metadata
|
|
713
|
-
* This endpoint is one-time use and data expires after 10 minutes.
|
|
714
|
-
* 5. **Optional:** To fetch full organization details (logos, website, industry, description), call `GET /v1/connect/linkedin/organizations?tempToken=X&orgIds=id1,id2,...`
|
|
715
|
-
* 6. Call `POST /v1/connect/linkedin/select-organization` with the `X-Connect-Token` header to save the selection.
|
|
716
|
-
* 7. In this mode, users never see Late's hosted organization selector – only your UI.
|
|
717
|
-
* 8. Note: If the user has no organization admin access, `step=select_organization` will NOT be present,
|
|
718
|
-
* and the account will be connected directly as a personal account.
|
|
719
|
-
*
|
|
720
|
-
* **Pinterest:**
|
|
721
|
-
* 1. Call this endpoint with `&headless=true`, e.g.
|
|
722
|
-
* `GET /v1/connect/pinterest?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
723
|
-
* 2. Redirect your user to the returned `authUrl`
|
|
724
|
-
* 3. After OAuth, the user is redirected directly to **your** `redirect_url` with:
|
|
725
|
-
* - `profileId` – your Late profile ID
|
|
726
|
-
* - `tempToken` – temporary Pinterest access token
|
|
727
|
-
* - `userProfile` – URL‑encoded JSON user profile
|
|
728
|
-
* - `connect_token` – short‑lived connect token (for API auth)
|
|
729
|
-
* - `platform=pinterest`
|
|
730
|
-
* - `step=select_board`
|
|
731
|
-
* 4. Use `tempToken`, `userProfile`, and the `X-Connect-Token` header with:
|
|
732
|
-
* - `GET /v1/connect/pinterest/select-board` to fetch boards
|
|
733
|
-
* - `POST /v1/connect/pinterest/select-board` to save the selected board
|
|
734
|
-
* 5. In this mode, users never see Late's hosted board selector – only your UI.
|
|
735
|
-
*
|
|
736
|
-
* **Google Business Profile:**
|
|
737
|
-
* 1. Call this endpoint with `&headless=true`, e.g.
|
|
738
|
-
* `GET /v1/connect/googlebusiness?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
739
|
-
* 2. Redirect your user to the returned `authUrl`
|
|
740
|
-
* 3. After OAuth, the user is redirected directly to **your** `redirect_url` with:
|
|
741
|
-
* - `profileId` – your Late profile ID
|
|
742
|
-
* - `tempToken` – temporary Google access token
|
|
743
|
-
* - `userProfile` – URL‑encoded JSON user profile (includes refresh token info)
|
|
744
|
-
* - `connect_token` – short‑lived connect token (for API auth)
|
|
745
|
-
* - `platform=googlebusiness`
|
|
746
|
-
* - `step=select_location`
|
|
747
|
-
* 4. Use `tempToken`, `userProfile`, and the `X-Connect-Token` header with:
|
|
748
|
-
* - `GET /v1/connect/googlebusiness/locations` to fetch business locations
|
|
749
|
-
* - `POST /v1/connect/googlebusiness/select-location` to save the selected location
|
|
750
|
-
* 5. In this mode, users never see Late's hosted location selector – only your UI.
|
|
546
|
+
* Get OAuth connect URL
|
|
547
|
+
* Initiate an OAuth connection flow for any supported platform.
|
|
548
|
+
* Standard flow: call this endpoint, redirect user to the returned authUrl, Late hosts the selection UI, then redirects to your redirect_url.
|
|
549
|
+
* Headless mode (Facebook, LinkedIn, Pinterest, Google Business, Snapchat): add headless=true to this endpoint. After OAuth, the user is redirected to your redirect_url with OAuth data (profileId, tempToken, userProfile, connect_token, platform, step). Use the platform-specific selection endpoints to fetch options and save the selection.
|
|
550
|
+
* LinkedIn uses pendingDataToken instead of tempToken; call GET /v1/connect/pending-data?token=TOKEN to retrieve OAuth data (one-time use, expires in 10 minutes).
|
|
751
551
|
*
|
|
752
552
|
*/
|
|
753
553
|
export const getConnectUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetConnectUrlData, ThrowOnError>) => {
|
|
@@ -758,7 +558,7 @@ export const getConnectUrl = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
758
558
|
};
|
|
759
559
|
|
|
760
560
|
/**
|
|
761
|
-
* Complete OAuth
|
|
561
|
+
* Complete OAuth callback
|
|
762
562
|
*/
|
|
763
563
|
export const handleOAuthCallback = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleOAuthCallbackData, ThrowOnError>) => {
|
|
764
564
|
return (options?.client ?? client).post<HandleOAuthCallbackResponse, HandleOAuthCallbackError, ThrowOnError>({
|
|
@@ -768,19 +568,8 @@ export const handleOAuthCallback = <ThrowOnError extends boolean = false>(option
|
|
|
768
568
|
};
|
|
769
569
|
|
|
770
570
|
/**
|
|
771
|
-
* List Facebook
|
|
772
|
-
*
|
|
773
|
-
*
|
|
774
|
-
* After initiating Facebook OAuth via `/v1/connect/facebook`, you'll be redirected to
|
|
775
|
-
* `/connect/facebook/select-page` with query params including `tempToken` and `userProfile`.
|
|
776
|
-
*
|
|
777
|
-
* For a **headless/whitelabeled flow**, extract these params from the URL and call this
|
|
778
|
-
* endpoint to retrieve the list of Facebook Pages the user can manage. Then build your
|
|
779
|
-
* own UI to let users select a page.
|
|
780
|
-
*
|
|
781
|
-
* **Note:** Use the `X-Connect-Token` header if you initiated the connection via API key
|
|
782
|
-
* (rather than a browser session).
|
|
783
|
-
*
|
|
571
|
+
* List Facebook pages
|
|
572
|
+
* Returns the list of Facebook Pages the user can manage after OAuth. Extract tempToken and userProfile from the OAuth redirect params and pass them here. Use the X-Connect-Token header if connecting via API key.
|
|
784
573
|
*/
|
|
785
574
|
export const listFacebookPages = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListFacebookPagesData, ThrowOnError>) => {
|
|
786
575
|
return (options?.client ?? client).get<ListFacebookPagesResponse, ListFacebookPagesError, ThrowOnError>({
|
|
@@ -790,16 +579,9 @@ export const listFacebookPages = <ThrowOnError extends boolean = false>(options:
|
|
|
790
579
|
};
|
|
791
580
|
|
|
792
581
|
/**
|
|
793
|
-
* Select
|
|
794
|
-
*
|
|
795
|
-
*
|
|
796
|
-
* After displaying your custom UI with the list of pages from the GET endpoint, call this
|
|
797
|
-
* endpoint to finalize the connection with the user's selected page.
|
|
798
|
-
*
|
|
799
|
-
* The `userProfile` should be the decoded JSON object from the `userProfile` query param
|
|
800
|
-
* in the OAuth callback redirect URL.
|
|
801
|
-
*
|
|
802
|
-
* **Note:** Use the `X-Connect-Token` header if you initiated the connection via API key.
|
|
582
|
+
* Select Facebook page
|
|
583
|
+
* Complete the headless flow. After displaying your custom UI with the list of pages from the GET endpoint, call this endpoint to finalize the connection with the user's selected page.
|
|
584
|
+
* The userProfile should be the decoded JSON object from the userProfile query param in the OAuth callback redirect URL. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
803
585
|
*
|
|
804
586
|
*/
|
|
805
587
|
export const selectFacebookPage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectFacebookPageData, ThrowOnError>) => {
|
|
@@ -810,18 +592,9 @@ export const selectFacebookPage = <ThrowOnError extends boolean = false>(options
|
|
|
810
592
|
};
|
|
811
593
|
|
|
812
594
|
/**
|
|
813
|
-
* List
|
|
814
|
-
*
|
|
815
|
-
*
|
|
816
|
-
* After initiating Google Business OAuth via `/v1/connect/googlebusiness?headless=true`, you'll be redirected
|
|
817
|
-
* to your `redirect_url` with query params including `tempToken` and `userProfile`.
|
|
818
|
-
*
|
|
819
|
-
* For a **headless/whitelabeled flow**, extract these params from the URL and call this
|
|
820
|
-
* endpoint to retrieve the list of Google Business locations the user can manage. Then build your
|
|
821
|
-
* own UI to let users select a location.
|
|
822
|
-
*
|
|
823
|
-
* **Note:** Use the `X-Connect-Token` header if you initiated the connection via API key
|
|
824
|
-
* (rather than a browser session).
|
|
595
|
+
* List GBP locations
|
|
596
|
+
* For headless/whitelabel flows. After Google Business OAuth with headless=true, you'll be redirected to your redirect_url with tempToken and userProfile params.
|
|
597
|
+
* Call this endpoint to retrieve the list of locations the user can manage, then build your own UI to let them select one. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
825
598
|
*
|
|
826
599
|
*/
|
|
827
600
|
export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListGoogleBusinessLocationsData, ThrowOnError>) => {
|
|
@@ -832,16 +605,9 @@ export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false
|
|
|
832
605
|
};
|
|
833
606
|
|
|
834
607
|
/**
|
|
835
|
-
* Select
|
|
836
|
-
*
|
|
837
|
-
*
|
|
838
|
-
* After displaying your custom UI with the list of locations from the GET `/v1/connect/googlebusiness/locations`
|
|
839
|
-
* endpoint, call this endpoint to finalize the connection with the user's selected location.
|
|
840
|
-
*
|
|
841
|
-
* The `userProfile` should be the decoded JSON object from the `userProfile` query param
|
|
842
|
-
* in the OAuth callback redirect URL. It contains important token information (including refresh token).
|
|
843
|
-
*
|
|
844
|
-
* **Note:** Use the `X-Connect-Token` header if you initiated the connection via API key.
|
|
608
|
+
* Select GBP location
|
|
609
|
+
* Complete the headless flow. After displaying your custom UI with the list of locations from the GET /v1/connect/googlebusiness/locations endpoint, call this endpoint to finalize the connection with the user's selected location.
|
|
610
|
+
* The userProfile should be the decoded JSON object from the userProfile query param in the OAuth callback redirect URL. It contains important token information including the refresh token. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
845
611
|
*
|
|
846
612
|
*/
|
|
847
613
|
export const selectGoogleBusinessLocation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectGoogleBusinessLocationData, ThrowOnError>) => {
|
|
@@ -852,17 +618,9 @@ export const selectGoogleBusinessLocation = <ThrowOnError extends boolean = fals
|
|
|
852
618
|
};
|
|
853
619
|
|
|
854
620
|
/**
|
|
855
|
-
* Get
|
|
856
|
-
* Fetches reviews for a connected Google Business Profile account.
|
|
857
|
-
*
|
|
858
|
-
* Returns all reviews for the business location, including:
|
|
859
|
-
* - Reviewer information (name, profile photo)
|
|
860
|
-
* - Star rating (1-5)
|
|
861
|
-
* - Review comment/text
|
|
862
|
-
* - Business owner's reply (if any)
|
|
863
|
-
* - Review timestamps
|
|
864
|
-
*
|
|
865
|
-
* Use pagination via `nextPageToken` to fetch all reviews for locations with many reviews.
|
|
621
|
+
* Get reviews
|
|
622
|
+
* Fetches reviews for a connected Google Business Profile account. Returns all reviews including reviewer info, star rating, comment text, owner reply, and timestamps.
|
|
623
|
+
* Use pagination via nextPageToken for locations with many reviews.
|
|
866
624
|
*
|
|
867
625
|
*/
|
|
868
626
|
export const getGoogleBusinessReviews = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessReviewsData, ThrowOnError>) => {
|
|
@@ -873,15 +631,8 @@ export const getGoogleBusinessReviews = <ThrowOnError extends boolean = false>(o
|
|
|
873
631
|
};
|
|
874
632
|
|
|
875
633
|
/**
|
|
876
|
-
* Get
|
|
877
|
-
* Fetches food menus for a connected Google Business Profile location.
|
|
878
|
-
*
|
|
879
|
-
* Returns the full menu structure including:
|
|
880
|
-
* - Menu names and descriptions
|
|
881
|
-
* - Sections (e.g. Appetizers, Entrees, Drinks)
|
|
882
|
-
* - Items with labels, pricing, dietary info, and allergens
|
|
883
|
-
* - Item options/variants
|
|
884
|
-
*
|
|
634
|
+
* Get food menus
|
|
635
|
+
* Fetches food menus for a connected Google Business Profile location. Returns the full menu structure including sections, items with pricing, dietary info, allergens, and variants.
|
|
885
636
|
* Only available for locations with food menu support (restaurants, cafes, etc.).
|
|
886
637
|
*
|
|
887
638
|
*/
|
|
@@ -893,10 +644,10 @@ export const getGoogleBusinessFoodMenus = <ThrowOnError extends boolean = false>
|
|
|
893
644
|
};
|
|
894
645
|
|
|
895
646
|
/**
|
|
896
|
-
* Update
|
|
647
|
+
* Update food menus
|
|
897
648
|
* Updates the food menus for a connected Google Business Profile location.
|
|
898
649
|
*
|
|
899
|
-
* Send the full menus array. Use
|
|
650
|
+
* Send the full menus array. Use updateMask for partial updates (e.g. "menus" to only update the menus field).
|
|
900
651
|
*
|
|
901
652
|
* Each menu can contain sections, and each section can contain items with pricing, dietary restrictions, allergens, and more.
|
|
902
653
|
*
|
|
@@ -909,11 +660,11 @@ export const updateGoogleBusinessFoodMenus = <ThrowOnError extends boolean = fal
|
|
|
909
660
|
};
|
|
910
661
|
|
|
911
662
|
/**
|
|
912
|
-
* Get
|
|
663
|
+
* Get location details
|
|
913
664
|
* Fetches detailed location information including opening hours, special hours,
|
|
914
665
|
* business description, phone numbers, website, categories, and more.
|
|
915
666
|
*
|
|
916
|
-
* Use the
|
|
667
|
+
* Use the readMask query parameter to request specific fields.
|
|
917
668
|
*
|
|
918
669
|
*/
|
|
919
670
|
export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessLocationDetailsData, ThrowOnError>) => {
|
|
@@ -924,18 +675,9 @@ export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean =
|
|
|
924
675
|
};
|
|
925
676
|
|
|
926
677
|
/**
|
|
927
|
-
* Update
|
|
678
|
+
* Update location details
|
|
928
679
|
* Updates location details such as opening hours, special hours, business description, phone, and website.
|
|
929
|
-
*
|
|
930
|
-
* The `updateMask` field is required and specifies which fields to update.
|
|
931
|
-
*
|
|
932
|
-
* Common update masks:
|
|
933
|
-
* - `regularHours` - Update opening hours
|
|
934
|
-
* - `specialHours` - Update holiday/special hours
|
|
935
|
-
* - `profile.description` - Update business description
|
|
936
|
-
* - `websiteUri` - Update website URL
|
|
937
|
-
* - `phoneNumbers` - Update phone numbers
|
|
938
|
-
* - `regularHours,specialHours` - Update both at once
|
|
680
|
+
* The updateMask field is required and specifies which fields to update. Common masks: regularHours, specialHours, profile.description, websiteUri, phoneNumbers. Combine with commas (e.g. regularHours,specialHours).
|
|
939
681
|
*
|
|
940
682
|
*/
|
|
941
683
|
export const updateGoogleBusinessLocationDetails = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGoogleBusinessLocationDetailsData, ThrowOnError>) => {
|
|
@@ -946,7 +688,7 @@ export const updateGoogleBusinessLocationDetails = <ThrowOnError extends boolean
|
|
|
946
688
|
};
|
|
947
689
|
|
|
948
690
|
/**
|
|
949
|
-
* List
|
|
691
|
+
* List media
|
|
950
692
|
* Lists media items (photos) for a Google Business Profile location.
|
|
951
693
|
* Returns photo URLs, descriptions, categories, and metadata.
|
|
952
694
|
*
|
|
@@ -959,20 +701,10 @@ export const listGoogleBusinessMedia = <ThrowOnError extends boolean = false>(op
|
|
|
959
701
|
};
|
|
960
702
|
|
|
961
703
|
/**
|
|
962
|
-
* Upload
|
|
704
|
+
* Upload photo
|
|
963
705
|
* Creates a media item (photo) for a location from a publicly accessible URL.
|
|
964
706
|
*
|
|
965
|
-
* Categories determine where the photo appears:
|
|
966
|
-
* - `COVER` - Cover photo
|
|
967
|
-
* - `PROFILE` - Profile photo
|
|
968
|
-
* - `LOGO` - Business logo
|
|
969
|
-
* - `EXTERIOR` - Exterior shots
|
|
970
|
-
* - `INTERIOR` - Interior shots
|
|
971
|
-
* - `FOOD_AND_DRINK` - Food and drink photos
|
|
972
|
-
* - `MENU` - Menu photos
|
|
973
|
-
* - `PRODUCT` - Product photos
|
|
974
|
-
* - `TEAMS` - Team/staff photos
|
|
975
|
-
* - `ADDITIONAL` - Other photos
|
|
707
|
+
* Categories determine where the photo appears: COVER, PROFILE, LOGO, EXTERIOR, INTERIOR, FOOD_AND_DRINK, MENU, PRODUCT, TEAMS, ADDITIONAL.
|
|
976
708
|
*
|
|
977
709
|
*/
|
|
978
710
|
export const createGoogleBusinessMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateGoogleBusinessMediaData, ThrowOnError>) => {
|
|
@@ -983,7 +715,7 @@ export const createGoogleBusinessMedia = <ThrowOnError extends boolean = false>(
|
|
|
983
715
|
};
|
|
984
716
|
|
|
985
717
|
/**
|
|
986
|
-
* Delete
|
|
718
|
+
* Delete photo
|
|
987
719
|
*/
|
|
988
720
|
export const deleteGoogleBusinessMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteGoogleBusinessMediaData, ThrowOnError>) => {
|
|
989
721
|
return (options?.client ?? client).delete<DeleteGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaError, ThrowOnError>({
|
|
@@ -993,16 +725,8 @@ export const deleteGoogleBusinessMedia = <ThrowOnError extends boolean = false>(
|
|
|
993
725
|
};
|
|
994
726
|
|
|
995
727
|
/**
|
|
996
|
-
* Get
|
|
997
|
-
* Fetches location attributes such as amenities, services, and accessibility features.
|
|
998
|
-
*
|
|
999
|
-
* Common attributes for restaurants include:
|
|
1000
|
-
* - Dining options: has_dine_in, has_takeout, has_delivery
|
|
1001
|
-
* - Amenities: has_outdoor_seating, has_wifi, has_parking
|
|
1002
|
-
* - Accessibility: has_wheelchair_accessible_entrance
|
|
1003
|
-
* - Payments: pay_credit_card_types_accepted
|
|
1004
|
-
*
|
|
1005
|
-
* Available attributes vary by business category.
|
|
728
|
+
* Get attributes
|
|
729
|
+
* Fetches location attributes such as amenities, services, and accessibility features. Common attributes include dining options (has_dine_in, has_takeout, has_delivery), amenities (has_outdoor_seating, has_wifi), accessibility, and payment types. Available attributes vary by business category.
|
|
1006
730
|
*
|
|
1007
731
|
*/
|
|
1008
732
|
export const getGoogleBusinessAttributes = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGoogleBusinessAttributesData, ThrowOnError>) => {
|
|
@@ -1013,10 +737,10 @@ export const getGoogleBusinessAttributes = <ThrowOnError extends boolean = false
|
|
|
1013
737
|
};
|
|
1014
738
|
|
|
1015
739
|
/**
|
|
1016
|
-
* Update
|
|
740
|
+
* Update attributes
|
|
1017
741
|
* Updates location attributes (amenities, services, etc.).
|
|
1018
742
|
*
|
|
1019
|
-
* The
|
|
743
|
+
* The attributeMask specifies which attributes to update (comma-separated).
|
|
1020
744
|
*
|
|
1021
745
|
*/
|
|
1022
746
|
export const updateGoogleBusinessAttributes = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGoogleBusinessAttributesData, ThrowOnError>) => {
|
|
@@ -1027,7 +751,7 @@ export const updateGoogleBusinessAttributes = <ThrowOnError extends boolean = fa
|
|
|
1027
751
|
};
|
|
1028
752
|
|
|
1029
753
|
/**
|
|
1030
|
-
* List
|
|
754
|
+
* List action links
|
|
1031
755
|
* Lists place action links for a Google Business Profile location.
|
|
1032
756
|
*
|
|
1033
757
|
* Place actions are the booking, ordering, and reservation buttons that appear on your listing.
|
|
@@ -1041,17 +765,10 @@ export const listGoogleBusinessPlaceActions = <ThrowOnError extends boolean = fa
|
|
|
1041
765
|
};
|
|
1042
766
|
|
|
1043
767
|
/**
|
|
1044
|
-
* Create
|
|
768
|
+
* Create action link
|
|
1045
769
|
* Creates a place action link for a location.
|
|
1046
770
|
*
|
|
1047
|
-
* Available action types:
|
|
1048
|
-
* - `APPOINTMENT` - Booking an appointment
|
|
1049
|
-
* - `ONLINE_APPOINTMENT` - Booking an online appointment
|
|
1050
|
-
* - `DINING_RESERVATION` - Making a dining reservation (OpenTable, Resy, etc.)
|
|
1051
|
-
* - `FOOD_ORDERING` - Ordering food for delivery and/or takeout (DoorDash, Uber Eats, etc.)
|
|
1052
|
-
* - `FOOD_DELIVERY` - Ordering food for delivery only
|
|
1053
|
-
* - `FOOD_TAKEOUT` - Ordering food for takeout only
|
|
1054
|
-
* - `SHOP_ONLINE` - Shopping with delivery and/or pickup
|
|
771
|
+
* Available action types: APPOINTMENT, ONLINE_APPOINTMENT, DINING_RESERVATION, FOOD_ORDERING, FOOD_DELIVERY, FOOD_TAKEOUT, SHOP_ONLINE.
|
|
1055
772
|
*
|
|
1056
773
|
*/
|
|
1057
774
|
export const createGoogleBusinessPlaceAction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateGoogleBusinessPlaceActionData, ThrowOnError>) => {
|
|
@@ -1062,7 +779,7 @@ export const createGoogleBusinessPlaceAction = <ThrowOnError extends boolean = f
|
|
|
1062
779
|
};
|
|
1063
780
|
|
|
1064
781
|
/**
|
|
1065
|
-
* Delete
|
|
782
|
+
* Delete action link
|
|
1066
783
|
*/
|
|
1067
784
|
export const deleteGoogleBusinessPlaceAction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteGoogleBusinessPlaceActionData, ThrowOnError>) => {
|
|
1068
785
|
return (options?.client ?? client).delete<DeleteGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionError, ThrowOnError>({
|
|
@@ -1072,19 +789,9 @@ export const deleteGoogleBusinessPlaceAction = <ThrowOnError extends boolean = f
|
|
|
1072
789
|
};
|
|
1073
790
|
|
|
1074
791
|
/**
|
|
1075
|
-
*
|
|
1076
|
-
*
|
|
1077
|
-
*
|
|
1078
|
-
* In headless mode, platforms like LinkedIn store OAuth selection data (organizations, pages, etc.)
|
|
1079
|
-
* in the database instead of passing it via URL parameters. This prevents URI_TOO_LONG errors
|
|
1080
|
-
* when users have many organizations/pages to select from.
|
|
1081
|
-
*
|
|
1082
|
-
* After OAuth redirect, use the `pendingDataToken` from the URL to fetch the stored data.
|
|
1083
|
-
*
|
|
1084
|
-
* **Important:**
|
|
1085
|
-
* - This endpoint is one-time use: data is deleted after being fetched
|
|
1086
|
-
* - Data expires automatically after 10 minutes if not fetched
|
|
1087
|
-
* - No authentication required, just the token from the redirect URL
|
|
792
|
+
* Get pending OAuth data
|
|
793
|
+
* Fetch pending OAuth data for headless mode. Platforms like LinkedIn store OAuth selection data (organizations, pages, etc.) server-side to prevent URI_TOO_LONG errors.
|
|
794
|
+
* After OAuth redirect, use the pendingDataToken from the URL to fetch the stored data. This endpoint is one-time use (data is deleted after fetch) and expires after 10 minutes. No authentication required, just the token.
|
|
1088
795
|
*
|
|
1089
796
|
*/
|
|
1090
797
|
export const getPendingOAuthData = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPendingOAuthDataData, ThrowOnError>) => {
|
|
@@ -1095,17 +802,9 @@ export const getPendingOAuthData = <ThrowOnError extends boolean = false>(option
|
|
|
1095
802
|
};
|
|
1096
803
|
|
|
1097
804
|
/**
|
|
1098
|
-
*
|
|
1099
|
-
*
|
|
1100
|
-
*
|
|
1101
|
-
* After LinkedIn OAuth in headless mode, the redirect URL contains organization data with only
|
|
1102
|
-
* `id`, `urn`, and `name` fields (additional details are excluded to prevent URL length issues with many organizations).
|
|
1103
|
-
*
|
|
1104
|
-
* Use this endpoint to fetch full organization details including logos, vanity names, websites, and more
|
|
1105
|
-
* if you want to display them in your custom selection UI.
|
|
1106
|
-
*
|
|
1107
|
-
* **Note:** This endpoint requires no authentication - just the `tempToken` from the OAuth redirect.
|
|
1108
|
-
* Details are fetched directly from LinkedIn's API in parallel for fast response times.
|
|
805
|
+
* List LinkedIn orgs
|
|
806
|
+
* Fetch full organization details for custom UI. After LinkedIn OAuth in headless mode, the redirect URL only contains id, urn, and name fields.
|
|
807
|
+
* Use this endpoint to fetch full details including logos, vanity names, websites, and more. No authentication required, just the tempToken from the OAuth redirect.
|
|
1109
808
|
*
|
|
1110
809
|
*/
|
|
1111
810
|
export const listLinkedInOrganizations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListLinkedInOrganizationsData, ThrowOnError>) => {
|
|
@@ -1116,20 +815,9 @@ export const listLinkedInOrganizations = <ThrowOnError extends boolean = false>(
|
|
|
1116
815
|
};
|
|
1117
816
|
|
|
1118
817
|
/**
|
|
1119
|
-
* Select LinkedIn
|
|
1120
|
-
*
|
|
1121
|
-
*
|
|
1122
|
-
* After OAuth, the user is redirected with `organizations` in the URL params (if they have org admin access).
|
|
1123
|
-
* The organizations array contains `id`, `urn`, and `name` fields. Use this data to build your UI,
|
|
1124
|
-
* then call this endpoint to save the selection.
|
|
1125
|
-
*
|
|
1126
|
-
* Set `accountType` to `personal` to connect as the user's personal LinkedIn profile, or
|
|
1127
|
-
* `organization` to connect as a company page (requires `selectedOrganization` object).
|
|
1128
|
-
*
|
|
1129
|
-
* **Personal Profile:** To connect a personal LinkedIn account, set `accountType` to `"personal"`
|
|
1130
|
-
* and **omit** the `selectedOrganization` field entirely. This is the simplest flow.
|
|
1131
|
-
*
|
|
1132
|
-
* **Headless Mode:** Use the `X-Connect-Token` header if you initiated the connection via API key.
|
|
818
|
+
* Select LinkedIn org
|
|
819
|
+
* Complete the LinkedIn connection flow. After OAuth, the user is redirected with organizations in the URL params (if they have org admin access). Use this data to build your UI, then call this endpoint to save the selection.
|
|
820
|
+
* Set accountType to "personal" for a personal profile (omit selectedOrganization), or "organization" to connect as a company page. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
1133
821
|
*
|
|
1134
822
|
*/
|
|
1135
823
|
export const selectLinkedInOrganization = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectLinkedInOrganizationData, ThrowOnError>) => {
|
|
@@ -1140,17 +828,9 @@ export const selectLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
1140
828
|
};
|
|
1141
829
|
|
|
1142
830
|
/**
|
|
1143
|
-
* List Pinterest
|
|
1144
|
-
*
|
|
1145
|
-
*
|
|
1146
|
-
* After initiating Pinterest OAuth via `/v1/connect/pinterest` with `headless=true`, you'll be redirected to
|
|
1147
|
-
* your `redirect_url` with query params including `tempToken` and `userProfile`.
|
|
1148
|
-
*
|
|
1149
|
-
* If you want to build your own fully-branded board selector (instead of Late's hosted UI), call this
|
|
1150
|
-
* endpoint to retrieve the list of Pinterest Boards the user can post to. Then build your
|
|
1151
|
-
* UI and call `POST /v1/connect/pinterest/select-board` to save the selection.
|
|
1152
|
-
*
|
|
1153
|
-
* **Authentication:** Use `X-Connect-Token` header with the `connect_token` from the redirect URL.
|
|
831
|
+
* List Pinterest boards
|
|
832
|
+
* Retrieve Pinterest boards for headless selection UI. After Pinterest OAuth with headless=true, you'll be redirected to your redirect_url with tempToken and userProfile params.
|
|
833
|
+
* Call this endpoint to retrieve the list of boards the user can post to, then build your UI and call POST /v1/connect/pinterest/select-board to save the selection. Use X-Connect-Token header with the connect_token from the redirect URL.
|
|
1154
834
|
*
|
|
1155
835
|
*/
|
|
1156
836
|
export const listPinterestBoardsForSelection = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListPinterestBoardsForSelectionData, ThrowOnError>) => {
|
|
@@ -1161,12 +841,8 @@ export const listPinterestBoardsForSelection = <ThrowOnError extends boolean = f
|
|
|
1161
841
|
};
|
|
1162
842
|
|
|
1163
843
|
/**
|
|
1164
|
-
* Select
|
|
1165
|
-
*
|
|
1166
|
-
*
|
|
1167
|
-
* After OAuth, use this endpoint to save the selected board and complete the Pinterest account connection.
|
|
1168
|
-
*
|
|
1169
|
-
* **Headless Mode:** Use the `X-Connect-Token` header if you initiated the connection via API key.
|
|
844
|
+
* Select Pinterest board
|
|
845
|
+
* Complete the Pinterest connection flow. After OAuth, use this endpoint to save the selected board and complete the account connection. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
1170
846
|
*
|
|
1171
847
|
*/
|
|
1172
848
|
export const selectPinterestBoard = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectPinterestBoardData, ThrowOnError>) => {
|
|
@@ -1177,17 +853,9 @@ export const selectPinterestBoard = <ThrowOnError extends boolean = false>(optio
|
|
|
1177
853
|
};
|
|
1178
854
|
|
|
1179
855
|
/**
|
|
1180
|
-
* List Snapchat
|
|
1181
|
-
*
|
|
1182
|
-
*
|
|
1183
|
-
* After initiating Snapchat OAuth via `/v1/connect/snapchat?headless=true`, you'll be redirected to
|
|
1184
|
-
* your `redirect_url` with query params including `tempToken`, `userProfile`, and `publicProfiles`.
|
|
1185
|
-
*
|
|
1186
|
-
* If you want to build your own fully-branded profile selector (instead of Late's hosted UI), call this
|
|
1187
|
-
* endpoint to retrieve the list of Snapchat Public Profiles the user can post to. Then build your
|
|
1188
|
-
* UI and call `POST /v1/connect/snapchat/select-profile` to save the selection.
|
|
1189
|
-
*
|
|
1190
|
-
* **Authentication:** Use `X-Connect-Token` header with the `connect_token` from the redirect URL.
|
|
856
|
+
* List Snapchat profiles
|
|
857
|
+
* For headless/whitelabel flows. After Snapchat OAuth with headless=true, you'll be redirected to your redirect_url with tempToken, userProfile, and publicProfiles params.
|
|
858
|
+
* Call this endpoint to retrieve the list of Snapchat Public Profiles the user can post to, then build your UI and call POST /v1/connect/snapchat/select-profile to save the selection. Use X-Connect-Token header with the connect_token from the redirect URL.
|
|
1191
859
|
*
|
|
1192
860
|
*/
|
|
1193
861
|
export const listSnapchatProfiles = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListSnapchatProfilesData, ThrowOnError>) => {
|
|
@@ -1198,24 +866,9 @@ export const listSnapchatProfiles = <ThrowOnError extends boolean = false>(optio
|
|
|
1198
866
|
};
|
|
1199
867
|
|
|
1200
868
|
/**
|
|
1201
|
-
* Select
|
|
1202
|
-
*
|
|
1203
|
-
*
|
|
1204
|
-
* After OAuth, use this endpoint to save the selected Public Profile and complete the Snapchat account connection.
|
|
1205
|
-
* Snapchat requires a Public Profile to publish Stories, Saved Stories, and Spotlight content.
|
|
1206
|
-
*
|
|
1207
|
-
* **Headless Mode:** Use the `X-Connect-Token` header if you initiated the connection via API key.
|
|
1208
|
-
*
|
|
1209
|
-
* After initiating Snapchat OAuth via `/v1/connect/snapchat?headless=true`, you'll be redirected to
|
|
1210
|
-
* your `redirect_url` with query params including:
|
|
1211
|
-
* - `tempToken` - Temporary access token
|
|
1212
|
-
* - `userProfile` - URL-encoded JSON with user info
|
|
1213
|
-
* - `publicProfiles` - URL-encoded JSON array of available public profiles
|
|
1214
|
-
* - `connect_token` - Short-lived token for API authentication
|
|
1215
|
-
* - `platform=snapchat`
|
|
1216
|
-
* - `step=select_public_profile`
|
|
1217
|
-
*
|
|
1218
|
-
* Parse `publicProfiles` to build your custom selector UI, then call this endpoint with the selected profile.
|
|
869
|
+
* Select Snapchat profile
|
|
870
|
+
* Complete the Snapchat connection flow. Save the selected Public Profile and complete the account connection. Snapchat requires a Public Profile to publish Stories, Saved Stories, and Spotlight content.
|
|
871
|
+
* After Snapchat OAuth with headless=true, you'll be redirected with tempToken, userProfile, publicProfiles, connect_token, platform=snapchat, and step=select_public_profile in the URL. Parse publicProfiles to build your custom selector UI, then call this endpoint with the selected profile. Use the X-Connect-Token header if you initiated the connection via API key.
|
|
1219
872
|
*
|
|
1220
873
|
*/
|
|
1221
874
|
export const selectSnapchatProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SelectSnapchatProfileData, ThrowOnError>) => {
|
|
@@ -1226,10 +879,9 @@ export const selectSnapchatProfile = <ThrowOnError extends boolean = false>(opti
|
|
|
1226
879
|
};
|
|
1227
880
|
|
|
1228
881
|
/**
|
|
1229
|
-
* Connect Bluesky
|
|
882
|
+
* Connect Bluesky account
|
|
1230
883
|
* Connect a Bluesky account using identifier (handle or email) and an app password.
|
|
1231
|
-
*
|
|
1232
|
-
* To get your userId for the state parameter, call `GET /v1/users` - the response includes a `currentUserId` field.
|
|
884
|
+
* To get your userId for the state parameter, call GET /v1/users which includes a currentUserId field.
|
|
1233
885
|
*
|
|
1234
886
|
*/
|
|
1235
887
|
export const connectBlueskyCredentials = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ConnectBlueskyCredentialsData, ThrowOnError>) => {
|
|
@@ -1240,17 +892,9 @@ export const connectBlueskyCredentials = <ThrowOnError extends boolean = false>(
|
|
|
1240
892
|
};
|
|
1241
893
|
|
|
1242
894
|
/**
|
|
1243
|
-
* Generate Telegram
|
|
895
|
+
* Generate Telegram code
|
|
1244
896
|
* Generate a unique access code for connecting a Telegram channel or group.
|
|
1245
|
-
*
|
|
1246
|
-
* **Connection Flow:**
|
|
1247
|
-
* 1. Call this endpoint to get an access code (valid for 15 minutes)
|
|
1248
|
-
* 2. Add the bot (@LateScheduleBot or your configured bot) as an administrator in your Telegram channel/group
|
|
1249
|
-
* 3. Open a private chat with the bot
|
|
1250
|
-
* 4. Send: `{CODE} @yourchannel` (e.g., `LATE-ABC123 @mychannel`)
|
|
1251
|
-
* 5. Poll `PATCH /v1/connect/telegram?code={CODE}` to check connection status
|
|
1252
|
-
*
|
|
1253
|
-
* **Alternative for private channels:** If your channel has no public username, forward any message from the channel to the bot along with the access code.
|
|
897
|
+
* Flow: get an access code (valid 15 minutes), add the bot as admin in your channel/group, open a private chat with the bot, send the code + @yourchannel (e.g. LATE-ABC123 @mychannel), then poll PATCH /v1/connect/telegram?code={CODE} to check connection status. For private channels without a public username, forward any message from the channel to the bot along with the access code.
|
|
1254
898
|
*
|
|
1255
899
|
*/
|
|
1256
900
|
export const getTelegramConnectStatus = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTelegramConnectStatusData, ThrowOnError>) => {
|
|
@@ -1261,7 +905,7 @@ export const getTelegramConnectStatus = <ThrowOnError extends boolean = false>(o
|
|
|
1261
905
|
};
|
|
1262
906
|
|
|
1263
907
|
/**
|
|
1264
|
-
*
|
|
908
|
+
* Connect Telegram directly
|
|
1265
909
|
* Connect a Telegram channel/group directly using the chat ID.
|
|
1266
910
|
*
|
|
1267
911
|
* This is an alternative to the access code flow for power users who know their Telegram chat ID.
|
|
@@ -1276,15 +920,9 @@ export const initiateTelegramConnect = <ThrowOnError extends boolean = false>(op
|
|
|
1276
920
|
};
|
|
1277
921
|
|
|
1278
922
|
/**
|
|
1279
|
-
* Check Telegram
|
|
1280
|
-
* Poll this endpoint to check if a Telegram access code has been used to connect a channel/group.
|
|
1281
|
-
*
|
|
1282
|
-
* **Recommended polling interval:** 3 seconds
|
|
1283
|
-
*
|
|
1284
|
-
* **Status values:**
|
|
1285
|
-
* - `pending`: Code is valid, waiting for user to complete connection
|
|
1286
|
-
* - `connected`: Connection successful - channel/group is now linked
|
|
1287
|
-
* - `expired`: Code has expired, generate a new one
|
|
923
|
+
* Check Telegram status
|
|
924
|
+
* Poll this endpoint to check if a Telegram access code has been used to connect a channel/group. Recommended polling interval: 3 seconds.
|
|
925
|
+
* Status values: pending (waiting for user), connected (channel/group linked), expired (generate a new code).
|
|
1288
926
|
*
|
|
1289
927
|
*/
|
|
1290
928
|
export const completeTelegramConnect = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CompleteTelegramConnectData, ThrowOnError>) => {
|
|
@@ -1295,7 +933,7 @@ export const completeTelegramConnect = <ThrowOnError extends boolean = false>(op
|
|
|
1295
933
|
};
|
|
1296
934
|
|
|
1297
935
|
/**
|
|
1298
|
-
* List
|
|
936
|
+
* List Facebook pages
|
|
1299
937
|
* Returns all Facebook pages the connected account has access to, including the currently selected page.
|
|
1300
938
|
*/
|
|
1301
939
|
export const getFacebookPages = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetFacebookPagesData, ThrowOnError>) => {
|
|
@@ -1306,7 +944,7 @@ export const getFacebookPages = <ThrowOnError extends boolean = false>(options:
|
|
|
1306
944
|
};
|
|
1307
945
|
|
|
1308
946
|
/**
|
|
1309
|
-
* Update
|
|
947
|
+
* Update Facebook page
|
|
1310
948
|
*/
|
|
1311
949
|
export const updateFacebookPage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateFacebookPageData, ThrowOnError>) => {
|
|
1312
950
|
return (options?.client ?? client).put<UpdateFacebookPageResponse, UpdateFacebookPageError, ThrowOnError>({
|
|
@@ -1316,7 +954,7 @@ export const updateFacebookPage = <ThrowOnError extends boolean = false>(options
|
|
|
1316
954
|
};
|
|
1317
955
|
|
|
1318
956
|
/**
|
|
1319
|
-
*
|
|
957
|
+
* List LinkedIn orgs
|
|
1320
958
|
*/
|
|
1321
959
|
export const getLinkedInOrganizations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInOrganizationsData, ThrowOnError>) => {
|
|
1322
960
|
return (options?.client ?? client).get<GetLinkedInOrganizationsResponse, GetLinkedInOrganizationsError, ThrowOnError>({
|
|
@@ -1326,32 +964,9 @@ export const getLinkedInOrganizations = <ThrowOnError extends boolean = false>(o
|
|
|
1326
964
|
};
|
|
1327
965
|
|
|
1328
966
|
/**
|
|
1329
|
-
* Get
|
|
1330
|
-
* Returns aggregate analytics across
|
|
1331
|
-
*
|
|
1332
|
-
*
|
|
1333
|
-
* **Important:** This endpoint only works for LinkedIn **personal** accounts. Organization accounts should use the standard `/v1/analytics` endpoint for per-post analytics.
|
|
1334
|
-
*
|
|
1335
|
-
* **Required Scope:** `r_member_postAnalytics`
|
|
1336
|
-
*
|
|
1337
|
-
* If the connected account doesn't have this scope, you'll receive a 403 error with instructions to reconnect.
|
|
1338
|
-
*
|
|
1339
|
-
* **Aggregation Options:**
|
|
1340
|
-
* - `TOTAL` (default): Returns lifetime totals for all metrics
|
|
1341
|
-
* - `DAILY`: Returns daily breakdown of metrics over time
|
|
1342
|
-
*
|
|
1343
|
-
* **Available Metrics:**
|
|
1344
|
-
* - `IMPRESSION`: Number of times posts were displayed
|
|
1345
|
-
* - `MEMBERS_REACHED`: Unique members who saw posts (NOT available with DAILY aggregation)
|
|
1346
|
-
* - `REACTION`: Total reactions (likes, celebrates, etc.)
|
|
1347
|
-
* - `COMMENT`: Total comments
|
|
1348
|
-
* - `RESHARE`: Total reshares/reposts
|
|
1349
|
-
*
|
|
1350
|
-
* **Date Range Filtering:**
|
|
1351
|
-
* Use `startDate` and `endDate` parameters to filter analytics to a specific time period.
|
|
1352
|
-
* If omitted, returns lifetime analytics.
|
|
1353
|
-
*
|
|
1354
|
-
* **LinkedIn API Limitation:** The combination of `MEMBERS_REACHED` + `DAILY` aggregation is not supported by LinkedIn's API.
|
|
967
|
+
* Get LinkedIn aggregate stats
|
|
968
|
+
* Returns aggregate analytics across all posts for a LinkedIn personal account. Org accounts should use /v1/analytics instead.
|
|
969
|
+
* Required scope: r_member_postAnalytics (missing scope returns 403). Aggregation: TOTAL (default, lifetime totals) or DAILY (time series). Use startDate/endDate to filter. MEMBERS_REACHED is not available with DAILY aggregation.
|
|
1355
970
|
*
|
|
1356
971
|
*/
|
|
1357
972
|
export const getLinkedInAggregateAnalytics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInAggregateAnalyticsData, ThrowOnError>) => {
|
|
@@ -1362,23 +977,9 @@ export const getLinkedInAggregateAnalytics = <ThrowOnError extends boolean = fal
|
|
|
1362
977
|
};
|
|
1363
978
|
|
|
1364
979
|
/**
|
|
1365
|
-
* Get
|
|
1366
|
-
* Returns analytics for a specific LinkedIn post using its URN.
|
|
1367
|
-
*
|
|
1368
|
-
*
|
|
1369
|
-
* This is useful for fetching analytics of posts that weren't published through Late,
|
|
1370
|
-
* as long as you have the post URN.
|
|
1371
|
-
*
|
|
1372
|
-
* **For Personal Accounts:**
|
|
1373
|
-
* - Uses `memberCreatorPostAnalytics` API + `memberCreatorVideoAnalytics` for video posts
|
|
1374
|
-
* - Requires `r_member_postAnalytics` scope
|
|
1375
|
-
* - Available metrics: impressions, reach, likes, comments, shares, video views (video posts only)
|
|
1376
|
-
* - **Clicks are NOT available** for personal accounts
|
|
1377
|
-
*
|
|
1378
|
-
* **For Organization Accounts:**
|
|
1379
|
-
* - Uses `organizationalEntityShareStatistics` API + `videoAnalytics` for video posts
|
|
1380
|
-
* - Requires `r_organization_social` scope
|
|
1381
|
-
* - Available metrics: impressions, reach, clicks, likes, comments, shares, video views (video posts only), engagement rate
|
|
980
|
+
* Get LinkedIn post stats
|
|
981
|
+
* Returns analytics for a specific LinkedIn post using its URN. Works for both personal and organization accounts. Useful for fetching analytics of posts not published through Late.
|
|
982
|
+
* Personal accounts require r_member_postAnalytics scope and return impressions, reach, likes, comments, shares, and video views (clicks not available). Organization accounts require r_organization_social scope and additionally return clicks and engagement rate.
|
|
1382
983
|
*
|
|
1383
984
|
*/
|
|
1384
985
|
export const getLinkedInPostAnalytics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInPostAnalyticsData, ThrowOnError>) => {
|
|
@@ -1389,7 +990,7 @@ export const getLinkedInPostAnalytics = <ThrowOnError extends boolean = false>(o
|
|
|
1389
990
|
};
|
|
1390
991
|
|
|
1391
992
|
/**
|
|
1392
|
-
* Switch LinkedIn account type
|
|
993
|
+
* Switch LinkedIn account type
|
|
1393
994
|
*/
|
|
1394
995
|
export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateLinkedInOrganizationData, ThrowOnError>) => {
|
|
1395
996
|
return (options?.client ?? client).put<UpdateLinkedInOrganizationResponse, UpdateLinkedInOrganizationError, ThrowOnError>({
|
|
@@ -1399,28 +1000,9 @@ export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
1399
1000
|
};
|
|
1400
1001
|
|
|
1401
1002
|
/**
|
|
1402
|
-
* Resolve
|
|
1403
|
-
* Converts a LinkedIn profile
|
|
1404
|
-
*
|
|
1405
|
-
* **Supports both:**
|
|
1406
|
-
* - **Person mentions:** `linkedin.com/in/username` or just `username`
|
|
1407
|
-
* - **Organization mentions:** `linkedin.com/company/company-name` or `company/company-name`
|
|
1408
|
-
*
|
|
1409
|
-
* **⚠️ Organization Admin Required for Person Mentions Only:**
|
|
1410
|
-
* Person mentions require the connected LinkedIn account to have admin access to at least one LinkedIn Organization (Company Page).
|
|
1411
|
-
* Organization mentions do NOT have this requirement - any LinkedIn account can tag companies.
|
|
1412
|
-
*
|
|
1413
|
-
* **IMPORTANT - Display Name Requirement:**
|
|
1414
|
-
* For **person mentions** to be clickable, the display name must **exactly match** what appears on their LinkedIn profile.
|
|
1415
|
-
* - Organization mentions automatically retrieve the company name from LinkedIn API
|
|
1416
|
-
* - Person mentions require the exact name, so provide the `displayName` parameter
|
|
1417
|
-
*
|
|
1418
|
-
* **Mention Format:**
|
|
1419
|
-
* Use the returned `mentionFormat` value directly in your post content:
|
|
1420
|
-
* ```
|
|
1421
|
-
* Great insights from @[Miquel Palet](urn:li:person:4qj5ox-agD) on this topic!
|
|
1422
|
-
* Excited to partner with @[Microsoft](urn:li:organization:1035)!
|
|
1423
|
-
* ```
|
|
1003
|
+
* Resolve LinkedIn mention
|
|
1004
|
+
* Converts a LinkedIn profile or company URL to a URN for @mentions in posts. Supports person mentions (linkedin.com/in/username or just username) and org mentions (linkedin.com/company/name or company/name).
|
|
1005
|
+
* Person mentions require admin access to at least one LinkedIn Organization. Org mentions work with any account. For person mentions to be clickable, provide the displayName parameter matching the exact name on their profile. Org names are fetched automatically. Use the returned mentionFormat directly in post content.
|
|
1424
1006
|
*
|
|
1425
1007
|
*/
|
|
1426
1008
|
export const getLinkedInMentions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInMentionsData, ThrowOnError>) => {
|
|
@@ -1431,7 +1013,7 @@ export const getLinkedInMentions = <ThrowOnError extends boolean = false>(option
|
|
|
1431
1013
|
};
|
|
1432
1014
|
|
|
1433
1015
|
/**
|
|
1434
|
-
* List Pinterest boards
|
|
1016
|
+
* List Pinterest boards
|
|
1435
1017
|
*/
|
|
1436
1018
|
export const getPinterestBoards = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPinterestBoardsData, ThrowOnError>) => {
|
|
1437
1019
|
return (options?.client ?? client).get<GetPinterestBoardsResponse, GetPinterestBoardsError, ThrowOnError>({
|
|
@@ -1441,7 +1023,7 @@ export const getPinterestBoards = <ThrowOnError extends boolean = false>(options
|
|
|
1441
1023
|
};
|
|
1442
1024
|
|
|
1443
1025
|
/**
|
|
1444
|
-
* Set default Pinterest board
|
|
1026
|
+
* Set default Pinterest board
|
|
1445
1027
|
*/
|
|
1446
1028
|
export const updatePinterestBoards = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdatePinterestBoardsData, ThrowOnError>) => {
|
|
1447
1029
|
return (options?.client ?? client).put<UpdatePinterestBoardsResponse, UpdatePinterestBoardsError, ThrowOnError>({
|
|
@@ -1451,7 +1033,7 @@ export const updatePinterestBoards = <ThrowOnError extends boolean = false>(opti
|
|
|
1451
1033
|
};
|
|
1452
1034
|
|
|
1453
1035
|
/**
|
|
1454
|
-
* List
|
|
1036
|
+
* List GBP locations
|
|
1455
1037
|
* Returns all Google Business Profile locations the connected account has access to, including the currently selected location.
|
|
1456
1038
|
*/
|
|
1457
1039
|
export const getGmbLocations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGmbLocationsData, ThrowOnError>) => {
|
|
@@ -1462,7 +1044,7 @@ export const getGmbLocations = <ThrowOnError extends boolean = false>(options: O
|
|
|
1462
1044
|
};
|
|
1463
1045
|
|
|
1464
1046
|
/**
|
|
1465
|
-
* Update
|
|
1047
|
+
* Update GBP location
|
|
1466
1048
|
*/
|
|
1467
1049
|
export const updateGmbLocation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGmbLocationData, ThrowOnError>) => {
|
|
1468
1050
|
return (options?.client ?? client).put<UpdateGmbLocationResponse, UpdateGmbLocationError, ThrowOnError>({
|
|
@@ -1472,7 +1054,7 @@ export const updateGmbLocation = <ThrowOnError extends boolean = false>(options:
|
|
|
1472
1054
|
};
|
|
1473
1055
|
|
|
1474
1056
|
/**
|
|
1475
|
-
* List Reddit subreddits
|
|
1057
|
+
* List Reddit subreddits
|
|
1476
1058
|
*/
|
|
1477
1059
|
export const getRedditSubreddits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditSubredditsData, ThrowOnError>) => {
|
|
1478
1060
|
return (options?.client ?? client).get<GetRedditSubredditsResponse, GetRedditSubredditsError, ThrowOnError>({
|
|
@@ -1482,7 +1064,7 @@ export const getRedditSubreddits = <ThrowOnError extends boolean = false>(option
|
|
|
1482
1064
|
};
|
|
1483
1065
|
|
|
1484
1066
|
/**
|
|
1485
|
-
* Set default subreddit
|
|
1067
|
+
* Set default subreddit
|
|
1486
1068
|
*/
|
|
1487
1069
|
export const updateRedditSubreddits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateRedditSubredditsData, ThrowOnError>) => {
|
|
1488
1070
|
return (options?.client ?? client).put<UpdateRedditSubredditsResponse, UpdateRedditSubredditsError, ThrowOnError>({
|
|
@@ -1492,7 +1074,7 @@ export const updateRedditSubreddits = <ThrowOnError extends boolean = false>(opt
|
|
|
1492
1074
|
};
|
|
1493
1075
|
|
|
1494
1076
|
/**
|
|
1495
|
-
* List
|
|
1077
|
+
* List subreddit flairs
|
|
1496
1078
|
*/
|
|
1497
1079
|
export const getRedditFlairs = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditFlairsData, ThrowOnError>) => {
|
|
1498
1080
|
return (options?.client ?? client).get<GetRedditFlairsResponse, GetRedditFlairsError, ThrowOnError>({
|
|
@@ -1502,10 +1084,8 @@ export const getRedditFlairs = <ThrowOnError extends boolean = false>(options: O
|
|
|
1502
1084
|
};
|
|
1503
1085
|
|
|
1504
1086
|
/**
|
|
1505
|
-
*
|
|
1506
|
-
* Retrieve queue schedules for a profile. Each profile can have multiple queues.
|
|
1507
|
-
* - Without `all=true`: Returns the default queue (or specific queue if queueId provided)
|
|
1508
|
-
* - With `all=true`: Returns all queues for the profile
|
|
1087
|
+
* List schedules
|
|
1088
|
+
* Retrieve queue schedules for a profile. Each profile can have multiple queues. Without all=true, returns the default queue (or specific queue if queueId provided). With all=true, returns all queues for the profile.
|
|
1509
1089
|
*
|
|
1510
1090
|
*/
|
|
1511
1091
|
export const listQueueSlots = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ListQueueSlotsData, ThrowOnError>) => {
|
|
@@ -1516,7 +1096,7 @@ export const listQueueSlots = <ThrowOnError extends boolean = false>(options: Op
|
|
|
1516
1096
|
};
|
|
1517
1097
|
|
|
1518
1098
|
/**
|
|
1519
|
-
* Create
|
|
1099
|
+
* Create schedule
|
|
1520
1100
|
* Create an additional queue for a profile. The first queue created becomes the default.
|
|
1521
1101
|
* Subsequent queues are non-default unless explicitly set.
|
|
1522
1102
|
*
|
|
@@ -1529,11 +1109,8 @@ export const createQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1529
1109
|
};
|
|
1530
1110
|
|
|
1531
1111
|
/**
|
|
1532
|
-
*
|
|
1533
|
-
* Create a new queue or update an existing one.
|
|
1534
|
-
* - Without queueId: Creates or updates the default queue
|
|
1535
|
-
* - With queueId: Updates the specific queue
|
|
1536
|
-
* - With setAsDefault=true: Makes this queue the default for the profile
|
|
1112
|
+
* Update schedule
|
|
1113
|
+
* Create a new queue or update an existing one. Without queueId, creates/updates the default queue. With queueId, updates a specific queue. With setAsDefault=true, makes this queue the default for the profile.
|
|
1537
1114
|
*
|
|
1538
1115
|
*/
|
|
1539
1116
|
export const updateQueueSlot = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateQueueSlotData, ThrowOnError>) => {
|
|
@@ -1544,7 +1121,7 @@ export const updateQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1544
1121
|
};
|
|
1545
1122
|
|
|
1546
1123
|
/**
|
|
1547
|
-
* Delete
|
|
1124
|
+
* Delete schedule
|
|
1548
1125
|
* Delete a queue from a profile. Requires queueId to specify which queue to delete.
|
|
1549
1126
|
* If deleting the default queue, another queue will be promoted to default.
|
|
1550
1127
|
*
|
|
@@ -1557,7 +1134,7 @@ export const deleteQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1557
1134
|
};
|
|
1558
1135
|
|
|
1559
1136
|
/**
|
|
1560
|
-
* Preview upcoming
|
|
1137
|
+
* Preview upcoming slots
|
|
1561
1138
|
*/
|
|
1562
1139
|
export const previewQueue = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PreviewQueueData, ThrowOnError>) => {
|
|
1563
1140
|
return (options?.client ?? client).get<PreviewQueueResponse, PreviewQueueError, ThrowOnError>({
|
|
@@ -1567,20 +1144,9 @@ export const previewQueue = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
1567
1144
|
};
|
|
1568
1145
|
|
|
1569
1146
|
/**
|
|
1570
|
-
*
|
|
1571
|
-
* Returns the next available queue slot for preview/informational purposes.
|
|
1572
|
-
*
|
|
1573
|
-
* **Important: To schedule a post to the queue, do NOT use this endpoint's response
|
|
1574
|
-
* with `scheduledFor`.** That creates a manual post, not a queue post.
|
|
1575
|
-
*
|
|
1576
|
-
* Instead, use `POST /v1/posts` with `queuedFromProfile` (and optionally `queueId`).
|
|
1577
|
-
* The system will automatically assign the next available slot with proper locking
|
|
1578
|
-
* to prevent race conditions.
|
|
1579
|
-
*
|
|
1580
|
-
* This endpoint is useful for:
|
|
1581
|
-
* - Showing users when their next post will go out before they commit
|
|
1582
|
-
* - Debugging/verifying queue configuration
|
|
1583
|
-
* - Building UI previews
|
|
1147
|
+
* Get next available slot
|
|
1148
|
+
* Returns the next available queue slot for preview/informational purposes. Do NOT use this response with scheduledFor to schedule a post, as that creates a manual post, not a queue post.
|
|
1149
|
+
* Instead, use POST /v1/posts with queuedFromProfile (and optionally queueId). Useful for showing users when their next post will go out, debugging queue configuration, or building UI previews.
|
|
1584
1150
|
*
|
|
1585
1151
|
* If no queueId is specified, uses the profile's default queue.
|
|
1586
1152
|
*
|
|
@@ -1593,7 +1159,7 @@ export const getNextQueueSlot = <ThrowOnError extends boolean = false>(options:
|
|
|
1593
1159
|
};
|
|
1594
1160
|
|
|
1595
1161
|
/**
|
|
1596
|
-
* List
|
|
1162
|
+
* List webhooks
|
|
1597
1163
|
* Retrieve all configured webhooks for the authenticated user. Supports up to 10 webhooks per user.
|
|
1598
1164
|
*/
|
|
1599
1165
|
export const getWebhookSettings = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
@@ -1604,10 +1170,10 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
|
|
|
1604
1170
|
};
|
|
1605
1171
|
|
|
1606
1172
|
/**
|
|
1607
|
-
* Create
|
|
1173
|
+
* Create webhook
|
|
1608
1174
|
* Create a new webhook configuration. Maximum 10 webhooks per user.
|
|
1609
1175
|
*
|
|
1610
|
-
*
|
|
1176
|
+
* Webhooks are automatically disabled after 10 consecutive delivery failures.
|
|
1611
1177
|
*
|
|
1612
1178
|
*/
|
|
1613
1179
|
export const createWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateWebhookSettingsData, ThrowOnError>) => {
|
|
@@ -1618,10 +1184,10 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
1618
1184
|
};
|
|
1619
1185
|
|
|
1620
1186
|
/**
|
|
1621
|
-
* Update
|
|
1622
|
-
* Update an existing webhook configuration. All fields except
|
|
1187
|
+
* Update webhook
|
|
1188
|
+
* Update an existing webhook configuration. All fields except _id are optional; only provided fields will be updated.
|
|
1623
1189
|
*
|
|
1624
|
-
*
|
|
1190
|
+
* Webhooks are automatically disabled after 10 consecutive delivery failures.
|
|
1625
1191
|
*
|
|
1626
1192
|
*/
|
|
1627
1193
|
export const updateWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateWebhookSettingsData, ThrowOnError>) => {
|
|
@@ -1632,7 +1198,7 @@ export const updateWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
1632
1198
|
};
|
|
1633
1199
|
|
|
1634
1200
|
/**
|
|
1635
|
-
* Delete
|
|
1201
|
+
* Delete webhook
|
|
1636
1202
|
* Permanently delete a webhook configuration.
|
|
1637
1203
|
*/
|
|
1638
1204
|
export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => {
|
|
@@ -1644,8 +1210,7 @@ export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
1644
1210
|
|
|
1645
1211
|
/**
|
|
1646
1212
|
* Send test webhook
|
|
1647
|
-
* Send a test webhook to verify your endpoint is configured correctly.
|
|
1648
|
-
* The test payload includes `event: "webhook.test"` to distinguish it from real events.
|
|
1213
|
+
* Send a test webhook to verify your endpoint is configured correctly. The test payload includes event: "webhook.test" to distinguish it from real events.
|
|
1649
1214
|
*
|
|
1650
1215
|
*/
|
|
1651
1216
|
export const testWebhook = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<TestWebhookData, ThrowOnError>) => {
|
|
@@ -1656,7 +1221,7 @@ export const testWebhook = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
1656
1221
|
};
|
|
1657
1222
|
|
|
1658
1223
|
/**
|
|
1659
|
-
* Get
|
|
1224
|
+
* Get delivery logs
|
|
1660
1225
|
* Retrieve webhook delivery history. Logs are automatically deleted after 7 days.
|
|
1661
1226
|
*
|
|
1662
1227
|
*/
|
|
@@ -1668,52 +1233,8 @@ export const getWebhookLogs = <ThrowOnError extends boolean = false>(options?: O
|
|
|
1668
1233
|
};
|
|
1669
1234
|
|
|
1670
1235
|
/**
|
|
1671
|
-
*
|
|
1672
|
-
*
|
|
1673
|
-
* **Deprecated:** Use `/v1/posts/logs` instead. This endpoint is maintained for backwards compatibility.
|
|
1674
|
-
*
|
|
1675
|
-
* Retrieve publishing logs for all posts. Logs show detailed information about each
|
|
1676
|
-
* publishing attempt including API requests, responses, and timing data.
|
|
1677
|
-
*
|
|
1678
|
-
* **Filtering:**
|
|
1679
|
-
* - Filter by status (success, failed, pending, skipped)
|
|
1680
|
-
* - Filter by platform (instagram, twitter, linkedin, etc.)
|
|
1681
|
-
* - Filter by action (publish, retry, rate_limit_pause, etc.)
|
|
1682
|
-
*
|
|
1683
|
-
* **Retention:** Logs are automatically deleted after 7 days.
|
|
1684
|
-
*
|
|
1685
|
-
*/
|
|
1686
|
-
export const listLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListLogsData, ThrowOnError>) => {
|
|
1687
|
-
return (options?.client ?? client).get<ListLogsResponse, ListLogsError, ThrowOnError>({
|
|
1688
|
-
...options,
|
|
1689
|
-
url: '/v1/logs'
|
|
1690
|
-
});
|
|
1691
|
-
};
|
|
1692
|
-
|
|
1693
|
-
/**
|
|
1694
|
-
* Get a single log entry
|
|
1695
|
-
* Retrieve detailed information about a specific log entry, including full request
|
|
1696
|
-
* and response bodies for debugging.
|
|
1697
|
-
*
|
|
1698
|
-
*/
|
|
1699
|
-
export const getLog = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLogData, ThrowOnError>) => {
|
|
1700
|
-
return (options?.client ?? client).get<GetLogResponse, GetLogError, ThrowOnError>({
|
|
1701
|
-
...options,
|
|
1702
|
-
url: '/v1/logs/{logId}'
|
|
1703
|
-
});
|
|
1704
|
-
};
|
|
1705
|
-
|
|
1706
|
-
/**
|
|
1707
|
-
* Get publishing logs
|
|
1708
|
-
* Retrieve publishing logs for all posts. Logs show detailed information about each
|
|
1709
|
-
* publishing attempt including API requests, responses, and timing data.
|
|
1710
|
-
*
|
|
1711
|
-
* **Filtering:**
|
|
1712
|
-
* - Filter by status (success, failed, pending, skipped)
|
|
1713
|
-
* - Filter by platform (instagram, twitter, linkedin, etc.)
|
|
1714
|
-
* - Filter by action (publish, retry, rate_limit_pause, etc.)
|
|
1715
|
-
*
|
|
1716
|
-
* **Retention:** Logs are automatically deleted after 7 days.
|
|
1236
|
+
* List publishing logs
|
|
1237
|
+
* Retrieve publishing logs for all posts with detailed information about each publishing attempt. Filter by status, platform, or action. Logs are automatically deleted after 7 days.
|
|
1717
1238
|
*
|
|
1718
1239
|
*/
|
|
1719
1240
|
export const listPostsLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListPostsLogsData, ThrowOnError>) => {
|
|
@@ -1724,18 +1245,9 @@ export const listPostsLogs = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
1724
1245
|
};
|
|
1725
1246
|
|
|
1726
1247
|
/**
|
|
1727
|
-
*
|
|
1728
|
-
* Retrieve connection event logs showing account connection and disconnection history.
|
|
1729
|
-
*
|
|
1730
|
-
*
|
|
1731
|
-
* **Event Types:**
|
|
1732
|
-
* - `connect_success` - New account connected successfully
|
|
1733
|
-
* - `connect_failed` - Connection attempt failed
|
|
1734
|
-
* - `disconnect` - Account was disconnected
|
|
1735
|
-
* - `reconnect_success` - Existing account reconnected
|
|
1736
|
-
* - `reconnect_failed` - Reconnection attempt failed
|
|
1737
|
-
*
|
|
1738
|
-
* **Retention:** Logs are automatically deleted after 7 days.
|
|
1248
|
+
* List connection logs
|
|
1249
|
+
* Retrieve connection event logs showing account connection and disconnection history. Event types: connect_success, connect_failed, disconnect, reconnect_success, reconnect_failed.
|
|
1250
|
+
* Logs are automatically deleted after 7 days.
|
|
1739
1251
|
*
|
|
1740
1252
|
*/
|
|
1741
1253
|
export const listConnectionLogs = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListConnectionLogsData, ThrowOnError>) => {
|
|
@@ -1746,7 +1258,7 @@ export const listConnectionLogs = <ThrowOnError extends boolean = false>(options
|
|
|
1746
1258
|
};
|
|
1747
1259
|
|
|
1748
1260
|
/**
|
|
1749
|
-
* Get logs
|
|
1261
|
+
* Get post logs
|
|
1750
1262
|
* Retrieve all publishing logs for a specific post. Shows the complete history
|
|
1751
1263
|
* of publishing attempts for that post across all platforms.
|
|
1752
1264
|
*
|
|
@@ -1759,11 +1271,9 @@ export const getPostLogs = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
1759
1271
|
};
|
|
1760
1272
|
|
|
1761
1273
|
/**
|
|
1762
|
-
* List conversations
|
|
1763
|
-
* Fetch conversations (DMs) from all connected messaging accounts in a single API call.
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
* **Supported platforms:** Facebook, Instagram, Twitter/X, Bluesky, Reddit, Telegram
|
|
1274
|
+
* List conversations
|
|
1275
|
+
* Fetch conversations (DMs) from all connected messaging accounts in a single API call. Supports filtering by profile and platform. Results are aggregated and deduplicated.
|
|
1276
|
+
* Supported platforms: Facebook, Instagram, Twitter/X, Bluesky, Reddit, Telegram.
|
|
1767
1277
|
*
|
|
1768
1278
|
*/
|
|
1769
1279
|
export const listInboxConversations = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxConversationsData, ThrowOnError>) => {
|
|
@@ -1774,7 +1284,7 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
1774
1284
|
};
|
|
1775
1285
|
|
|
1776
1286
|
/**
|
|
1777
|
-
* Get conversation
|
|
1287
|
+
* Get conversation
|
|
1778
1288
|
* Retrieve details and metadata for a specific conversation. Requires accountId query parameter.
|
|
1779
1289
|
*/
|
|
1780
1290
|
export const getInboxConversation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxConversationData, ThrowOnError>) => {
|
|
@@ -1796,7 +1306,7 @@ export const updateInboxConversation = <ThrowOnError extends boolean = false>(op
|
|
|
1796
1306
|
};
|
|
1797
1307
|
|
|
1798
1308
|
/**
|
|
1799
|
-
*
|
|
1309
|
+
* List messages
|
|
1800
1310
|
* Fetch messages for a specific conversation. Requires accountId query parameter.
|
|
1801
1311
|
*/
|
|
1802
1312
|
export const getInboxConversationMessages = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxConversationMessagesData, ThrowOnError>) => {
|
|
@@ -1807,29 +1317,10 @@ export const getInboxConversationMessages = <ThrowOnError extends boolean = fals
|
|
|
1807
1317
|
};
|
|
1808
1318
|
|
|
1809
1319
|
/**
|
|
1810
|
-
* Send
|
|
1320
|
+
* Send message
|
|
1811
1321
|
* Send a message in a conversation. Supports text, attachments, quick replies, buttons, carousels, and message tags.
|
|
1812
|
-
*
|
|
1813
|
-
*
|
|
1814
|
-
* - Telegram: Images, videos, documents (up to 50MB)
|
|
1815
|
-
* - Facebook Messenger: Images, videos, audio, files
|
|
1816
|
-
* - Instagram: Images, videos, audio via URL (8MB images, 25MB video/audio)
|
|
1817
|
-
* - Twitter/X: Images, videos (requires media upload)
|
|
1818
|
-
* - Bluesky: Not supported
|
|
1819
|
-
* - Reddit: Not supported
|
|
1820
|
-
*
|
|
1821
|
-
* **Interactive message support:**
|
|
1822
|
-
* | Field | Instagram | Facebook | Telegram |
|
|
1823
|
-
* |---|---|---|---|
|
|
1824
|
-
* | quickReplies | Meta quick_replies (13 max) | Meta quick_replies (13 max) | ReplyKeyboardMarkup (one_time) |
|
|
1825
|
-
* | buttons | Generic template | Generic template | Inline keyboard |
|
|
1826
|
-
* | template | Generic template (carousel) | Generic template (carousel) | Ignored |
|
|
1827
|
-
* | replyMarkup | Ignored | Ignored | InlineKeyboardMarkup / ReplyKeyboardMarkup |
|
|
1828
|
-
* | messagingType | Ignored | RESPONSE / UPDATE / MESSAGE_TAG | Ignored |
|
|
1829
|
-
* | messageTag | HUMAN_AGENT only | 4 tag types | Ignored |
|
|
1830
|
-
* | replyTo | Ignored | Ignored | reply_parameters |
|
|
1831
|
-
*
|
|
1832
|
-
* Platform-specific fields are silently ignored on unsupported platforms.
|
|
1322
|
+
* Attachments: Telegram (images, videos, docs up to 50MB), Facebook (images, videos, audio, files), Instagram (images, videos, audio via URL), Twitter/X (images, videos). Not supported on Bluesky/Reddit.
|
|
1323
|
+
* Interactive messages (quick replies, buttons, templates, reply markup) vary by platform. Unsupported fields are silently ignored.
|
|
1833
1324
|
*
|
|
1834
1325
|
*/
|
|
1835
1326
|
export const sendInboxMessage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendInboxMessageData, ThrowOnError>) => {
|
|
@@ -1840,7 +1331,7 @@ export const sendInboxMessage = <ThrowOnError extends boolean = false>(options:
|
|
|
1840
1331
|
};
|
|
1841
1332
|
|
|
1842
1333
|
/**
|
|
1843
|
-
* Edit
|
|
1334
|
+
* Edit message
|
|
1844
1335
|
* Edit the text and/or reply markup of a previously sent Telegram message.
|
|
1845
1336
|
* Only supported for Telegram. Returns 400 for other platforms.
|
|
1846
1337
|
*
|
|
@@ -1853,7 +1344,7 @@ export const editInboxMessage = <ThrowOnError extends boolean = false>(options:
|
|
|
1853
1344
|
};
|
|
1854
1345
|
|
|
1855
1346
|
/**
|
|
1856
|
-
* Get
|
|
1347
|
+
* Get FB persistent menu
|
|
1857
1348
|
* Get the persistent menu configuration for a Facebook Messenger account.
|
|
1858
1349
|
*/
|
|
1859
1350
|
export const getMessengerMenu = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMessengerMenuData, ThrowOnError>) => {
|
|
@@ -1864,7 +1355,7 @@ export const getMessengerMenu = <ThrowOnError extends boolean = false>(options:
|
|
|
1864
1355
|
};
|
|
1865
1356
|
|
|
1866
1357
|
/**
|
|
1867
|
-
* Set
|
|
1358
|
+
* Set FB persistent menu
|
|
1868
1359
|
* Set the persistent menu for a Facebook Messenger account. Max 3 top-level items, max 5 nested items.
|
|
1869
1360
|
*/
|
|
1870
1361
|
export const setMessengerMenu = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SetMessengerMenuData, ThrowOnError>) => {
|
|
@@ -1875,7 +1366,7 @@ export const setMessengerMenu = <ThrowOnError extends boolean = false>(options:
|
|
|
1875
1366
|
};
|
|
1876
1367
|
|
|
1877
1368
|
/**
|
|
1878
|
-
* Delete
|
|
1369
|
+
* Delete FB persistent menu
|
|
1879
1370
|
*/
|
|
1880
1371
|
export const deleteMessengerMenu = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteMessengerMenuData, ThrowOnError>) => {
|
|
1881
1372
|
return (options?.client ?? client).delete<DeleteMessengerMenuResponse, DeleteMessengerMenuError, ThrowOnError>({
|
|
@@ -1885,7 +1376,7 @@ export const deleteMessengerMenu = <ThrowOnError extends boolean = false>(option
|
|
|
1885
1376
|
};
|
|
1886
1377
|
|
|
1887
1378
|
/**
|
|
1888
|
-
* Get
|
|
1379
|
+
* Get IG ice breakers
|
|
1889
1380
|
* Get the ice breaker configuration for an Instagram account.
|
|
1890
1381
|
*/
|
|
1891
1382
|
export const getInstagramIceBreakers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInstagramIceBreakersData, ThrowOnError>) => {
|
|
@@ -1896,7 +1387,7 @@ export const getInstagramIceBreakers = <ThrowOnError extends boolean = false>(op
|
|
|
1896
1387
|
};
|
|
1897
1388
|
|
|
1898
1389
|
/**
|
|
1899
|
-
* Set
|
|
1390
|
+
* Set IG ice breakers
|
|
1900
1391
|
* Set ice breakers for an Instagram account. Max 4 ice breakers, question max 80 chars.
|
|
1901
1392
|
*/
|
|
1902
1393
|
export const setInstagramIceBreakers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SetInstagramIceBreakersData, ThrowOnError>) => {
|
|
@@ -1907,7 +1398,7 @@ export const setInstagramIceBreakers = <ThrowOnError extends boolean = false>(op
|
|
|
1907
1398
|
};
|
|
1908
1399
|
|
|
1909
1400
|
/**
|
|
1910
|
-
* Delete
|
|
1401
|
+
* Delete IG ice breakers
|
|
1911
1402
|
*/
|
|
1912
1403
|
export const deleteInstagramIceBreakers = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteInstagramIceBreakersData, ThrowOnError>) => {
|
|
1913
1404
|
return (options?.client ?? client).delete<DeleteInstagramIceBreakersResponse, DeleteInstagramIceBreakersError, ThrowOnError>({
|
|
@@ -1917,7 +1408,7 @@ export const deleteInstagramIceBreakers = <ThrowOnError extends boolean = false>
|
|
|
1917
1408
|
};
|
|
1918
1409
|
|
|
1919
1410
|
/**
|
|
1920
|
-
* Get
|
|
1411
|
+
* Get TG bot commands
|
|
1921
1412
|
* Get the bot commands configuration for a Telegram account.
|
|
1922
1413
|
*/
|
|
1923
1414
|
export const getTelegramCommands = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetTelegramCommandsData, ThrowOnError>) => {
|
|
@@ -1928,7 +1419,7 @@ export const getTelegramCommands = <ThrowOnError extends boolean = false>(option
|
|
|
1928
1419
|
};
|
|
1929
1420
|
|
|
1930
1421
|
/**
|
|
1931
|
-
* Set
|
|
1422
|
+
* Set TG bot commands
|
|
1932
1423
|
* Set bot commands for a Telegram account.
|
|
1933
1424
|
*/
|
|
1934
1425
|
export const setTelegramCommands = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SetTelegramCommandsData, ThrowOnError>) => {
|
|
@@ -1939,7 +1430,7 @@ export const setTelegramCommands = <ThrowOnError extends boolean = false>(option
|
|
|
1939
1430
|
};
|
|
1940
1431
|
|
|
1941
1432
|
/**
|
|
1942
|
-
* Delete
|
|
1433
|
+
* Delete TG bot commands
|
|
1943
1434
|
*/
|
|
1944
1435
|
export const deleteTelegramCommands = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteTelegramCommandsData, ThrowOnError>) => {
|
|
1945
1436
|
return (options?.client ?? client).delete<DeleteTelegramCommandsResponse, DeleteTelegramCommandsError, ThrowOnError>({
|
|
@@ -1949,11 +1440,11 @@ export const deleteTelegramCommands = <ThrowOnError extends boolean = false>(opt
|
|
|
1949
1440
|
};
|
|
1950
1441
|
|
|
1951
1442
|
/**
|
|
1952
|
-
* List posts
|
|
1443
|
+
* List commented posts
|
|
1953
1444
|
* Fetch posts with their comment counts from all connected accounts.
|
|
1954
1445
|
* Aggregates data from multiple accounts in a single API call.
|
|
1955
1446
|
*
|
|
1956
|
-
*
|
|
1447
|
+
* Supported platforms: Facebook, Instagram, Twitter/X, Bluesky, Threads, YouTube, LinkedIn, Reddit, TikTok (write-only).
|
|
1957
1448
|
*
|
|
1958
1449
|
*/
|
|
1959
1450
|
export const listInboxComments = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxCommentsData, ThrowOnError>) => {
|
|
@@ -1964,7 +1455,7 @@ export const listInboxComments = <ThrowOnError extends boolean = false>(options?
|
|
|
1964
1455
|
};
|
|
1965
1456
|
|
|
1966
1457
|
/**
|
|
1967
|
-
* Get comments
|
|
1458
|
+
* Get post comments
|
|
1968
1459
|
* Fetch comments for a specific post. Requires accountId query parameter.
|
|
1969
1460
|
*/
|
|
1970
1461
|
export const getInboxPostComments = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxPostCommentsData, ThrowOnError>) => {
|
|
@@ -1975,7 +1466,7 @@ export const getInboxPostComments = <ThrowOnError extends boolean = false>(optio
|
|
|
1975
1466
|
};
|
|
1976
1467
|
|
|
1977
1468
|
/**
|
|
1978
|
-
* Reply to
|
|
1469
|
+
* Reply to comment
|
|
1979
1470
|
* Post a reply to a post or specific comment. Requires accountId in request body.
|
|
1980
1471
|
*/
|
|
1981
1472
|
export const replyToInboxPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReplyToInboxPostData, ThrowOnError>) => {
|
|
@@ -1986,7 +1477,7 @@ export const replyToInboxPost = <ThrowOnError extends boolean = false>(options:
|
|
|
1986
1477
|
};
|
|
1987
1478
|
|
|
1988
1479
|
/**
|
|
1989
|
-
* Delete
|
|
1480
|
+
* Delete comment
|
|
1990
1481
|
* Delete a comment on a post. Supported by Facebook, Instagram, Bluesky, Reddit, YouTube, LinkedIn, and TikTok.
|
|
1991
1482
|
* Requires accountId and commentId query parameters.
|
|
1992
1483
|
*
|
|
@@ -1999,7 +1490,7 @@ export const deleteInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
1999
1490
|
};
|
|
2000
1491
|
|
|
2001
1492
|
/**
|
|
2002
|
-
* Hide
|
|
1493
|
+
* Hide comment
|
|
2003
1494
|
* Hide a comment on a post. Supported by Facebook, Instagram, and Threads.
|
|
2004
1495
|
* Hidden comments are only visible to the commenter and page admin.
|
|
2005
1496
|
*
|
|
@@ -2012,7 +1503,7 @@ export const hideInboxComment = <ThrowOnError extends boolean = false>(options:
|
|
|
2012
1503
|
};
|
|
2013
1504
|
|
|
2014
1505
|
/**
|
|
2015
|
-
* Unhide
|
|
1506
|
+
* Unhide comment
|
|
2016
1507
|
* Unhide a previously hidden comment. Supported by Facebook, Instagram, and Threads.
|
|
2017
1508
|
*
|
|
2018
1509
|
*/
|
|
@@ -2024,12 +1515,9 @@ export const unhideInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
2024
1515
|
};
|
|
2025
1516
|
|
|
2026
1517
|
/**
|
|
2027
|
-
* Like
|
|
2028
|
-
* Like or upvote a comment on a post.
|
|
2029
|
-
*
|
|
2030
|
-
* **Supported platforms:** Facebook, Twitter/X, Bluesky, Reddit
|
|
2031
|
-
*
|
|
2032
|
-
* For Bluesky, the `cid` (content identifier) is required in the request body.
|
|
1518
|
+
* Like comment
|
|
1519
|
+
* Like or upvote a comment on a post. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit.
|
|
1520
|
+
* For Bluesky, the cid (content identifier) is required in the request body.
|
|
2033
1521
|
*
|
|
2034
1522
|
*/
|
|
2035
1523
|
export const likeInboxComment = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<LikeInboxCommentData, ThrowOnError>) => {
|
|
@@ -2040,12 +1528,9 @@ export const likeInboxComment = <ThrowOnError extends boolean = false>(options:
|
|
|
2040
1528
|
};
|
|
2041
1529
|
|
|
2042
1530
|
/**
|
|
2043
|
-
* Unlike
|
|
2044
|
-
* Remove a like from a comment.
|
|
2045
|
-
*
|
|
2046
|
-
* **Supported platforms:** Facebook, Twitter/X, Bluesky, Reddit
|
|
2047
|
-
*
|
|
2048
|
-
* For Bluesky, the `likeUri` query parameter is required.
|
|
1531
|
+
* Unlike comment
|
|
1532
|
+
* Remove a like from a comment. Supported platforms: Facebook, Twitter/X, Bluesky, Reddit.
|
|
1533
|
+
* For Bluesky, the likeUri query parameter is required.
|
|
2049
1534
|
*
|
|
2050
1535
|
*/
|
|
2051
1536
|
export const unlikeInboxComment = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UnlikeInboxCommentData, ThrowOnError>) => {
|
|
@@ -2056,21 +1541,9 @@ export const unlikeInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
2056
1541
|
};
|
|
2057
1542
|
|
|
2058
1543
|
/**
|
|
2059
|
-
* Send private reply
|
|
2060
|
-
* Send a private direct message to the author of a comment on your post.
|
|
2061
|
-
*
|
|
2062
|
-
*
|
|
2063
|
-
* **Supported platforms:** Instagram, Facebook
|
|
2064
|
-
*
|
|
2065
|
-
* **Limitations:**
|
|
2066
|
-
* - Only ONE private reply per comment (platform API restriction)
|
|
2067
|
-
* - Must be sent within 7 days of the comment being posted
|
|
2068
|
-
* - Only works for comments on posts owned by the connected account
|
|
2069
|
-
* - Text only (no media attachments)
|
|
2070
|
-
* - Instagram: message goes to the user's Inbox (if they follow you) or Message Requests (if they don't). Requires `instagram_business_manage_messages` permission.
|
|
2071
|
-
* - Facebook: message opens a Messenger conversation with the commenter. Requires `pages_messaging` permission.
|
|
2072
|
-
*
|
|
2073
|
-
* **Note:** Both permissions are already included in Late's OAuth flow. This does not create a conversation thread until the user replies back.
|
|
1544
|
+
* Send private reply
|
|
1545
|
+
* Send a private direct message to the author of a comment on your post. Supported platforms: Instagram, Facebook.
|
|
1546
|
+
* Only one private reply per comment (platform restriction), must be sent within 7 days, only for comments on your own posts, text only. Instagram messages go to Inbox or Message Requests; Facebook opens a Messenger conversation. Both permissions are already included in Late's OAuth flow.
|
|
2074
1547
|
*
|
|
2075
1548
|
*/
|
|
2076
1549
|
export const sendPrivateReplyToComment = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendPrivateReplyToCommentData, ThrowOnError>) => {
|
|
@@ -2081,11 +1554,9 @@ export const sendPrivateReplyToComment = <ThrowOnError extends boolean = false>(
|
|
|
2081
1554
|
};
|
|
2082
1555
|
|
|
2083
1556
|
/**
|
|
2084
|
-
* List reviews
|
|
2085
|
-
* Fetch reviews from all connected Facebook Pages and Google Business accounts.
|
|
2086
|
-
*
|
|
2087
|
-
*
|
|
2088
|
-
* **Supported platforms:** Facebook, Google Business
|
|
1557
|
+
* List reviews
|
|
1558
|
+
* Fetch reviews from all connected Facebook Pages and Google Business accounts. Aggregates data with filtering and sorting options.
|
|
1559
|
+
* Supported platforms: Facebook, Google Business.
|
|
2089
1560
|
*
|
|
2090
1561
|
*/
|
|
2091
1562
|
export const listInboxReviews = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<ListInboxReviewsData, ThrowOnError>) => {
|
|
@@ -2096,7 +1567,7 @@ export const listInboxReviews = <ThrowOnError extends boolean = false>(options?:
|
|
|
2096
1567
|
};
|
|
2097
1568
|
|
|
2098
1569
|
/**
|
|
2099
|
-
* Reply to
|
|
1570
|
+
* Reply to review
|
|
2100
1571
|
* Post a reply to a review. Requires accountId in request body.
|
|
2101
1572
|
*/
|
|
2102
1573
|
export const replyToInboxReview = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReplyToInboxReviewData, ThrowOnError>) => {
|
|
@@ -2107,7 +1578,7 @@ export const replyToInboxReview = <ThrowOnError extends boolean = false>(options
|
|
|
2107
1578
|
};
|
|
2108
1579
|
|
|
2109
1580
|
/**
|
|
2110
|
-
* Delete
|
|
1581
|
+
* Delete review reply
|
|
2111
1582
|
* Delete a reply to a review (Google Business only). Requires accountId in request body.
|
|
2112
1583
|
*/
|
|
2113
1584
|
export const deleteInboxReviewReply = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteInboxReviewReplyData, ThrowOnError>) => {
|