Social
Social connections, publications, comments, replies, and engagement sync
The Social module manages connected publishing destinations, scheduled publications, synced comments, comment threads, replies, classification, and engagement metrics.
Social connections use the dedicated Social API. Store deploy hooks, payments, and managed shipping use their own SDK surfaces.
Social Connections
GET
/v1/stores/{storeId}/social-connections/capabilities SDK:
sdk.social.connection.getCapabilities() GET
/v1/stores/{storeId}/social-connections SDK:
sdk.social.connection.list() POST
/v1/stores/{storeId}/social-connections/oauth/connect SDK:
sdk.social.connection.connect() DELETE
/v1/stores/{storeId}/social-connections/{id} SDK:
sdk.social.connection.delete() const capabilities = await sdk.social.connection.getCapabilities();
const { authorization_url } = await sdk.social.connection.connect({
type: "instagram_business",
});
const connections = await sdk.social.connection.list();
Parameters
| Name | Type | Description |
|---|---|---|
type required | facebook_page | instagram_business | youtube_channel | tiktok_account | x_account | Social provider type to connect |
Publications
GET
/v1/stores/{storeId}/social-publications SDK:
sdk.social.publication.find() POST
/v1/stores/{storeId}/social-publications/validate SDK:
sdk.social.publication.validate() POST
/v1/stores/{storeId}/social-publications SDK:
sdk.social.publication.create() POST
/v1/stores/{storeId}/social-publications/{id}/schedule SDK:
sdk.social.publication.schedule() const content = {
type: "instagram_business",
caption: "New work is live",
placement: "reel",
share_to_feed: true,
media_ids: ["media_reel_123"],
};
const validation = await sdk.social.publication.validate({
social_connection_id: connections[0].id,
content,
});
const { publication } = await sdk.social.publication.create({
social_connection_id: connections[0].id,
content,
});
await sdk.social.publication.schedule({
id: publication.id,
scheduled_at: Math.floor(Date.now() / 1000) + 3600,
});
social_connection_id is the ID returned by sdk.social.connection.list().
Comments And Threads
POST
/v1/stores/{storeId}/social-publications/engagement/sync SDK:
sdk.social.publication.syncEngagement() GET
/v1/stores/{storeId}/social-publications/{publicationId}/comments SDK:
sdk.social.publication.getComments() GET
/v1/stores/{storeId}/social-publications/{publicationId}/comments/{commentId}/thread SDK:
sdk.social.publication.getCommentThread() POST
/v1/stores/{storeId}/social-publications/{publicationId}/comments/{commentId}/replies SDK:
sdk.social.publication.commentReply.create() await sdk.social.publication.syncEngagement({
publication_ids: [publication.id],
max_publications: 1,
max_comment_pages_per_publication: 1,
max_comments_per_publication: 50,
sync_metrics: true,
});
const topLevel = await sdk.social.publication.getComments({
publication_id: publication.id,
limit: 50,
});
const thread = await sdk.social.publication.getCommentThread({
publication_id: publication.id,
comment_id: topLevel.items[0].id,
});
await sdk.social.publication.commentReply.create({
publication_id: publication.id,
comment_id: topLevel.items[0].id,
reply_id: crypto.randomUUID(),
text: "Thanks for reaching out.",
});
Comment sync stores top-level comments by default. Opening a thread fetches the provider thread for that root comment and stores replies with parent IDs so Admin can show the conversation tree.
Classification And Metrics
POST
/v1/stores/{storeId}/social-publications/comments/classify SDK:
sdk.social.publication.classifyComments() GET
/v1/stores/{storeId}/social-publications/{publicationId}/metrics SDK:
sdk.social.publication.getMetrics() await sdk.social.publication.classifyComments({
publication_id: publication.id,
force: false,
limit: 50,
});
const metrics = await sdk.social.publication.getMetrics({
publication_id: publication.id,
});