@getlatedev/node 0.1.22 → 0.1.24
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 +118 -118
- package/dist/index.d.mts +19 -76
- package/dist/index.d.ts +19 -76
- package/package.json +1 -1
- package/src/generated/sdk.gen.ts +170 -345
- package/src/generated/types.gen.ts +19 -76
package/src/generated/sdk.gen.ts
CHANGED
|
@@ -6,7 +6,7 @@ import type { DownloadYouTubeVideoData, DownloadYouTubeVideoError, DownloadYouTu
|
|
|
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)
|
|
@@ -20,7 +20,7 @@ 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)
|
|
@@ -34,7 +34,7 @@ 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)
|
|
@@ -48,7 +48,7 @@ export const downloadInstagramMedia = <ThrowOnError extends boolean = false>(opt
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
|
-
* Check Instagram
|
|
51
|
+
* Check Instagram 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)
|
|
@@ -76,7 +76,7 @@ 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)
|
|
@@ -118,7 +118,7 @@ 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)
|
|
@@ -132,43 +132,20 @@ export const downloadBlueskyMedia = <ThrowOnError extends boolean = false>(optio
|
|
|
132
132
|
};
|
|
133
133
|
|
|
134
134
|
/**
|
|
135
|
-
*
|
|
136
|
-
* Returns analytics for posts.
|
|
137
|
-
* Otherwise returns a paginated list of posts with overview stats.
|
|
135
|
+
* Get post analytics
|
|
136
|
+
* Returns analytics for posts. With `postId`, returns a single post's analytics. Without it, returns a paginated list with overview stats.
|
|
138
137
|
*
|
|
139
|
-
* **
|
|
138
|
+
* **Post ID types:** This endpoint returns External Post IDs by default. The `postId` parameter accepts both Late Post IDs (from `POST /v1/posts`) and External Post IDs. Late Post IDs are automatically resolved to External Post analytics. Use `latePostId` in responses to link analytics back to your original Late post, or `platformPostUrl` as a stable identifier.
|
|
140
139
|
*
|
|
141
|
-
*
|
|
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
|
|
140
|
+
* **List response:** Use `isExternal` to identify post origin. `isExternal: true` means synced from platform, `isExternal: false` means queried by Late post ID.
|
|
144
141
|
*
|
|
145
|
-
*
|
|
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)
|
|
142
|
+
* For follower stats, use `/v1/accounts/follower-stats` instead.
|
|
148
143
|
*
|
|
149
|
-
* **
|
|
150
|
-
* -
|
|
151
|
-
* -
|
|
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.
|
|
144
|
+
* **Platform notes:**
|
|
145
|
+
* - LinkedIn personal accounts: per-post analytics only for posts published through Late (API restriction).
|
|
146
|
+
* - Telegram: analytics not available (Bot API limitation).
|
|
170
147
|
*
|
|
171
|
-
* **Data
|
|
148
|
+
* **Data freshness:** Cached and refreshed at most once per hour. Stale caches trigger a background refresh.
|
|
172
149
|
*
|
|
173
150
|
*/
|
|
174
151
|
export const getAnalytics = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<GetAnalyticsData, ThrowOnError>) => {
|
|
@@ -179,7 +156,7 @@ export const getAnalytics = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
179
156
|
};
|
|
180
157
|
|
|
181
158
|
/**
|
|
182
|
-
* YouTube daily views
|
|
159
|
+
* Get YouTube daily views
|
|
183
160
|
* Returns historical daily view counts for a specific YouTube video.
|
|
184
161
|
* Uses YouTube Analytics API v2 to fetch daily breakdowns including views,
|
|
185
162
|
* watch time, and subscriber changes.
|
|
@@ -202,7 +179,7 @@ export const getYouTubeDailyViews = <ThrowOnError extends boolean = false>(optio
|
|
|
202
179
|
};
|
|
203
180
|
|
|
204
181
|
/**
|
|
205
|
-
* List
|
|
182
|
+
* List groups
|
|
206
183
|
*/
|
|
207
184
|
export const listAccountGroups = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
208
185
|
return (options?.client ?? client).get<ListAccountGroupsResponse, ListAccountGroupsError, ThrowOnError>({
|
|
@@ -212,7 +189,7 @@ export const listAccountGroups = <ThrowOnError extends boolean = false>(options?
|
|
|
212
189
|
};
|
|
213
190
|
|
|
214
191
|
/**
|
|
215
|
-
* Create
|
|
192
|
+
* Create group
|
|
216
193
|
*/
|
|
217
194
|
export const createAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateAccountGroupData, ThrowOnError>) => {
|
|
218
195
|
return (options?.client ?? client).post<CreateAccountGroupResponse, CreateAccountGroupError, ThrowOnError>({
|
|
@@ -222,7 +199,7 @@ export const createAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
222
199
|
};
|
|
223
200
|
|
|
224
201
|
/**
|
|
225
|
-
* Update
|
|
202
|
+
* Update group
|
|
226
203
|
*/
|
|
227
204
|
export const updateAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountGroupData, ThrowOnError>) => {
|
|
228
205
|
return (options?.client ?? client).put<UpdateAccountGroupResponse, UpdateAccountGroupError, ThrowOnError>({
|
|
@@ -232,7 +209,7 @@ export const updateAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
232
209
|
};
|
|
233
210
|
|
|
234
211
|
/**
|
|
235
|
-
* Delete
|
|
212
|
+
* Delete group
|
|
236
213
|
*/
|
|
237
214
|
export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountGroupData, ThrowOnError>) => {
|
|
238
215
|
return (options?.client ?? client).delete<DeleteAccountGroupResponse, DeleteAccountGroupError, ThrowOnError>({
|
|
@@ -242,8 +219,8 @@ export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
242
219
|
};
|
|
243
220
|
|
|
244
221
|
/**
|
|
245
|
-
* Get
|
|
246
|
-
* Get a presigned URL to upload files directly to cloud storage.
|
|
222
|
+
* Get presigned upload URL
|
|
223
|
+
* Get a presigned URL to upload files directly to cloud storage. Supports files up to 5GB.
|
|
247
224
|
*
|
|
248
225
|
* **How it works:**
|
|
249
226
|
* 1. Call this endpoint with the filename and content type
|
|
@@ -251,38 +228,6 @@ export const deleteAccountGroup = <ThrowOnError extends boolean = false>(options
|
|
|
251
228
|
* 3. PUT your file directly to the `uploadUrl`
|
|
252
229
|
* 4. Use the `publicUrl` in your posts
|
|
253
230
|
*
|
|
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
|
-
* });
|
|
281
|
-
*
|
|
282
|
-
* // Step 3: Use publicUrl when creating your post
|
|
283
|
-
* // The publicUrl is ready to use immediately after upload completes
|
|
284
|
-
* ```
|
|
285
|
-
*
|
|
286
231
|
*/
|
|
287
232
|
export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetMediaPresignedUrlData, ThrowOnError>) => {
|
|
288
233
|
return (options?.client ?? client).post<GetMediaPresignedUrlResponse, GetMediaPresignedUrlError, ThrowOnError>({
|
|
@@ -292,7 +237,7 @@ export const getMediaPresignedUrl = <ThrowOnError extends boolean = false>(optio
|
|
|
292
237
|
};
|
|
293
238
|
|
|
294
239
|
/**
|
|
295
|
-
* Search
|
|
240
|
+
* Search posts
|
|
296
241
|
*/
|
|
297
242
|
export const searchReddit = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SearchRedditData, ThrowOnError>) => {
|
|
298
243
|
return (options?.client ?? client).get<SearchRedditResponse, SearchRedditError, ThrowOnError>({
|
|
@@ -302,7 +247,7 @@ export const searchReddit = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
302
247
|
};
|
|
303
248
|
|
|
304
249
|
/**
|
|
305
|
-
*
|
|
250
|
+
* Get subreddit feed
|
|
306
251
|
*/
|
|
307
252
|
export const getRedditFeed = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditFeedData, ThrowOnError>) => {
|
|
308
253
|
return (options?.client ?? client).get<GetRedditFeedResponse, GetRedditFeedError, ThrowOnError>({
|
|
@@ -312,7 +257,7 @@ export const getRedditFeed = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
312
257
|
};
|
|
313
258
|
|
|
314
259
|
/**
|
|
315
|
-
* Get plan and usage stats
|
|
260
|
+
* Get plan and usage stats
|
|
316
261
|
*/
|
|
317
262
|
export const getUsageStats = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
318
263
|
return (options?.client ?? client).get<GetUsageStatsResponse, GetUsageStatsError, ThrowOnError>({
|
|
@@ -322,7 +267,7 @@ export const getUsageStats = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
322
267
|
};
|
|
323
268
|
|
|
324
269
|
/**
|
|
325
|
-
* List posts
|
|
270
|
+
* List posts
|
|
326
271
|
* **Getting Post URLs:**
|
|
327
272
|
* For published posts, each platform entry includes `platformPostUrl` with the public URL.
|
|
328
273
|
* Use `status=published` filter to fetch only published posts with their URLs.
|
|
@@ -341,38 +286,24 @@ export const listPosts = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
341
286
|
};
|
|
342
287
|
|
|
343
288
|
/**
|
|
344
|
-
* Create
|
|
289
|
+
* Create post
|
|
345
290
|
* **Getting Post URLs:**
|
|
346
|
-
* -
|
|
347
|
-
* -
|
|
348
|
-
*
|
|
349
|
-
* **Content
|
|
350
|
-
* - `content`
|
|
351
|
-
* -
|
|
352
|
-
*
|
|
353
|
-
*
|
|
354
|
-
* -
|
|
355
|
-
* -
|
|
356
|
-
* -
|
|
357
|
-
*
|
|
358
|
-
*
|
|
359
|
-
* -
|
|
360
|
-
* -
|
|
361
|
-
* -
|
|
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
|
|
291
|
+
* - Immediate posts (`publishNow: true`): response includes `platformPostUrl` in `post.platforms[]`.
|
|
292
|
+
* - Scheduled posts: fetch via `GET /v1/posts/{postId}` after publish time for `platformPostUrl`.
|
|
293
|
+
*
|
|
294
|
+
* **Content requirements:**
|
|
295
|
+
* - `content` is optional when media is attached, all platforms have `customContent`, or posting to YouTube only.
|
|
296
|
+
* - Text-only posts require `content`. Stories ignore captions.
|
|
297
|
+
*
|
|
298
|
+
* **Platform constraints:**
|
|
299
|
+
* - YouTube: video required, optional thumbnail via `MediaItem.thumbnail`
|
|
300
|
+
* - Instagram/TikTok: media required; TikTok cannot mix videos and images
|
|
301
|
+
* - Instagram carousels: up to 10 items; Threads carousels: up to 10 images only
|
|
302
|
+
* - Facebook Stories: single image or video, set `contentType: 'story'`
|
|
303
|
+
* - LinkedIn: up to 20 images or a single PDF (max 100MB)
|
|
304
|
+
* - Pinterest: single image or video, `boardId` required
|
|
305
|
+
* - Bluesky: up to 4 images, auto-recompressed to ~1MB
|
|
306
|
+
* - Snapchat: single image or video, set `contentType` in platformSpecificData
|
|
376
307
|
*
|
|
377
308
|
*/
|
|
378
309
|
export const createPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreatePostData, ThrowOnError>) => {
|
|
@@ -383,7 +314,7 @@ export const createPost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
383
314
|
};
|
|
384
315
|
|
|
385
316
|
/**
|
|
386
|
-
* Get
|
|
317
|
+
* Get post
|
|
387
318
|
* Fetch a single post by ID. For published posts, this returns `platformPostUrl`
|
|
388
319
|
* for each platform - useful for retrieving post URLs after scheduled posts publish.
|
|
389
320
|
*
|
|
@@ -396,7 +327,7 @@ export const getPost = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
396
327
|
};
|
|
397
328
|
|
|
398
329
|
/**
|
|
399
|
-
* Update
|
|
330
|
+
* Update post
|
|
400
331
|
* Update an existing post. Only draft, scheduled, failed, and partial posts can be edited.
|
|
401
332
|
* Published, publishing, and cancelled posts cannot be modified.
|
|
402
333
|
*
|
|
@@ -409,8 +340,9 @@ export const updatePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
409
340
|
};
|
|
410
341
|
|
|
411
342
|
/**
|
|
412
|
-
* Delete
|
|
413
|
-
* Delete a post.
|
|
343
|
+
* Delete post
|
|
344
|
+
* Delete a draft or scheduled post from Late. Only posts that have not been published can be deleted.
|
|
345
|
+
* To remove a published post from a social media platform, use the [Unpublish endpoint](#tag/Posts/operation/unpublishPost) instead.
|
|
414
346
|
* When deleting a scheduled or draft post that consumed upload quota, the quota will be automatically refunded.
|
|
415
347
|
*
|
|
416
348
|
*/
|
|
@@ -422,7 +354,7 @@ export const deletePost = <ThrowOnError extends boolean = false>(options: Option
|
|
|
422
354
|
};
|
|
423
355
|
|
|
424
356
|
/**
|
|
425
|
-
*
|
|
357
|
+
* Bulk upload from CSV
|
|
426
358
|
*/
|
|
427
359
|
export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<BulkUploadPostsData, ThrowOnError>) => {
|
|
428
360
|
return (options?.client ?? client).post<BulkUploadPostsResponse, BulkUploadPostsError, ThrowOnError>({
|
|
@@ -437,7 +369,7 @@ export const bulkUploadPosts = <ThrowOnError extends boolean = false>(options: O
|
|
|
437
369
|
};
|
|
438
370
|
|
|
439
371
|
/**
|
|
440
|
-
* Retry
|
|
372
|
+
* Retry failed post
|
|
441
373
|
*/
|
|
442
374
|
export const retryPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<RetryPostData, ThrowOnError>) => {
|
|
443
375
|
return (options?.client ?? client).post<RetryPostResponse, RetryPostError, ThrowOnError>({
|
|
@@ -447,9 +379,10 @@ export const retryPost = <ThrowOnError extends boolean = false>(options: Options
|
|
|
447
379
|
};
|
|
448
380
|
|
|
449
381
|
/**
|
|
450
|
-
*
|
|
382
|
+
* Unpublish post
|
|
451
383
|
* Permanently deletes a published post from the specified social media platform.
|
|
452
|
-
* The post record in Late is kept but its platform status is
|
|
384
|
+
* The post record in Late is kept but its platform status is updated to "cancelled".
|
|
385
|
+
* This does not delete the post from Late, only from the platform.
|
|
453
386
|
*
|
|
454
387
|
* **Supported platforms:** Threads, Facebook, Twitter/X, LinkedIn, YouTube, Pinterest, Reddit, Bluesky, Google Business, Telegram.
|
|
455
388
|
*
|
|
@@ -472,7 +405,7 @@ export const unpublishPost = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
472
405
|
};
|
|
473
406
|
|
|
474
407
|
/**
|
|
475
|
-
* List
|
|
408
|
+
* List users
|
|
476
409
|
*/
|
|
477
410
|
export const listUsers = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
478
411
|
return (options?.client ?? client).get<ListUsersResponse, ListUsersError, ThrowOnError>({
|
|
@@ -482,7 +415,7 @@ export const listUsers = <ThrowOnError extends boolean = false>(options?: Option
|
|
|
482
415
|
};
|
|
483
416
|
|
|
484
417
|
/**
|
|
485
|
-
* Get user
|
|
418
|
+
* Get user
|
|
486
419
|
*/
|
|
487
420
|
export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetUserData, ThrowOnError>) => {
|
|
488
421
|
return (options?.client ?? client).get<GetUserResponse, GetUserError, ThrowOnError>({
|
|
@@ -492,7 +425,7 @@ export const getUser = <ThrowOnError extends boolean = false>(options: OptionsLe
|
|
|
492
425
|
};
|
|
493
426
|
|
|
494
427
|
/**
|
|
495
|
-
* List profiles
|
|
428
|
+
* List profiles
|
|
496
429
|
* Returns profiles within the user's plan limit. Profiles are sorted by creation date (oldest first).
|
|
497
430
|
* Use `includeOverLimit=true` to include profiles that exceed the plan limit (for management/deletion purposes).
|
|
498
431
|
*
|
|
@@ -505,7 +438,7 @@ export const listProfiles = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
505
438
|
};
|
|
506
439
|
|
|
507
440
|
/**
|
|
508
|
-
* Create
|
|
441
|
+
* Create profile
|
|
509
442
|
*/
|
|
510
443
|
export const createProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateProfileData, ThrowOnError>) => {
|
|
511
444
|
return (options?.client ?? client).post<CreateProfileResponse, CreateProfileError, ThrowOnError>({
|
|
@@ -515,7 +448,7 @@ export const createProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
515
448
|
};
|
|
516
449
|
|
|
517
450
|
/**
|
|
518
|
-
* Get
|
|
451
|
+
* Get profile
|
|
519
452
|
*/
|
|
520
453
|
export const getProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetProfileData, ThrowOnError>) => {
|
|
521
454
|
return (options?.client ?? client).get<GetProfileResponse, GetProfileError, ThrowOnError>({
|
|
@@ -525,7 +458,7 @@ export const getProfile = <ThrowOnError extends boolean = false>(options: Option
|
|
|
525
458
|
};
|
|
526
459
|
|
|
527
460
|
/**
|
|
528
|
-
* Update
|
|
461
|
+
* Update profile
|
|
529
462
|
*/
|
|
530
463
|
export const updateProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateProfileData, ThrowOnError>) => {
|
|
531
464
|
return (options?.client ?? client).put<UpdateProfileResponse, UpdateProfileError, ThrowOnError>({
|
|
@@ -535,7 +468,7 @@ export const updateProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
535
468
|
};
|
|
536
469
|
|
|
537
470
|
/**
|
|
538
|
-
* Delete
|
|
471
|
+
* Delete profile
|
|
539
472
|
*/
|
|
540
473
|
export const deleteProfile = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteProfileData, ThrowOnError>) => {
|
|
541
474
|
return (options?.client ?? client).delete<DeleteProfileResponse, DeleteProfileError, ThrowOnError>({
|
|
@@ -545,7 +478,7 @@ export const deleteProfile = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
545
478
|
};
|
|
546
479
|
|
|
547
480
|
/**
|
|
548
|
-
* List
|
|
481
|
+
* List accounts
|
|
549
482
|
* Returns list of connected social accounts.
|
|
550
483
|
* By default, only returns accounts from profiles within the user's plan limit.
|
|
551
484
|
* Follower count data (followersCount, followersLastUpdated) is only included if user has analytics add-on.
|
|
@@ -559,7 +492,7 @@ export const listAccounts = <ThrowOnError extends boolean = false>(options?: Opt
|
|
|
559
492
|
};
|
|
560
493
|
|
|
561
494
|
/**
|
|
562
|
-
* Get follower stats
|
|
495
|
+
* Get follower stats
|
|
563
496
|
* Returns follower count history and growth metrics for connected social accounts.
|
|
564
497
|
* **Requires analytics add-on subscription.**
|
|
565
498
|
*
|
|
@@ -574,7 +507,7 @@ export const getFollowerStats = <ThrowOnError extends boolean = false>(options?:
|
|
|
574
507
|
};
|
|
575
508
|
|
|
576
509
|
/**
|
|
577
|
-
* Update
|
|
510
|
+
* Update account
|
|
578
511
|
*/
|
|
579
512
|
export const updateAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateAccountData, ThrowOnError>) => {
|
|
580
513
|
return (options?.client ?? client).put<UpdateAccountResponse, UpdateAccountError, ThrowOnError>({
|
|
@@ -584,7 +517,7 @@ export const updateAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
584
517
|
};
|
|
585
518
|
|
|
586
519
|
/**
|
|
587
|
-
* Disconnect
|
|
520
|
+
* Disconnect account
|
|
588
521
|
*/
|
|
589
522
|
export const deleteAccount = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteAccountData, ThrowOnError>) => {
|
|
590
523
|
return (options?.client ?? client).delete<DeleteAccountResponse, DeleteAccountError, ThrowOnError>({
|
|
@@ -594,7 +527,7 @@ export const deleteAccount = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
594
527
|
};
|
|
595
528
|
|
|
596
529
|
/**
|
|
597
|
-
* Check health
|
|
530
|
+
* Check accounts health
|
|
598
531
|
* Returns the health status of all connected social accounts, including token validity,
|
|
599
532
|
* permissions status, and any issues that need attention. Useful for monitoring account
|
|
600
533
|
* connections and identifying accounts that need reconnection.
|
|
@@ -608,7 +541,7 @@ export const getAllAccountsHealth = <ThrowOnError extends boolean = false>(optio
|
|
|
608
541
|
};
|
|
609
542
|
|
|
610
543
|
/**
|
|
611
|
-
* Check health
|
|
544
|
+
* Check account health
|
|
612
545
|
* Returns detailed health information for a specific social account, including token status,
|
|
613
546
|
* granted permissions, missing permissions, and actionable recommendations.
|
|
614
547
|
*
|
|
@@ -621,7 +554,7 @@ export const getAccountHealth = <ThrowOnError extends boolean = false>(options:
|
|
|
621
554
|
};
|
|
622
555
|
|
|
623
556
|
/**
|
|
624
|
-
* List
|
|
557
|
+
* List keys
|
|
625
558
|
*/
|
|
626
559
|
export const listApiKeys = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
627
560
|
return (options?.client ?? client).get<ListApiKeysResponse, ListApiKeysError, ThrowOnError>({
|
|
@@ -631,7 +564,7 @@ export const listApiKeys = <ThrowOnError extends boolean = false>(options?: Opti
|
|
|
631
564
|
};
|
|
632
565
|
|
|
633
566
|
/**
|
|
634
|
-
* Create
|
|
567
|
+
* Create key
|
|
635
568
|
*/
|
|
636
569
|
export const createApiKey = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<CreateApiKeyData, ThrowOnError>) => {
|
|
637
570
|
return (options?.client ?? client).post<CreateApiKeyResponse, CreateApiKeyError, ThrowOnError>({
|
|
@@ -641,7 +574,7 @@ export const createApiKey = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
641
574
|
};
|
|
642
575
|
|
|
643
576
|
/**
|
|
644
|
-
* Delete
|
|
577
|
+
* Delete key
|
|
645
578
|
*/
|
|
646
579
|
export const deleteApiKey = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteApiKeyData, ThrowOnError>) => {
|
|
647
580
|
return (options?.client ?? client).delete<DeleteApiKeyResponse, DeleteApiKeyError, ThrowOnError>({
|
|
@@ -651,7 +584,7 @@ export const deleteApiKey = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
651
584
|
};
|
|
652
585
|
|
|
653
586
|
/**
|
|
654
|
-
* Create
|
|
587
|
+
* Create invite token
|
|
655
588
|
* Generate a secure invite link to grant team members access to your profiles.
|
|
656
589
|
* Invites expire after 7 days and are single-use.
|
|
657
590
|
*
|
|
@@ -664,90 +597,28 @@ export const createInviteToken = <ThrowOnError extends boolean = false>(options:
|
|
|
664
597
|
};
|
|
665
598
|
|
|
666
599
|
/**
|
|
667
|
-
*
|
|
600
|
+
* Get OAuth connect URL
|
|
668
601
|
* Initiate an OAuth connection flow for any supported social media platform.
|
|
669
602
|
*
|
|
670
603
|
* **Standard Flow (Hosted UI):**
|
|
671
|
-
* For Facebook connections, Late hosts the page selection UI:
|
|
672
|
-
*
|
|
673
604
|
* 1. Call this endpoint with your API key and `redirect_url` (optional)
|
|
674
605
|
* 2. Redirect your user to the returned `authUrl`
|
|
675
|
-
* 3. After OAuth,
|
|
676
|
-
*
|
|
677
|
-
* 4. After they pick a page, Late saves the connection and finally redirects to your `redirect_url` (if provided)
|
|
606
|
+
* 3. After OAuth, Late hosts the page/account selection UI
|
|
607
|
+
* 4. Once the user picks, Late saves the connection and redirects to your `redirect_url` (if provided)
|
|
678
608
|
*
|
|
679
|
-
* **Headless
|
|
680
|
-
* Build your own
|
|
609
|
+
* **Headless Mode (Facebook, LinkedIn, Pinterest, Google Business, Snapchat):**
|
|
610
|
+
* Build your own branded selection UI while Late handles OAuth. Add `&headless=true` to this endpoint:
|
|
681
611
|
*
|
|
682
|
-
*
|
|
683
|
-
*
|
|
684
|
-
* `
|
|
685
|
-
*
|
|
686
|
-
*
|
|
687
|
-
*
|
|
688
|
-
*
|
|
689
|
-
*
|
|
690
|
-
*
|
|
691
|
-
*
|
|
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.
|
|
612
|
+
* `GET /v1/connect/{platform}?profileId=PROFILE_ID&redirect_url=https://yourapp.com/callback&headless=true`
|
|
613
|
+
*
|
|
614
|
+
* After OAuth, the user is redirected to your `redirect_url` with OAuth data including `profileId`, `tempToken`, `userProfile`, `connect_token`, `platform`, and a `step` parameter indicating what selection is needed.
|
|
615
|
+
*
|
|
616
|
+
* **Facebook example:**
|
|
617
|
+
* 1. Redirect params include `step=select_page`
|
|
618
|
+
* 2. Use `GET /v1/connect/facebook/select-page` to fetch pages
|
|
619
|
+
* 3. Use `POST /v1/connect/facebook/select-page` to save the selected page
|
|
620
|
+
*
|
|
621
|
+
* LinkedIn, Pinterest, Google Business, and Snapchat follow the same pattern with their respective selection endpoints. LinkedIn uses `pendingDataToken` instead of `tempToken` in redirect params; call `GET /v1/connect/pending-data?token=TOKEN` to retrieve the OAuth data (one-time use, expires in 10 minutes).
|
|
751
622
|
*
|
|
752
623
|
*/
|
|
753
624
|
export const getConnectUrl = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetConnectUrlData, ThrowOnError>) => {
|
|
@@ -758,7 +629,7 @@ export const getConnectUrl = <ThrowOnError extends boolean = false>(options: Opt
|
|
|
758
629
|
};
|
|
759
630
|
|
|
760
631
|
/**
|
|
761
|
-
* Complete OAuth
|
|
632
|
+
* Complete OAuth callback
|
|
762
633
|
*/
|
|
763
634
|
export const handleOAuthCallback = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<HandleOAuthCallbackData, ThrowOnError>) => {
|
|
764
635
|
return (options?.client ?? client).post<HandleOAuthCallbackResponse, HandleOAuthCallbackError, ThrowOnError>({
|
|
@@ -768,7 +639,7 @@ export const handleOAuthCallback = <ThrowOnError extends boolean = false>(option
|
|
|
768
639
|
};
|
|
769
640
|
|
|
770
641
|
/**
|
|
771
|
-
* List Facebook
|
|
642
|
+
* List Facebook pages
|
|
772
643
|
* **Headless Mode for Custom UI**
|
|
773
644
|
*
|
|
774
645
|
* After initiating Facebook OAuth via `/v1/connect/facebook`, you'll be redirected to
|
|
@@ -790,7 +661,7 @@ export const listFacebookPages = <ThrowOnError extends boolean = false>(options:
|
|
|
790
661
|
};
|
|
791
662
|
|
|
792
663
|
/**
|
|
793
|
-
* Select
|
|
664
|
+
* Select Facebook page
|
|
794
665
|
* **Complete the Headless Flow**
|
|
795
666
|
*
|
|
796
667
|
* After displaying your custom UI with the list of pages from the GET endpoint, call this
|
|
@@ -810,7 +681,7 @@ export const selectFacebookPage = <ThrowOnError extends boolean = false>(options
|
|
|
810
681
|
};
|
|
811
682
|
|
|
812
683
|
/**
|
|
813
|
-
* List Google Business
|
|
684
|
+
* List Google Business locations
|
|
814
685
|
* **Headless Mode for Custom UI**
|
|
815
686
|
*
|
|
816
687
|
* After initiating Google Business OAuth via `/v1/connect/googlebusiness?headless=true`, you'll be redirected
|
|
@@ -832,7 +703,7 @@ export const listGoogleBusinessLocations = <ThrowOnError extends boolean = false
|
|
|
832
703
|
};
|
|
833
704
|
|
|
834
705
|
/**
|
|
835
|
-
* Select
|
|
706
|
+
* Select Google Business location
|
|
836
707
|
* **Complete the Headless Flow**
|
|
837
708
|
*
|
|
838
709
|
* After displaying your custom UI with the list of locations from the GET `/v1/connect/googlebusiness/locations`
|
|
@@ -852,7 +723,7 @@ export const selectGoogleBusinessLocation = <ThrowOnError extends boolean = fals
|
|
|
852
723
|
};
|
|
853
724
|
|
|
854
725
|
/**
|
|
855
|
-
* Get
|
|
726
|
+
* Get reviews
|
|
856
727
|
* Fetches reviews for a connected Google Business Profile account.
|
|
857
728
|
*
|
|
858
729
|
* Returns all reviews for the business location, including:
|
|
@@ -873,7 +744,7 @@ export const getGoogleBusinessReviews = <ThrowOnError extends boolean = false>(o
|
|
|
873
744
|
};
|
|
874
745
|
|
|
875
746
|
/**
|
|
876
|
-
* Get
|
|
747
|
+
* Get food menus
|
|
877
748
|
* Fetches food menus for a connected Google Business Profile location.
|
|
878
749
|
*
|
|
879
750
|
* Returns the full menu structure including:
|
|
@@ -893,7 +764,7 @@ export const getGoogleBusinessFoodMenus = <ThrowOnError extends boolean = false>
|
|
|
893
764
|
};
|
|
894
765
|
|
|
895
766
|
/**
|
|
896
|
-
* Update
|
|
767
|
+
* Update food menus
|
|
897
768
|
* Updates the food menus for a connected Google Business Profile location.
|
|
898
769
|
*
|
|
899
770
|
* Send the full menus array. Use `updateMask` for partial updates (e.g. `"menus"` to only update the menus field).
|
|
@@ -909,7 +780,7 @@ export const updateGoogleBusinessFoodMenus = <ThrowOnError extends boolean = fal
|
|
|
909
780
|
};
|
|
910
781
|
|
|
911
782
|
/**
|
|
912
|
-
* Get
|
|
783
|
+
* Get location details
|
|
913
784
|
* Fetches detailed location information including opening hours, special hours,
|
|
914
785
|
* business description, phone numbers, website, categories, and more.
|
|
915
786
|
*
|
|
@@ -924,7 +795,7 @@ export const getGoogleBusinessLocationDetails = <ThrowOnError extends boolean =
|
|
|
924
795
|
};
|
|
925
796
|
|
|
926
797
|
/**
|
|
927
|
-
* Update
|
|
798
|
+
* Update location details
|
|
928
799
|
* Updates location details such as opening hours, special hours, business description, phone, and website.
|
|
929
800
|
*
|
|
930
801
|
* The `updateMask` field is required and specifies which fields to update.
|
|
@@ -946,7 +817,7 @@ export const updateGoogleBusinessLocationDetails = <ThrowOnError extends boolean
|
|
|
946
817
|
};
|
|
947
818
|
|
|
948
819
|
/**
|
|
949
|
-
* List
|
|
820
|
+
* List media
|
|
950
821
|
* Lists media items (photos) for a Google Business Profile location.
|
|
951
822
|
* Returns photo URLs, descriptions, categories, and metadata.
|
|
952
823
|
*
|
|
@@ -959,7 +830,7 @@ export const listGoogleBusinessMedia = <ThrowOnError extends boolean = false>(op
|
|
|
959
830
|
};
|
|
960
831
|
|
|
961
832
|
/**
|
|
962
|
-
* Upload
|
|
833
|
+
* Upload photo
|
|
963
834
|
* Creates a media item (photo) for a location from a publicly accessible URL.
|
|
964
835
|
*
|
|
965
836
|
* Categories determine where the photo appears:
|
|
@@ -983,7 +854,7 @@ export const createGoogleBusinessMedia = <ThrowOnError extends boolean = false>(
|
|
|
983
854
|
};
|
|
984
855
|
|
|
985
856
|
/**
|
|
986
|
-
* Delete
|
|
857
|
+
* Delete photo
|
|
987
858
|
*/
|
|
988
859
|
export const deleteGoogleBusinessMedia = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteGoogleBusinessMediaData, ThrowOnError>) => {
|
|
989
860
|
return (options?.client ?? client).delete<DeleteGoogleBusinessMediaResponse, DeleteGoogleBusinessMediaError, ThrowOnError>({
|
|
@@ -993,7 +864,7 @@ export const deleteGoogleBusinessMedia = <ThrowOnError extends boolean = false>(
|
|
|
993
864
|
};
|
|
994
865
|
|
|
995
866
|
/**
|
|
996
|
-
* Get
|
|
867
|
+
* Get attributes
|
|
997
868
|
* Fetches location attributes such as amenities, services, and accessibility features.
|
|
998
869
|
*
|
|
999
870
|
* Common attributes for restaurants include:
|
|
@@ -1013,7 +884,7 @@ export const getGoogleBusinessAttributes = <ThrowOnError extends boolean = false
|
|
|
1013
884
|
};
|
|
1014
885
|
|
|
1015
886
|
/**
|
|
1016
|
-
* Update
|
|
887
|
+
* Update attributes
|
|
1017
888
|
* Updates location attributes (amenities, services, etc.).
|
|
1018
889
|
*
|
|
1019
890
|
* The `attributeMask` specifies which attributes to update (comma-separated).
|
|
@@ -1027,7 +898,7 @@ export const updateGoogleBusinessAttributes = <ThrowOnError extends boolean = fa
|
|
|
1027
898
|
};
|
|
1028
899
|
|
|
1029
900
|
/**
|
|
1030
|
-
* List
|
|
901
|
+
* List action links
|
|
1031
902
|
* Lists place action links for a Google Business Profile location.
|
|
1032
903
|
*
|
|
1033
904
|
* Place actions are the booking, ordering, and reservation buttons that appear on your listing.
|
|
@@ -1041,7 +912,7 @@ export const listGoogleBusinessPlaceActions = <ThrowOnError extends boolean = fa
|
|
|
1041
912
|
};
|
|
1042
913
|
|
|
1043
914
|
/**
|
|
1044
|
-
* Create
|
|
915
|
+
* Create action link
|
|
1045
916
|
* Creates a place action link for a location.
|
|
1046
917
|
*
|
|
1047
918
|
* Available action types:
|
|
@@ -1062,7 +933,7 @@ export const createGoogleBusinessPlaceAction = <ThrowOnError extends boolean = f
|
|
|
1062
933
|
};
|
|
1063
934
|
|
|
1064
935
|
/**
|
|
1065
|
-
* Delete
|
|
936
|
+
* Delete action link
|
|
1066
937
|
*/
|
|
1067
938
|
export const deleteGoogleBusinessPlaceAction = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteGoogleBusinessPlaceActionData, ThrowOnError>) => {
|
|
1068
939
|
return (options?.client ?? client).delete<DeleteGoogleBusinessPlaceActionResponse, DeleteGoogleBusinessPlaceActionError, ThrowOnError>({
|
|
@@ -1072,7 +943,7 @@ export const deleteGoogleBusinessPlaceAction = <ThrowOnError extends boolean = f
|
|
|
1072
943
|
};
|
|
1073
944
|
|
|
1074
945
|
/**
|
|
1075
|
-
*
|
|
946
|
+
* Get pending OAuth data
|
|
1076
947
|
* **Fetch Pending OAuth Data for Headless Mode**
|
|
1077
948
|
*
|
|
1078
949
|
* In headless mode, platforms like LinkedIn store OAuth selection data (organizations, pages, etc.)
|
|
@@ -1095,7 +966,7 @@ export const getPendingOAuthData = <ThrowOnError extends boolean = false>(option
|
|
|
1095
966
|
};
|
|
1096
967
|
|
|
1097
968
|
/**
|
|
1098
|
-
*
|
|
969
|
+
* List LinkedIn orgs
|
|
1099
970
|
* **Fetch Full Organization Details for Custom UI**
|
|
1100
971
|
*
|
|
1101
972
|
* After LinkedIn OAuth in headless mode, the redirect URL contains organization data with only
|
|
@@ -1116,7 +987,7 @@ export const listLinkedInOrganizations = <ThrowOnError extends boolean = false>(
|
|
|
1116
987
|
};
|
|
1117
988
|
|
|
1118
989
|
/**
|
|
1119
|
-
* Select LinkedIn
|
|
990
|
+
* Select LinkedIn org
|
|
1120
991
|
* **Complete the LinkedIn Connection Flow**
|
|
1121
992
|
*
|
|
1122
993
|
* After OAuth, the user is redirected with `organizations` in the URL params (if they have org admin access).
|
|
@@ -1140,7 +1011,7 @@ export const selectLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
1140
1011
|
};
|
|
1141
1012
|
|
|
1142
1013
|
/**
|
|
1143
|
-
* List Pinterest
|
|
1014
|
+
* List Pinterest boards
|
|
1144
1015
|
* **Retrieve Pinterest Boards for Selection UI**
|
|
1145
1016
|
*
|
|
1146
1017
|
* After initiating Pinterest OAuth via `/v1/connect/pinterest` with `headless=true`, you'll be redirected to
|
|
@@ -1161,7 +1032,7 @@ export const listPinterestBoardsForSelection = <ThrowOnError extends boolean = f
|
|
|
1161
1032
|
};
|
|
1162
1033
|
|
|
1163
1034
|
/**
|
|
1164
|
-
* Select
|
|
1035
|
+
* Select Pinterest board
|
|
1165
1036
|
* **Complete the Pinterest Connection Flow**
|
|
1166
1037
|
*
|
|
1167
1038
|
* After OAuth, use this endpoint to save the selected board and complete the Pinterest account connection.
|
|
@@ -1177,7 +1048,7 @@ export const selectPinterestBoard = <ThrowOnError extends boolean = false>(optio
|
|
|
1177
1048
|
};
|
|
1178
1049
|
|
|
1179
1050
|
/**
|
|
1180
|
-
* List Snapchat
|
|
1051
|
+
* List Snapchat profiles
|
|
1181
1052
|
* **Headless Mode for Custom UI**
|
|
1182
1053
|
*
|
|
1183
1054
|
* After initiating Snapchat OAuth via `/v1/connect/snapchat?headless=true`, you'll be redirected to
|
|
@@ -1198,7 +1069,7 @@ export const listSnapchatProfiles = <ThrowOnError extends boolean = false>(optio
|
|
|
1198
1069
|
};
|
|
1199
1070
|
|
|
1200
1071
|
/**
|
|
1201
|
-
* Select
|
|
1072
|
+
* Select Snapchat profile
|
|
1202
1073
|
* **Complete the Snapchat Connection Flow**
|
|
1203
1074
|
*
|
|
1204
1075
|
* After OAuth, use this endpoint to save the selected Public Profile and complete the Snapchat account connection.
|
|
@@ -1226,7 +1097,7 @@ export const selectSnapchatProfile = <ThrowOnError extends boolean = false>(opti
|
|
|
1226
1097
|
};
|
|
1227
1098
|
|
|
1228
1099
|
/**
|
|
1229
|
-
* Connect Bluesky
|
|
1100
|
+
* Connect Bluesky account
|
|
1230
1101
|
* Connect a Bluesky account using identifier (handle or email) and an app password.
|
|
1231
1102
|
*
|
|
1232
1103
|
* To get your userId for the state parameter, call `GET /v1/users` - the response includes a `currentUserId` field.
|
|
@@ -1240,7 +1111,7 @@ export const connectBlueskyCredentials = <ThrowOnError extends boolean = false>(
|
|
|
1240
1111
|
};
|
|
1241
1112
|
|
|
1242
1113
|
/**
|
|
1243
|
-
* Generate Telegram
|
|
1114
|
+
* Generate Telegram code
|
|
1244
1115
|
* Generate a unique access code for connecting a Telegram channel or group.
|
|
1245
1116
|
*
|
|
1246
1117
|
* **Connection Flow:**
|
|
@@ -1261,7 +1132,7 @@ export const getTelegramConnectStatus = <ThrowOnError extends boolean = false>(o
|
|
|
1261
1132
|
};
|
|
1262
1133
|
|
|
1263
1134
|
/**
|
|
1264
|
-
*
|
|
1135
|
+
* Connect Telegram directly
|
|
1265
1136
|
* Connect a Telegram channel/group directly using the chat ID.
|
|
1266
1137
|
*
|
|
1267
1138
|
* This is an alternative to the access code flow for power users who know their Telegram chat ID.
|
|
@@ -1276,7 +1147,7 @@ export const initiateTelegramConnect = <ThrowOnError extends boolean = false>(op
|
|
|
1276
1147
|
};
|
|
1277
1148
|
|
|
1278
1149
|
/**
|
|
1279
|
-
* Check Telegram
|
|
1150
|
+
* Check Telegram status
|
|
1280
1151
|
* Poll this endpoint to check if a Telegram access code has been used to connect a channel/group.
|
|
1281
1152
|
*
|
|
1282
1153
|
* **Recommended polling interval:** 3 seconds
|
|
@@ -1295,7 +1166,7 @@ export const completeTelegramConnect = <ThrowOnError extends boolean = false>(op
|
|
|
1295
1166
|
};
|
|
1296
1167
|
|
|
1297
1168
|
/**
|
|
1298
|
-
* List
|
|
1169
|
+
* List Facebook pages
|
|
1299
1170
|
* Returns all Facebook pages the connected account has access to, including the currently selected page.
|
|
1300
1171
|
*/
|
|
1301
1172
|
export const getFacebookPages = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetFacebookPagesData, ThrowOnError>) => {
|
|
@@ -1306,7 +1177,7 @@ export const getFacebookPages = <ThrowOnError extends boolean = false>(options:
|
|
|
1306
1177
|
};
|
|
1307
1178
|
|
|
1308
1179
|
/**
|
|
1309
|
-
* Update
|
|
1180
|
+
* Update Facebook page
|
|
1310
1181
|
*/
|
|
1311
1182
|
export const updateFacebookPage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateFacebookPageData, ThrowOnError>) => {
|
|
1312
1183
|
return (options?.client ?? client).put<UpdateFacebookPageResponse, UpdateFacebookPageError, ThrowOnError>({
|
|
@@ -1316,7 +1187,7 @@ export const updateFacebookPage = <ThrowOnError extends boolean = false>(options
|
|
|
1316
1187
|
};
|
|
1317
1188
|
|
|
1318
1189
|
/**
|
|
1319
|
-
*
|
|
1190
|
+
* List LinkedIn orgs
|
|
1320
1191
|
*/
|
|
1321
1192
|
export const getLinkedInOrganizations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInOrganizationsData, ThrowOnError>) => {
|
|
1322
1193
|
return (options?.client ?? client).get<GetLinkedInOrganizationsResponse, GetLinkedInOrganizationsError, ThrowOnError>({
|
|
@@ -1326,32 +1197,12 @@ export const getLinkedInOrganizations = <ThrowOnError extends boolean = false>(o
|
|
|
1326
1197
|
};
|
|
1327
1198
|
|
|
1328
1199
|
/**
|
|
1329
|
-
* Get
|
|
1330
|
-
* Returns aggregate analytics across
|
|
1331
|
-
* Uses LinkedIn's `memberCreatorPostAnalytics` API with `q=me` finder.
|
|
1332
|
-
*
|
|
1333
|
-
* **Important:** This endpoint only works for LinkedIn **personal** accounts. Organization accounts should use the standard `/v1/analytics` endpoint for per-post analytics.
|
|
1200
|
+
* Get LinkedIn aggregate stats
|
|
1201
|
+
* Returns aggregate analytics across all posts for a LinkedIn personal account. Organization accounts should use `/v1/analytics` instead.
|
|
1334
1202
|
*
|
|
1335
|
-
* **Required
|
|
1203
|
+
* **Required scope:** `r_member_postAnalytics`. Missing scope returns 403 with reconnect instructions.
|
|
1336
1204
|
*
|
|
1337
|
-
*
|
|
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.
|
|
1205
|
+
* **Aggregation:** `TOTAL` (default, lifetime totals) or `DAILY` (time series). Use `startDate`/`endDate` to filter by date range. Note: `MEMBERS_REACHED` is not available with `DAILY` aggregation.
|
|
1355
1206
|
*
|
|
1356
1207
|
*/
|
|
1357
1208
|
export const getLinkedInAggregateAnalytics = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInAggregateAnalyticsData, ThrowOnError>) => {
|
|
@@ -1362,7 +1213,7 @@ export const getLinkedInAggregateAnalytics = <ThrowOnError extends boolean = fal
|
|
|
1362
1213
|
};
|
|
1363
1214
|
|
|
1364
1215
|
/**
|
|
1365
|
-
* Get
|
|
1216
|
+
* Get LinkedIn post stats
|
|
1366
1217
|
* Returns analytics for a specific LinkedIn post using its URN.
|
|
1367
1218
|
* Works for both personal and organization accounts.
|
|
1368
1219
|
*
|
|
@@ -1389,7 +1240,7 @@ export const getLinkedInPostAnalytics = <ThrowOnError extends boolean = false>(o
|
|
|
1389
1240
|
};
|
|
1390
1241
|
|
|
1391
1242
|
/**
|
|
1392
|
-
* Switch LinkedIn account type
|
|
1243
|
+
* Switch LinkedIn account type
|
|
1393
1244
|
*/
|
|
1394
1245
|
export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateLinkedInOrganizationData, ThrowOnError>) => {
|
|
1395
1246
|
return (options?.client ?? client).put<UpdateLinkedInOrganizationResponse, UpdateLinkedInOrganizationError, ThrowOnError>({
|
|
@@ -1399,28 +1250,14 @@ export const updateLinkedInOrganization = <ThrowOnError extends boolean = false>
|
|
|
1399
1250
|
};
|
|
1400
1251
|
|
|
1401
1252
|
/**
|
|
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`
|
|
1253
|
+
* Resolve LinkedIn mention
|
|
1254
|
+
* 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 organization mentions (`linkedin.com/company/name` or `company/name`).
|
|
1408
1255
|
*
|
|
1409
|
-
*
|
|
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.
|
|
1256
|
+
* Person mentions require the connected account to have admin access to at least one LinkedIn Organization. Organization mentions work with any account.
|
|
1412
1257
|
*
|
|
1413
|
-
*
|
|
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
|
|
1258
|
+
* For person mentions to be clickable, provide the `displayName` parameter matching the exact name on their LinkedIn profile. Organization names are fetched automatically.
|
|
1417
1259
|
*
|
|
1418
|
-
*
|
|
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
|
-
* ```
|
|
1260
|
+
* Use the returned `mentionFormat` value directly in your post content.
|
|
1424
1261
|
*
|
|
1425
1262
|
*/
|
|
1426
1263
|
export const getLinkedInMentions = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetLinkedInMentionsData, ThrowOnError>) => {
|
|
@@ -1431,7 +1268,7 @@ export const getLinkedInMentions = <ThrowOnError extends boolean = false>(option
|
|
|
1431
1268
|
};
|
|
1432
1269
|
|
|
1433
1270
|
/**
|
|
1434
|
-
* List Pinterest boards
|
|
1271
|
+
* List Pinterest boards
|
|
1435
1272
|
*/
|
|
1436
1273
|
export const getPinterestBoards = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetPinterestBoardsData, ThrowOnError>) => {
|
|
1437
1274
|
return (options?.client ?? client).get<GetPinterestBoardsResponse, GetPinterestBoardsError, ThrowOnError>({
|
|
@@ -1441,7 +1278,7 @@ export const getPinterestBoards = <ThrowOnError extends boolean = false>(options
|
|
|
1441
1278
|
};
|
|
1442
1279
|
|
|
1443
1280
|
/**
|
|
1444
|
-
* Set default Pinterest board
|
|
1281
|
+
* Set default Pinterest board
|
|
1445
1282
|
*/
|
|
1446
1283
|
export const updatePinterestBoards = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdatePinterestBoardsData, ThrowOnError>) => {
|
|
1447
1284
|
return (options?.client ?? client).put<UpdatePinterestBoardsResponse, UpdatePinterestBoardsError, ThrowOnError>({
|
|
@@ -1451,7 +1288,7 @@ export const updatePinterestBoards = <ThrowOnError extends boolean = false>(opti
|
|
|
1451
1288
|
};
|
|
1452
1289
|
|
|
1453
1290
|
/**
|
|
1454
|
-
* List
|
|
1291
|
+
* List Google Business locations
|
|
1455
1292
|
* Returns all Google Business Profile locations the connected account has access to, including the currently selected location.
|
|
1456
1293
|
*/
|
|
1457
1294
|
export const getGmbLocations = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetGmbLocationsData, ThrowOnError>) => {
|
|
@@ -1462,7 +1299,7 @@ export const getGmbLocations = <ThrowOnError extends boolean = false>(options: O
|
|
|
1462
1299
|
};
|
|
1463
1300
|
|
|
1464
1301
|
/**
|
|
1465
|
-
* Update
|
|
1302
|
+
* Update Google Business location
|
|
1466
1303
|
*/
|
|
1467
1304
|
export const updateGmbLocation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateGmbLocationData, ThrowOnError>) => {
|
|
1468
1305
|
return (options?.client ?? client).put<UpdateGmbLocationResponse, UpdateGmbLocationError, ThrowOnError>({
|
|
@@ -1472,7 +1309,7 @@ export const updateGmbLocation = <ThrowOnError extends boolean = false>(options:
|
|
|
1472
1309
|
};
|
|
1473
1310
|
|
|
1474
1311
|
/**
|
|
1475
|
-
* List Reddit subreddits
|
|
1312
|
+
* List Reddit subreddits
|
|
1476
1313
|
*/
|
|
1477
1314
|
export const getRedditSubreddits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditSubredditsData, ThrowOnError>) => {
|
|
1478
1315
|
return (options?.client ?? client).get<GetRedditSubredditsResponse, GetRedditSubredditsError, ThrowOnError>({
|
|
@@ -1482,7 +1319,7 @@ export const getRedditSubreddits = <ThrowOnError extends boolean = false>(option
|
|
|
1482
1319
|
};
|
|
1483
1320
|
|
|
1484
1321
|
/**
|
|
1485
|
-
* Set default subreddit
|
|
1322
|
+
* Set default subreddit
|
|
1486
1323
|
*/
|
|
1487
1324
|
export const updateRedditSubreddits = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<UpdateRedditSubredditsData, ThrowOnError>) => {
|
|
1488
1325
|
return (options?.client ?? client).put<UpdateRedditSubredditsResponse, UpdateRedditSubredditsError, ThrowOnError>({
|
|
@@ -1492,7 +1329,7 @@ export const updateRedditSubreddits = <ThrowOnError extends boolean = false>(opt
|
|
|
1492
1329
|
};
|
|
1493
1330
|
|
|
1494
1331
|
/**
|
|
1495
|
-
* List
|
|
1332
|
+
* List subreddit flairs
|
|
1496
1333
|
*/
|
|
1497
1334
|
export const getRedditFlairs = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetRedditFlairsData, ThrowOnError>) => {
|
|
1498
1335
|
return (options?.client ?? client).get<GetRedditFlairsResponse, GetRedditFlairsError, ThrowOnError>({
|
|
@@ -1502,7 +1339,7 @@ export const getRedditFlairs = <ThrowOnError extends boolean = false>(options: O
|
|
|
1502
1339
|
};
|
|
1503
1340
|
|
|
1504
1341
|
/**
|
|
1505
|
-
*
|
|
1342
|
+
* List schedules
|
|
1506
1343
|
* Retrieve queue schedules for a profile. Each profile can have multiple queues.
|
|
1507
1344
|
* - Without `all=true`: Returns the default queue (or specific queue if queueId provided)
|
|
1508
1345
|
* - With `all=true`: Returns all queues for the profile
|
|
@@ -1516,7 +1353,7 @@ export const listQueueSlots = <ThrowOnError extends boolean = false>(options: Op
|
|
|
1516
1353
|
};
|
|
1517
1354
|
|
|
1518
1355
|
/**
|
|
1519
|
-
* Create
|
|
1356
|
+
* Create schedule
|
|
1520
1357
|
* Create an additional queue for a profile. The first queue created becomes the default.
|
|
1521
1358
|
* Subsequent queues are non-default unless explicitly set.
|
|
1522
1359
|
*
|
|
@@ -1529,7 +1366,7 @@ export const createQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1529
1366
|
};
|
|
1530
1367
|
|
|
1531
1368
|
/**
|
|
1532
|
-
*
|
|
1369
|
+
* Update schedule
|
|
1533
1370
|
* Create a new queue or update an existing one.
|
|
1534
1371
|
* - Without queueId: Creates or updates the default queue
|
|
1535
1372
|
* - With queueId: Updates the specific queue
|
|
@@ -1544,7 +1381,7 @@ export const updateQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1544
1381
|
};
|
|
1545
1382
|
|
|
1546
1383
|
/**
|
|
1547
|
-
* Delete
|
|
1384
|
+
* Delete schedule
|
|
1548
1385
|
* Delete a queue from a profile. Requires queueId to specify which queue to delete.
|
|
1549
1386
|
* If deleting the default queue, another queue will be promoted to default.
|
|
1550
1387
|
*
|
|
@@ -1557,7 +1394,7 @@ export const deleteQueueSlot = <ThrowOnError extends boolean = false>(options: O
|
|
|
1557
1394
|
};
|
|
1558
1395
|
|
|
1559
1396
|
/**
|
|
1560
|
-
* Preview upcoming
|
|
1397
|
+
* Preview upcoming slots
|
|
1561
1398
|
*/
|
|
1562
1399
|
export const previewQueue = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<PreviewQueueData, ThrowOnError>) => {
|
|
1563
1400
|
return (options?.client ?? client).get<PreviewQueueResponse, PreviewQueueError, ThrowOnError>({
|
|
@@ -1567,7 +1404,7 @@ export const previewQueue = <ThrowOnError extends boolean = false>(options: Opti
|
|
|
1567
1404
|
};
|
|
1568
1405
|
|
|
1569
1406
|
/**
|
|
1570
|
-
*
|
|
1407
|
+
* Get next available slot
|
|
1571
1408
|
* Returns the next available queue slot for preview/informational purposes.
|
|
1572
1409
|
*
|
|
1573
1410
|
* **Important: To schedule a post to the queue, do NOT use this endpoint's response
|
|
@@ -1593,7 +1430,7 @@ export const getNextQueueSlot = <ThrowOnError extends boolean = false>(options:
|
|
|
1593
1430
|
};
|
|
1594
1431
|
|
|
1595
1432
|
/**
|
|
1596
|
-
* List
|
|
1433
|
+
* List webhooks
|
|
1597
1434
|
* Retrieve all configured webhooks for the authenticated user. Supports up to 10 webhooks per user.
|
|
1598
1435
|
*/
|
|
1599
1436
|
export const getWebhookSettings = <ThrowOnError extends boolean = false>(options?: OptionsLegacyParser<unknown, ThrowOnError>) => {
|
|
@@ -1604,7 +1441,7 @@ export const getWebhookSettings = <ThrowOnError extends boolean = false>(options
|
|
|
1604
1441
|
};
|
|
1605
1442
|
|
|
1606
1443
|
/**
|
|
1607
|
-
* Create
|
|
1444
|
+
* Create webhook
|
|
1608
1445
|
* Create a new webhook configuration. Maximum 10 webhooks per user.
|
|
1609
1446
|
*
|
|
1610
1447
|
* **Note:** Webhooks are automatically disabled after 10 consecutive delivery failures.
|
|
@@ -1618,7 +1455,7 @@ export const createWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
1618
1455
|
};
|
|
1619
1456
|
|
|
1620
1457
|
/**
|
|
1621
|
-
* Update
|
|
1458
|
+
* Update webhook
|
|
1622
1459
|
* Update an existing webhook configuration. All fields except `_id` are optional - only provided fields will be updated.
|
|
1623
1460
|
*
|
|
1624
1461
|
* **Note:** Webhooks are automatically disabled after 10 consecutive delivery failures.
|
|
@@ -1632,7 +1469,7 @@ export const updateWebhookSettings = <ThrowOnError extends boolean = false>(opti
|
|
|
1632
1469
|
};
|
|
1633
1470
|
|
|
1634
1471
|
/**
|
|
1635
|
-
* Delete
|
|
1472
|
+
* Delete webhook
|
|
1636
1473
|
* Permanently delete a webhook configuration.
|
|
1637
1474
|
*/
|
|
1638
1475
|
export const deleteWebhookSettings = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteWebhookSettingsData, ThrowOnError>) => {
|
|
@@ -1656,7 +1493,7 @@ export const testWebhook = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
1656
1493
|
};
|
|
1657
1494
|
|
|
1658
1495
|
/**
|
|
1659
|
-
* Get
|
|
1496
|
+
* Get delivery logs
|
|
1660
1497
|
* Retrieve webhook delivery history. Logs are automatically deleted after 7 days.
|
|
1661
1498
|
*
|
|
1662
1499
|
*/
|
|
@@ -1669,7 +1506,7 @@ export const getWebhookLogs = <ThrowOnError extends boolean = false>(options?: O
|
|
|
1669
1506
|
|
|
1670
1507
|
/**
|
|
1671
1508
|
* @deprecated
|
|
1672
|
-
*
|
|
1509
|
+
* List publishing logs (deprecated)
|
|
1673
1510
|
* **Deprecated:** Use `/v1/posts/logs` instead. This endpoint is maintained for backwards compatibility.
|
|
1674
1511
|
*
|
|
1675
1512
|
* Retrieve publishing logs for all posts. Logs show detailed information about each
|
|
@@ -1691,7 +1528,7 @@ export const listLogs = <ThrowOnError extends boolean = false>(options?: Options
|
|
|
1691
1528
|
};
|
|
1692
1529
|
|
|
1693
1530
|
/**
|
|
1694
|
-
* Get
|
|
1531
|
+
* Get log entry
|
|
1695
1532
|
* Retrieve detailed information about a specific log entry, including full request
|
|
1696
1533
|
* and response bodies for debugging.
|
|
1697
1534
|
*
|
|
@@ -1704,7 +1541,7 @@ export const getLog = <ThrowOnError extends boolean = false>(options: OptionsLeg
|
|
|
1704
1541
|
};
|
|
1705
1542
|
|
|
1706
1543
|
/**
|
|
1707
|
-
*
|
|
1544
|
+
* List publishing logs
|
|
1708
1545
|
* Retrieve publishing logs for all posts. Logs show detailed information about each
|
|
1709
1546
|
* publishing attempt including API requests, responses, and timing data.
|
|
1710
1547
|
*
|
|
@@ -1724,7 +1561,7 @@ export const listPostsLogs = <ThrowOnError extends boolean = false>(options?: Op
|
|
|
1724
1561
|
};
|
|
1725
1562
|
|
|
1726
1563
|
/**
|
|
1727
|
-
*
|
|
1564
|
+
* List connection logs
|
|
1728
1565
|
* Retrieve connection event logs showing account connection and disconnection history.
|
|
1729
1566
|
* Useful for debugging OAuth issues and tracking account lifecycle.
|
|
1730
1567
|
*
|
|
@@ -1746,7 +1583,7 @@ export const listConnectionLogs = <ThrowOnError extends boolean = false>(options
|
|
|
1746
1583
|
};
|
|
1747
1584
|
|
|
1748
1585
|
/**
|
|
1749
|
-
* Get logs
|
|
1586
|
+
* Get post logs
|
|
1750
1587
|
* Retrieve all publishing logs for a specific post. Shows the complete history
|
|
1751
1588
|
* of publishing attempts for that post across all platforms.
|
|
1752
1589
|
*
|
|
@@ -1759,7 +1596,7 @@ export const getPostLogs = <ThrowOnError extends boolean = false>(options: Optio
|
|
|
1759
1596
|
};
|
|
1760
1597
|
|
|
1761
1598
|
/**
|
|
1762
|
-
* List conversations
|
|
1599
|
+
* List conversations
|
|
1763
1600
|
* Fetch conversations (DMs) from all connected messaging accounts in a single API call.
|
|
1764
1601
|
* Supports filtering by profile and platform. Results are aggregated and deduplicated.
|
|
1765
1602
|
*
|
|
@@ -1774,7 +1611,7 @@ export const listInboxConversations = <ThrowOnError extends boolean = false>(opt
|
|
|
1774
1611
|
};
|
|
1775
1612
|
|
|
1776
1613
|
/**
|
|
1777
|
-
* Get conversation
|
|
1614
|
+
* Get conversation
|
|
1778
1615
|
* Retrieve details and metadata for a specific conversation. Requires accountId query parameter.
|
|
1779
1616
|
*/
|
|
1780
1617
|
export const getInboxConversation = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxConversationData, ThrowOnError>) => {
|
|
@@ -1796,7 +1633,7 @@ export const updateInboxConversation = <ThrowOnError extends boolean = false>(op
|
|
|
1796
1633
|
};
|
|
1797
1634
|
|
|
1798
1635
|
/**
|
|
1799
|
-
*
|
|
1636
|
+
* List messages
|
|
1800
1637
|
* Fetch messages for a specific conversation. Requires accountId query parameter.
|
|
1801
1638
|
*/
|
|
1802
1639
|
export const getInboxConversationMessages = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxConversationMessagesData, ThrowOnError>) => {
|
|
@@ -1807,7 +1644,7 @@ export const getInboxConversationMessages = <ThrowOnError extends boolean = fals
|
|
|
1807
1644
|
};
|
|
1808
1645
|
|
|
1809
1646
|
/**
|
|
1810
|
-
* Send
|
|
1647
|
+
* Send message
|
|
1811
1648
|
* Send a message in a conversation. Supports text, attachments, quick replies, buttons, carousels, and message tags.
|
|
1812
1649
|
*
|
|
1813
1650
|
* **Attachment support by platform:**
|
|
@@ -1815,21 +1652,9 @@ export const getInboxConversationMessages = <ThrowOnError extends boolean = fals
|
|
|
1815
1652
|
* - Facebook Messenger: Images, videos, audio, files
|
|
1816
1653
|
* - Instagram: Images, videos, audio via URL (8MB images, 25MB video/audio)
|
|
1817
1654
|
* - 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 |
|
|
1655
|
+
* - Bluesky/Reddit: Not supported
|
|
1831
1656
|
*
|
|
1832
|
-
*
|
|
1657
|
+
* **Interactive messages:** Supports quick replies, buttons, templates, and reply markup. Feature availability varies by platform (Instagram, Facebook, Telegram). Unsupported fields are silently ignored.
|
|
1833
1658
|
*
|
|
1834
1659
|
*/
|
|
1835
1660
|
export const sendInboxMessage = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<SendInboxMessageData, ThrowOnError>) => {
|
|
@@ -1840,7 +1665,7 @@ export const sendInboxMessage = <ThrowOnError extends boolean = false>(options:
|
|
|
1840
1665
|
};
|
|
1841
1666
|
|
|
1842
1667
|
/**
|
|
1843
|
-
* Edit
|
|
1668
|
+
* Edit message
|
|
1844
1669
|
* Edit the text and/or reply markup of a previously sent Telegram message.
|
|
1845
1670
|
* Only supported for Telegram. Returns 400 for other platforms.
|
|
1846
1671
|
*
|
|
@@ -1949,7 +1774,7 @@ export const deleteTelegramCommands = <ThrowOnError extends boolean = false>(opt
|
|
|
1949
1774
|
};
|
|
1950
1775
|
|
|
1951
1776
|
/**
|
|
1952
|
-
* List posts
|
|
1777
|
+
* List commented posts
|
|
1953
1778
|
* Fetch posts with their comment counts from all connected accounts.
|
|
1954
1779
|
* Aggregates data from multiple accounts in a single API call.
|
|
1955
1780
|
*
|
|
@@ -1964,7 +1789,7 @@ export const listInboxComments = <ThrowOnError extends boolean = false>(options?
|
|
|
1964
1789
|
};
|
|
1965
1790
|
|
|
1966
1791
|
/**
|
|
1967
|
-
* Get comments
|
|
1792
|
+
* Get post comments
|
|
1968
1793
|
* Fetch comments for a specific post. Requires accountId query parameter.
|
|
1969
1794
|
*/
|
|
1970
1795
|
export const getInboxPostComments = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<GetInboxPostCommentsData, ThrowOnError>) => {
|
|
@@ -1975,7 +1800,7 @@ export const getInboxPostComments = <ThrowOnError extends boolean = false>(optio
|
|
|
1975
1800
|
};
|
|
1976
1801
|
|
|
1977
1802
|
/**
|
|
1978
|
-
* Reply to
|
|
1803
|
+
* Reply to comment
|
|
1979
1804
|
* Post a reply to a post or specific comment. Requires accountId in request body.
|
|
1980
1805
|
*/
|
|
1981
1806
|
export const replyToInboxPost = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReplyToInboxPostData, ThrowOnError>) => {
|
|
@@ -1986,7 +1811,7 @@ export const replyToInboxPost = <ThrowOnError extends boolean = false>(options:
|
|
|
1986
1811
|
};
|
|
1987
1812
|
|
|
1988
1813
|
/**
|
|
1989
|
-
* Delete
|
|
1814
|
+
* Delete comment
|
|
1990
1815
|
* Delete a comment on a post. Supported by Facebook, Instagram, Bluesky, Reddit, YouTube, LinkedIn, and TikTok.
|
|
1991
1816
|
* Requires accountId and commentId query parameters.
|
|
1992
1817
|
*
|
|
@@ -1999,7 +1824,7 @@ export const deleteInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
1999
1824
|
};
|
|
2000
1825
|
|
|
2001
1826
|
/**
|
|
2002
|
-
* Hide
|
|
1827
|
+
* Hide comment
|
|
2003
1828
|
* Hide a comment on a post. Supported by Facebook, Instagram, and Threads.
|
|
2004
1829
|
* Hidden comments are only visible to the commenter and page admin.
|
|
2005
1830
|
*
|
|
@@ -2012,7 +1837,7 @@ export const hideInboxComment = <ThrowOnError extends boolean = false>(options:
|
|
|
2012
1837
|
};
|
|
2013
1838
|
|
|
2014
1839
|
/**
|
|
2015
|
-
* Unhide
|
|
1840
|
+
* Unhide comment
|
|
2016
1841
|
* Unhide a previously hidden comment. Supported by Facebook, Instagram, and Threads.
|
|
2017
1842
|
*
|
|
2018
1843
|
*/
|
|
@@ -2024,7 +1849,7 @@ export const unhideInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
2024
1849
|
};
|
|
2025
1850
|
|
|
2026
1851
|
/**
|
|
2027
|
-
* Like
|
|
1852
|
+
* Like comment
|
|
2028
1853
|
* Like or upvote a comment on a post.
|
|
2029
1854
|
*
|
|
2030
1855
|
* **Supported platforms:** Facebook, Twitter/X, Bluesky, Reddit
|
|
@@ -2040,7 +1865,7 @@ export const likeInboxComment = <ThrowOnError extends boolean = false>(options:
|
|
|
2040
1865
|
};
|
|
2041
1866
|
|
|
2042
1867
|
/**
|
|
2043
|
-
* Unlike
|
|
1868
|
+
* Unlike comment
|
|
2044
1869
|
* Remove a like from a comment.
|
|
2045
1870
|
*
|
|
2046
1871
|
* **Supported platforms:** Facebook, Twitter/X, Bluesky, Reddit
|
|
@@ -2056,7 +1881,7 @@ export const unlikeInboxComment = <ThrowOnError extends boolean = false>(options
|
|
|
2056
1881
|
};
|
|
2057
1882
|
|
|
2058
1883
|
/**
|
|
2059
|
-
* Send private reply
|
|
1884
|
+
* Send private reply
|
|
2060
1885
|
* Send a private direct message to the author of a comment on your post.
|
|
2061
1886
|
* This is useful for handling customer inquiries or sensitive matters privately.
|
|
2062
1887
|
*
|
|
@@ -2081,7 +1906,7 @@ export const sendPrivateReplyToComment = <ThrowOnError extends boolean = false>(
|
|
|
2081
1906
|
};
|
|
2082
1907
|
|
|
2083
1908
|
/**
|
|
2084
|
-
* List reviews
|
|
1909
|
+
* List reviews
|
|
2085
1910
|
* Fetch reviews from all connected Facebook Pages and Google Business accounts.
|
|
2086
1911
|
* Aggregates data with filtering and sorting options.
|
|
2087
1912
|
*
|
|
@@ -2096,7 +1921,7 @@ export const listInboxReviews = <ThrowOnError extends boolean = false>(options?:
|
|
|
2096
1921
|
};
|
|
2097
1922
|
|
|
2098
1923
|
/**
|
|
2099
|
-
* Reply to
|
|
1924
|
+
* Reply to review
|
|
2100
1925
|
* Post a reply to a review. Requires accountId in request body.
|
|
2101
1926
|
*/
|
|
2102
1927
|
export const replyToInboxReview = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<ReplyToInboxReviewData, ThrowOnError>) => {
|
|
@@ -2107,7 +1932,7 @@ export const replyToInboxReview = <ThrowOnError extends boolean = false>(options
|
|
|
2107
1932
|
};
|
|
2108
1933
|
|
|
2109
1934
|
/**
|
|
2110
|
-
* Delete
|
|
1935
|
+
* Delete review reply
|
|
2111
1936
|
* Delete a reply to a review (Google Business only). Requires accountId in request body.
|
|
2112
1937
|
*/
|
|
2113
1938
|
export const deleteInboxReviewReply = <ThrowOnError extends boolean = false>(options: OptionsLegacyParser<DeleteInboxReviewReplyData, ThrowOnError>) => {
|