Read post destinations
social.destinations.read@1
Checks that the accounts you chose can take a text-only post and tells you each platform's limits, so you can write before anything is saved. With incompatible set to report it lists the accounts that cannot instead of refusing the call. It reads and changes nothing. It needs a key with Read social.
Check an account
Send the account's row reference, as its row gives it.
# A new operationId for each new request; the same one to retry it.
curl https://api.growlocal.site/api/v1/profiles/YOUR_BUSINESS_ID/invocations \
-H "Authorization: Bearer gl_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"target": {
"featureId": "YOUR_FEATURE_ID",
"export": "readDestinations",
"contractRef": "social.destinations.read@1"
},
"operationId": "check-destinations-1",
"input": {
"accountRefs": [
{
"businessProfileId": "YOUR_BUSINESS_ID",
"featureId": "juniper-cakes.social",
"collectionId": "juniper-cakes.accounts",
"id": "YOUR_ACCOUNT_ID"
}
],
"format": "post",
"mediaKind": "none"
}
}'
// A new operationId for each new request; the same one to retry it.
const response = await fetch(
"https://api.growlocal.site/api/v1/profiles/YOUR_BUSINESS_ID/invocations",
{
method: "POST",
headers: {
Authorization: "Bearer gl_YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
"target": {
"featureId": "YOUR_FEATURE_ID",
"export": "readDestinations",
"contractRef": "social.destinations.read@1"
},
"operationId": "check-destinations-1",
"input": {
"accountRefs": [
{
"businessProfileId": "YOUR_BUSINESS_ID",
"featureId": "juniper-cakes.social",
"collectionId": "juniper-cakes.accounts",
"id": "YOUR_ACCOUNT_ID"
}
],
"format": "post",
"mediaKind": "none"
}
}),
},
);
const receipt = await response.json();
console.log(response.status, receipt);
import requests
# A new operationId for each new request; the same one to retry it.
response = requests.post(
"https://api.growlocal.site/api/v1/profiles/YOUR_BUSINESS_ID/invocations",
headers={"Authorization": "Bearer gl_YOUR_API_KEY"},
json={
"target": {
"featureId": "YOUR_FEATURE_ID",
"export": "readDestinations",
"contractRef": "social.destinations.read@1",
},
"operationId": "check-destinations-1",
"input": {
"accountRefs": [
{
"businessProfileId": "YOUR_BUSINESS_ID",
"featureId": "juniper-cakes.social",
"collectionId": "juniper-cakes.accounts",
"id": "YOUR_ACCOUNT_ID",
},
],
"format": "post",
"mediaKind": "none",
},
},
timeout=30,
)
print(response.status_code, response.json())
Parameters
What goes in input:
| Name | Type | Required | Description |
|---|---|---|---|
accountRefs |
array of object | Yes | The accounts to check, 1 to 10; one listed twice is refused. |
accountRefs[].businessProfileId |
string | Yes | Your business's id. |
accountRefs[].featureId |
string | Yes | The featureId of the account's row. |
accountRefs[].collectionId |
string | Yes | The collectionId of the account's row. |
accountRefs[].id |
string | Yes | The account's id. |
format |
post |
Yes | Always post: only plain posts can be checked here. |
mediaKind |
none |
Yes | Always none: the post carries no photos or video. |
incompatible |
one of refuse, report |
No | refuse (the default) rejects the call when an account cannot take the post; report answers with the accounts that can in destinations and the ones that cannot in incompatible, each with the reason. |
Response
A call that worked answers 200 with an applied receipt; its output holds these fields, among others. GET /catalog/social.destinations.read@1 answers the complete shape as JSON Schema.
| Name | Type | Description |
|---|---|---|
destinations |
array of object | The accounts that can take the post, in the order you asked. Empty only when incompatible is sent and no account can. |
destinations[].accountRef |
object | The account. |
destinations[].platform |
one of facebook, instagram, linkedin, x, tiktok, youtube, pinterest, threads, bluesky |
Its platform. |
destinations[].label |
string | The account's name. |
destinations[].constraints |
object | What the platform allows. |
destinations[].constraints.captionLimit |
integer | The longest caption, in characters. |
destinations[].constraints.formats |
array of one of post, story, reel |
The formats it takes: post, story, reel. |
destinations[].constraints.options |
array of one of altText, link, firstComment, title, privacy, shareToFeed, collaborators, allowComments, allowDuet, allowStitch, discloseBrand, brandedContent, aiGenerated, madeForKids, replySettings |
The extra settings a post can carry there, such as link or altText. |
destinations[].constraints.optionChoices |
object | The values allowed for privacy and replySettings, where they are limited. |
destinations[].constraints.mediaRequired |
boolean | Whether a post must have a photo or video. |
destinations[].constraints.maxMedia |
integer | The most photos or videos a post can carry. |
destinations[].constraints.mediaTypes |
array of string | The kinds of file it takes. |
incompatible |
array of object | Only with incompatible report: the accounts that cannot take the post, in the order you asked, each with its accountRef, platform and a reason in plain words. |
{
"status": "applied",
"operationId": "check-destinations-1",
"output": {
"destinations": [
{
"accountRef": {
"businessProfileId": "YOUR_BUSINESS_ID",
"featureId": "juniper-cakes.social",
"collectionId": "juniper-cakes.accounts",
"id": "YOUR_ACCOUNT_ID"
},
"platform": "x",
"label": "Juniper Cakes",
"constraints": {
"captionLimit": 280,
"formats": [
"post"
],
"options": [
"link"
],
"mediaRequired": false,
"maxMedia": 4,
"mediaTypes": [
"image/jpeg",
"image/png"
]
}
}
]
}
}
Errors
It reads and changes nothing. Besides the answers every request can get (Errors), its receipt can say:
| Status | HTTP | What it means |
|---|---|---|
rejected |
400, or 403 when it's a matter of access | Not done. diagnostics says why: each has a code, a path into what you sent and a message. |
The codes in diagnostics you're most likely to see:
| Code | Status | What it means |
|---|---|---|
DATA.ROW_NOT_FOUND |
rejected |
No such account here for this key. |
SOCIAL.ACCOUNT_DUPLICATE |
rejected |
An account is listed twice. |
SOCIAL.PLATFORM_UNSUPPORTED |
rejected |
An account's platform cannot be published to. Not raised with incompatible report. |
SOCIAL.MEDIA_REQUIRED |
rejected |
An account's platform needs a photo or video, so it cannot take a text-only post. Not raised with incompatible report. |