The Items API lets you create, publish, schedule, and manage social media posts on a site's connected channels. In this API, a post is called an item. Items you create through the API appear on the site's Social Media Marketing page in the dashboard, alongside posts created there manually.
With the Items API, you can:
- Create draft items and publish or schedule them for a future date.
- Publish a fully-formed item in a single call.
- Retrieve, update, and delete items.
- Query items to find drafts, scheduled posts, or published posts.
- Reschedule or cancel scheduled items.
- Publish multiple items in bulk.
Before publishing or scheduling, check that the target channel is connected with the Accounts API and that the site has remaining quota with the Premium Features API. You can optionally generate post content with the Generated Content API before creating a draft.
An item moves through statuses as you work with it:
- Draft: Created with Create Draft Item and not yet published or scheduled.
- Scheduled: Published with a future
scheduledDate. The post is published automatically at that time unless you cancel or reschedule it.
- Published: Live on the connected channel.
The recommended flow is to create a draft first, then publish or schedule it with Publish Item By ID. You can also call Publish Item with a complete item in one step.
It's important to note the following points before starting to code:
- A site owner must connect their social channels in the site's dashboard before you can publish to them. See Connecting to your social media accounts.
- Each item targets a single connected channel. Its
type and content must match a combination that channel supports.
- Publishing and scheduling can fail if the site has reached its plan quota. Call Get Feature Data with
PUBLISH_POST or SCHEDULE_POST before you publish or schedule.
- Posts created natively on a channel rather than through Wix are imported once a day for sites on a paid social media marketing plan. They appear as items with
external set to true and may take up to a day to show up.
- Item: A social media post managed through the Publisher API. An item can be a draft, scheduled, or published post and targets a single connected channel.
- Channel: A social network that a post is published to, such as Instagram or TikTok.
- Account: A connected social channel, such as an Instagram business account or a Facebook page, that an item is published to.
- Status: Indicates whether an item is a draft, scheduled, or published.