ShopEazydevelopers
API referenceMerchant API BetaSocial

Post a free-text message to the shop's Facebook Page, now

Beta
Credentials
  • OAuth access token
Scopes
marketing:write
Subscription
Needs an active plan. Otherwise 403 subscription_locked.
Idempotency
Send an Idempotency-Key header. A retry with the same key does the work once.
POST
/v1/merchant/stores/{storeId}/social/facebook/post

Publishes at once, publicly, to the connected Page: createSocialPost and publishSocialPost post about listings, this posts whatever the merchant wrote. Needs a connected Page (getFacebookPage): without one 409 facebook_not_connected; a Page whose token Meta no longer accepts is 422 provider_error and the channel shows as broken in getFacebookPage (status: error, lastError) so posting never fails silently.

Facebook's own words for a refusal come back in the message, quoted as Facebook's. The Idempotency-Key is what keeps a retry from posting twice: it is written down before Facebook is called, so a replay returns the first answer and posts nothing, even after a lost answer or a crash. Facebook busy (429) or down (5xx, or no answer) is 503 provider_unavailable with Retry-After, never 500. When Facebook answered busy nothing was posted and the same key may be sent again; when it did not answer, or failed, the post may already be on the Page, so the same key is held (409 in_flight): look at the Page, and use a new key to send it again.

Access: OAuth scope marketing:write; write-gated by the subscription.

Authorization

merchantOAuth marketing:write
headerAuthorizationBearer <token>

OAuth 2.1 (authorization code + PKCE S256, public clients, dynamic registration) for connected AI apps. Effective power is scopes granted AND the person's role today AND the plan. orders:refund, billing:write and team:write are opt-in on the consent screen. Write implies read for marketing:read and messages:read, so a grant holding marketing:write passes a marketing:read check, and messages:send passes messages:read.

Scope: marketing:write

Path Parameters

storeId*string

A store the person can reach. Any other id answers 404, never 403.

Header Parameters

Idempotency-Key*string

Required on every write. Minted on the device when the person taps, reused on every retry. A write without one, or with one that does not match the pattern, is refused with 422 validation_error. Scoped to the token's subject, remembered 24 hours. A replay returns the first 2xx response with Idempotent-Replay: true; a request still running answers 409 in_flight; the same key with a different method, path or body answers 409 idempotency_key_reused; non-2xx results are not remembered. If the key store cannot be read nothing is processed and the answer is 503 idempotency_unavailable: retry with the same key.

Match^[A-Za-z0-9_-]{8,128}$

Request Body

application/json
  1. body
message*string

What to post, as written. Whitespace at the ends is trimmed; an empty message is 400.

Length1 <= length <= 5000
includeShopLink?boolean

Add a link to the shop to the post. Default true.

Defaulttrue

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.shopeazy.co/v1/merchant/stores/<storeId>/social/facebook/post' \  -H 'Authorization: Bearer <access_token>' \  -H 'Idempotency-Key: <unique_key>' \  -H 'Content-Type: application/json' \  -d '{  "message": "string"}'
Example Response
{  "data": {    "url": "string"  }}