Connecting a Craft CMS site
Prepare Craft's GraphQL API, a blog section and an access token, then test and connect the site in Connect a Site.
Craft CMS sites connect through Craft's GraphQL API with an access token. Posts are saved as entries in one section and entry type. Because the platform expects specific field handles, prepare Craft first and involve the UP-TO-DATE support team for your first Craft site.
Before you start
You are an Owner or Admin of the company in Accounts, or of its agency.
You have administrator access to the Craft control panel.
The site has a section for blog posts (for example with the handle
blog) and an entry type in it (for exampleblogPost).
Step 1: Prepare the fields
The platform writes the post into these field handles on the entry type:
Content | Field handle |
|---|---|
Post body |
|
Description |
|
Categories |
|
Post date |
|
The title is always written to the entry title. New entries are saved as enabled, with author ID 1. These handles and the author can't be changed in the form, so make sure the entry type uses them, or ask the UP-TO-DATE support team before connecting.
Step 2: Create a GraphQL schema and token
In the Craft control panel, go to GraphQL.
Create a schema that can query entries in the blog section, and save and delete entries of the blog entry type.
Create a token assigned to that schema and copy it.
Step 3: Check the GraphQL address
The platform uses one address on the site, for the connection test and for publishing: https://your-site.com/actions/graphql/api. It must reach Craft's GraphQL API and accept the token.
Step 4: Open Connect a Site
In Accounts, go to Companies › Overview, open the company and click the Websites tab.
Click Connect a Site. The window opens with the connect form ready.
Under Select your CMS, choose Craft CMS.
Step 5: Fill in the fields
Field | What to enter |
|---|---|
Craft CMS Site URL | The site address, for example |
Access Token | The GraphQL token from step 2. |
Blog Section Handle | The section handle, for example |
Blog Entry Handle | The entry type handle, for example |
Step 6: Test the connection
Click Test connection. It becomes clickable once the URL and token are filled in.
The test reads entries in the section, saves a disabled "Test Entry" and deletes it again.
When it passes, you see "Test connection successful! Token has required permissions."
Step 7: Connect and check
Click Connect. The site name is read from Craft; when Craft doesn't give one, the site's domain is used.
Check that the site appears in the company's Websites list.
Important: If the site doesn't appear in the Websites list after you click Connect, don't connect it again. Contact the UP-TO-DATE support team so they can finish the connection.
Changing the connection later
In Accounts, go to Websites › All Websites, open the site and click Edit connection. In Site settings, you can change the Site name, and replace the token under Access token ("Only fill this in to change the GraphQL access token. Re-tested when you save."). Leave it blank to keep the current token. Contact the UP-TO-DATE support team before disconnecting a site with existing posts, because disconnecting removes its posts and schedules from the platform.
Common errors
Message | What to check |
|---|---|
"Please enter a valid URL" | The URL is missing |
"Craft rejected the access token." | The token is wrong, disabled or expired, or its schema doesn't include the section. Check it under GraphQL > Tokens in Craft. |
"No Craft GraphQL API at this address (status 404)." | The URL is wrong, or the GraphQL API isn't enabled or doesn't answer at |
"Craft could not query the "..." section." | The section handle is wrong, or the token's schema can't query entries in it. |
"Unexpected response from the Craft GraphQL API (status ...)." | Open Technical details and send them to the UP-TO-DATE support team. |
"The token cannot create entries in this section." | The section or entry type handle is wrong, or the schema can read entries but not save them. Allow saving and deleting entries of the entry type. |
"Could not reach the Craft site." | The site couldn't be reached. The line under the message names the reason. |
"Failed to connect Craft CMS site", "Could not connect to Craft." or "Error connecting to Craft: ..." | Connecting failed after a passed test. Contact the UP-TO-DATE support team. |
Related articles
Did this answer your question?