Social (Ayrshare)
The social integration uses Ayrshare as the abstraction layer for multi-network publishing. One connection, one API key, posts to LinkedIn, X, Instagram, Facebook, TikTok, YouTube, Pinterest, Threads — all from the Content module.
Why Ayrshare
Each social network has its own API, auth flow, rate limits, and content quirks. Building+maintaining 8 of those for every feature is a tax we don't want to pay; Ayrshare absorbs it. From the platform's perspective there's one integration; from your perspective there are many networks to publish to.
The trade-off: you're dependent on Ayrshare's uptime + their network coverage. For the networks we care about, they're reliable and cover all major + most long-tail platforms.
Setup
- Sign up at ayrshare.com and grab your API key.
- Settings → Integrations → Ayrshare → paste API key + (optional) webhook secret.
- In Ayrshare's dashboard, link each social account you want to publish to.
- Back in CCD-Suite, Settings → Integrations → Ayrshare → Refresh linked accounts. The platform pulls Ayrshare's profile list and you pick which to enable.
That's it — the Content module's calendar now shows enabled networks as rows.
Publishing a post
The agent-flow (see Content module):
- You ask the orchestrator to draft a post, or you draft manually.
- The post lands as a planned action in the Inbox.
- You confirm → worker calls Ayrshare → post publishes to all target networks.
- Ayrshare returns per-network publish IDs, which the worker stores on the Post entity.
Per-network variants: a single post can have different copy per network (LinkedIn longer, X shorter, hashtags styled differently). The agent generates variants in one call when drafting; you can edit each in the Inbox before confirm.
Engagement polling
After publish, the worker polls Ayrshare's /post/{id} endpoint
at increasing intervals to capture engagement metrics:
| Interval | After publish |
|---|---|
| 5 min | First check |
| 1 hour | Second check |
| 6 hours | Third check |
| 24 hours | Fourth check |
| 7 days | Final check |
Each poll updates the post's Engagement entity. The exponential backoff keeps Ayrshare quota use modest while still capturing viral spikes (the early checks catch fast-moving content).
Webhooks
Ayrshare can push events instead of waiting for polls. To enable:
- In Ayrshare's dashboard → Webhooks → set the URL to
https://<your-app>/api/webhooks/ayrshare. - Set the shared secret in Ayrshare AND in
.env(AYRSHARE_WEBHOOK_SECRET=...). - The platform verifies the secret on every callback (constant- time comparison, see Security). Requests with a missing or mismatched header are rejected.
When webhooks are wired, polling shifts to a longer-interval safety net rather than the primary path.
Network specifics
Each network has constraints the Content module surfaces in the draft editor:
| Network | Limit | Notes |
|---|---|---|
| 3000 chars, 9 images | URLs in body auto-preview. | |
| X / Twitter | 280 chars (Free), 25k (Premium) | Thread-able; the editor supports multi-tweet drafting. |
| 2200 chars, 10 images | Must include at least 1 image or video. | |
| 63k chars, 4 images | Page or group posting. | |
| TikTok | Captions only (separate video upload) | We surface the caption; video uploads handled out-of-band. |
| YouTube | Community posts only via Ayrshare | Video uploads out-of-band. |
| Image-required | Each pin gets one image + caption + destination URL. | |
| Threads | 500 chars | Beta in Ayrshare; subject to platform changes. |
When you compose a post for multiple networks at once, the editor flags per-network warnings (too long for X, no image for IG, etc.) before you can schedule.
Scheduling
Two paths:
- Schedule for a future time — Ayrshare holds the post and publishes at the scheduled moment.
- Schedule via internal queue — CCD-Suite holds the post and submits to Ayrshare at the scheduled moment.
Default is path 1 (Ayrshare holds it). Path 2 is useful if you need approval flows or content checks that run between scheduling and submitting. Toggle per-tenant in Settings → Integrations → Ayrshare → Scheduling.
Costs
Ayrshare charges per post per network. The platform passes through their pricing (no markup); see ayrshare.com/pricing for current tiers. Cloud-edition tenants on Scale get a managed Ayrshare subscription as part of their plan; self-host requires your own Ayrshare account.
Disconnecting
Settings → Integrations → Ayrshare → Disconnect. Revokes the API key on our side; doesn't affect Ayrshare itself. To fully deactivate, cancel through Ayrshare's dashboard.
Read next
- Content module — the producer side of social publishing.
- Webhooks — generic webhook contract; Ayrshare's callbacks are one consumer.