Skip to content

Social

Social writes a post once and sends it to every account it’s for, each with its own words, pictures or video where they should differ. A post goes out now, at a time, in a queue’s next free slot, or again and again; it can wait for an approver first. Comments on what went out come back to answer and hide, and each network’s figures come back to compare. Every operation needs social:read or social:write.

An account is a page, profile or board a post goes to. Each comes from a network’s connection:

Network Connection What can be added
Facebook Meta, with Social’s permissions Pages the sign-in manages
Instagram Meta, with Social’s permissions Professional accounts linked to those Pages
LinkedIn LinkedIn Pages Pages the member administers, and their own profile
X X, with the workspace’s own developer keys The account the keys belong to
TikTok TikTok The account that signed in
Pinterest Pinterest (the connection Ads uses) Boards
Google Business Profile Google Business Profile, with a location chosen in Reviews That location

GET /api/v1/social/accounts lists the accounts and each network’s connection: ready (this server can connect it), connected, allowed (the connection can post; a Meta connection made for Ads needs Social’s permissions added, which connectUrl asks for) and the address that starts connecting. GET /api/v1/social/accounts/choices asks a network what its connection reaches, and POST /api/v1/social/accounts adds one of those, by its externalId. DELETE /api/v1/social/accounts/{id} takes an account out: posts that haven’t gone out stop going to it, and one left going nowhere goes back to drafts.

X connects with keys rather than a sign-in, because X charges each business for its API: make an app in X’s developer portal with Read and write permission, then give POST /api/v1/social/x/connect its API key and secret and the access token and secret the portal makes for your account. X checks them before they’re kept, sealed.

Terminal window
curl -X POST https://digize.com/api/v1/social/accounts \
-H "x-api-key: $DIGIZE_API_KEY" \
-H "content-type: application/json" \
-d '{"network":"instagram","externalId":"17841400000000001"}'

POST /api/v1/social/posts writes a post, or changes one that hasn’t gone out:

Field What it is
text, media, link, firstComment What every account gets. media holds pictures (Cloudflare Images ids) and a video (uploaded from the app).
targets The accounts it goes to, each with its own text or media to say something else there, and options: a Pin’s title, or who sees a TikTok post (privacy).
when now, schedule (at scheduledAt), queue (the next free slot of queueId) or draft.
recurrence For a scheduled post, repeat every day, week or month, each interval, count times in all or until a day.

POST /api/v1/social/posts/drafts keeps a post as a draft and sends nothing, which is what the agent uses to suggest posts for the team to schedule. A post’s status is draft, pending_approval, scheduled, publishing, then published, partial (some accounts) or failed; rejected was sent back by an approver. Each target has its own status, its url on the network once it’s out, and why it failed.

Each network’s rules are checked before a post is kept, and a refusal names the account in details.fields (targets.<accountId>):

Network Text Pictures and video Link First comment
Facebook 63,206 characters Up to 10 pictures, or one video A card Yes
Instagram 2,200 Needs a picture or video; up to 10 as a carousel, video and pictures mixed Not clickable Yes
LinkedIn 3,000 Up to 9 pictures, or one video A card Yes
X 280, a link counting 23 Up to 4 pictures, or one video On the end of the post Yes, as a reply
TikTok 2,200 Needs one video No No
Pinterest 800, and a title of 100 One to five pictures, or one video The Pin’s link No
Google Business Profile 1,500, no phone numbers Up to 10 pictures, or one video A Learn more button No

A scheduled post waits on its workspace’s own timer; when its time comes it goes to each network in turn, each a step that’s retried while the network is unreachable. Pictures and videos go ahead first, the network’s processing is followed (Instagram, LinkedIn, X, TikTok and Pinterest videos take a moment), then the post is made, and the first comment after it. A network that refuses fails only its own account, and the author is told. POST /api/v1/social/posts/{id}/retry sends it again to the accounts it didn’t reach. POST /api/v1/social/posts/{id}/publish sends a scheduled post at once, and POST /api/v1/social/posts/{id}/reschedule moves one, as dragging it in the Planner does.

Google Business Profile posts go through Reviews’ own posts, so they also show in Reviews › Posts, with Google’s views and clicks. Posts written in Reviews show in Social’s list with origin: "reviews".

A repeating post stays scheduled at its next time. Each time it goes out is a post of its own with seriesId naming it, so each has its own links, comments and figures.

With approval on in Social settings (PUT /api/v1/social/settings), a post that would go out waits as pending_approval and its approvers are told. With approvers named, any of them approves, and their own posts don’t wait; with none named, anyone who can post approves, but never their own. POST /api/v1/social/posts/{id}/approve sends it out at its time, or now if that’s passed; POST /api/v1/social/posts/{id}/reject sends it back with a note.

A queue is a set of weekly times for some accounts, such as Monday, Wednesday and Friday at 9 AM on the workspace’s clock (POST /api/v1/social/queues, with slots of day, 0 for Sunday, and minutes after midnight). A post with when: "queue" takes the queue’s next time no other post holds, and goes to the queue’s accounts when it names none. GET /api/v1/social/queues says when the next free one is.

GET /api/v1/social/comments holds the comments on posts from the last 30 days, from Facebook, Instagram, LinkedIn Pages and X, with the team’s replies under what they answer. They come in every hour, or now with POST /api/v1/social/sync. POST /api/v1/social/comments/{id}/reply answers publicly as the account and POST /api/v1/social/comments/{id}/hide hides a comment (Facebook, Instagram, X) or shows it again; each is sent in the background, and the comment shows sending, or the network’s reason if it refused. Messages and DMs are in Conversations.

TikTok, Pinterest and Google don’t give comments to apps, and LinkedIn keeps a profile’s comments closed to them, so those have none here. Reading X replies uses X’s recent search, which needs X’s Basic plan or above.

GET /api/v1/social/performance gives each post from the last 90 days its figures, as its network reports them: impressions (views), reach, engagements, clicks, likes, comments, shares, saves and videoViews, null where a network doesn’t say. It also gives each account’s followers and, where the network reports them by day (Facebook, Instagram’s reach, Pinterest), its daily figures. They’re read every hour.