> ## Documentation Index
> Fetch the complete documentation index at: https://docs.get3rd.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Payload

> Send Content Agent articles into your Payload CMS as drafts, per brand. 3RD never publishes.

Connect Payload and the [Content Agent](https://docs.get3rd.com/actions/content-agent.md) can send a finished article straight into a collection in your Payload CMS as a **draft**, in your default language. Headings, lists, links and images come across with it. Your team reviews the draft in the Payload admin and publishes it there.

> [!NOTE]
>
> The Payload integration is in **Beta**. Connect it per brand; nothing is shared across brands.

## Before you start

* Your organization needs an **active 3RD subscription** with the Content Agent.
* You need **edit access** to the brand in 3RD. View-only members don't see the **Connect** button.
* You connect **per brand**. Each brand links its own Payload site.
* Your Payload site is reached over **https**.
* You need a Payload account in the **users** collection that can edit your content, with **Enable API Key** on its account page. If you don't see **Enable API Key**, ask your developer to turn on API keys for users.
* The collection articles go to needs **drafts turned on**. 3RD won't write to a collection without drafts, because saving there would publish.

## Connect Payload

**1. Open Integrations**

In 3RD, open **Settings → Integrations** for the brand.

**2. Click Connect**

In the **Payload** row, click **Connect**. The **Connect Payload CMS** window opens. Type your **Payload address**, such as `https://cms.example.com`, and click **Open this page in Payload** to jump to your account page in the Payload admin.

**3. Turn on an API key**

In the Payload admin (usually your site address followed by `/admin`), click your profile picture at the top right to open your account. Tick **Enable API Key**, then click **Save**. Copy the **API Key** shown under it.

**4. Paste your details**

Back in 3RD, click **Next**. Check the **Payload address**, paste the **API key** and click **Connect**. The key is 36 characters: letters and numbers in five groups joined by dashes. It is not your password.

**5. Choose where pieces go**

3RD checks the key with your site, then the **Where drafts go** window opens by itself. Check the collection and field names and click **Save**.

If you already have your details, click **I already have my details** to go straight to the fields.

> [!TIP]
>
> 3RD saves drafts as the account the key belongs to, so use one that can edit your content. If your admin isn't at `/admin`, open your account from the admin instead of the button in 3RD.

## Choose where pieces go

Drafts go to the **posts** collection until you choose otherwise. In the **Where drafts go** window, type the names exactly as they appear in the collection's Payload config:

| In Payload | From 3RD | Default name |
| - | - | - |
| **Collection** | Where the draft is saved | `posts` |
| **Title field** | The article's opening heading, or the piece title when the article has none | `title` |
| **Slug field** | The address you set when pushing | `slug` |
| **Body field** (rich text) | The article | `body` |
| **Excerpt field** (optional) | The article's first paragraph | `excerpt` |
| **SEO title field** (optional) | The title, up to 60 characters | `meta.title` |
| **SEO description field** (optional) | The opening paragraphs, 100 to 150 characters | `meta.description` |

Write a field inside a group with a dot, such as `meta.title`. Leave an optional field empty to skip it.

Images are uploaded to your **media** collection. An image that can't be copied stays a link to its original address, and 3RD tells you how many.

To change the collection or fields later, open the **⋯** menu in the Payload row and click **Choose where pieces go**. The next push of an article makes a new draft in the new collection.

## Push an article to Payload

**1. Open the article**

In the Content Agent, open a new article (not an optimization of an existing page).

**2. Send it as a draft**

Click **Push to Payload**. If the brand has more than one CMS connected, the button says **Push to CMS** and you pick **Payload** in the window. Check the **Address** and click **Send as draft**. 3RD shows **Draft created in Payload** when it's done.

**3. Review it in Payload**

Open the collection in the Payload admin. The new document has the status **Draft**.

Pushing the same article again updates the **same document** instead of creating a new one, so you can keep editing in 3RD and push again. If the document was deleted in Payload, 3RD makes a new one.

## Drafts only

3RD only ever creates or updates **drafts**. It never publishes and never deletes anything. Before every push, 3RD checks that the collection still has drafts turned on, and stops if it doesn't.

If the document is already published, pushing again saves a new draft of it. 3RD shows **Draft updated in Payload. The live version is unchanged.** The live page stays as it is until someone publishes the new draft in Payload.

## Disconnect

Open the **⋯** menu in the Payload row and click **Disconnect**. 3RD stops sending anything to Payload and deletes the key it stored. Documents already in Payload stay where they are.

## Troubleshooting

| You see | What to do |
| - | - |
| **Payload did not accept this API key** | Copy the API key again from your account page in the Payload admin, and check **Enable API Key** is ticked and saved. |
| **Payload did not answer at this address** | Check the address and try again. |
| **Enter your Payload site's https address** | Use the address that starts with `https://`. |
| **This collection does not have drafts turned on** | Turn on drafts for the collection in Payload, or pick another collection. |
| **Payload has no collection with this name** | Use the collection's name from your Payload config. |
| **This collection holds your Payload accounts** | 3RD won't write to the collection your accounts live in. Pick another one. |
| **The API key cannot read this collection's drafts** | Give the key's user access to the collection, or pick another one. |
| **Use the field names from your Payload config, a different one for each** | Check the field names. Each one must be different. |

## Related

* [Content Agent](https://docs.get3rd.com/actions/content-agent.md): where the articles are written
* [HubSpot](https://docs.get3rd.com/integrations/hubspot.md): the same flow for HubSpot blogs and pages


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.