How to connect Claude, ChatGPT and other AI tools to your site

You can connect Claude, ChatGPT, Codex, Cursor and all AI agents to your site. They work through your site's own API, with a key you make in your site admin area under Settings > API Keys. You choose what the key can do, you can give it an expiry, and you can revoke it at any time. This guide shows you how to set it up and how to keep your site safe while you do. For what a connected AI can do, see Connect your AI.

Which AI tools can connect

Any AI tool that can send web requests or run code can use your site's API. Each one takes the same three things: your site address, your key and the API reference.

  • Claude: use Claude Code, in a terminal or in the Code tab of the Claude desktop app. Paste the three things into a session and Claude makes the requests itself.
  • ChatGPT: use Codex, which signs in with your ChatGPT account. A custom GPT can also call your site through an action.
  • Codex: start Codex, paste the three things and say what you want.
  • Cursor: paste the three things into Cursor's agent chat.
  • n8n, Make, Zapier and any other agent: add an HTTP request step and set the key as a bearer token.
  • Your own scripts, written by you or by an AI.

Step-by-Step Guide

1. Create an API key for the AI

  1. Log in to the site admin area of the site you want the AI to work on. A key belongs to one site.
  2. Go to Settings > API Keys and click Create API Key.
  3. Give the key a name that says which tool uses it, for example "Claude Code".
  4. In Preset, choose one of the AI assistant presets:
    • AI assistant: read only lets the AI look at your products, offers, categories, brands, articles, pages and analytics. It cannot change anything. Start here.
    • AI assistant: read, and edit content also lets the AI create and edit products, categories, brands, articles and pages.
  5. Create the key, then copy it straight away. It is shown only once.

Keys made from a preset expire after 90 days. Neither preset lets the AI see your site users or subscribers, change your settings, or change your offers.

2. Give the AI your site details

The AI needs three things: your site address, your API key, and the API reference. Paste something like this into your AI tool, with your own details:

My FreshStore site is at https://your-site-domain.com.
Its API is documented at https://guides.freshstore.com/article/729-freshstore-api
Send my API key as "Authorization: Bearer KEY" on every request.
List the 10 products that got the most clicks this month.

Treat the key like a password. In coding assistants, it is safer to store it in an environment variable and tell the AI the name of the variable, rather than paste the key itself into the chat.

3. Start small

Ask a question first, such as which products get the most clicks, or which articles have no meta description. When the answers look right, move on to changes.

Tips for safe changes

  • Ask for a plan first. Tell the AI to list what it will change and wait for your OK before it changes anything.
  • Change a few items, then check them. Open your site and look at the changed pages before you let the AI do the rest.
  • One key per tool. Then you can see each key's Last Used time and revoke one tool without breaking the others.
  • Revoke keys you no longer use. Go to Settings > API Keys and click Revoke.

Anything the AI reads from your site is sent to the company that runs that AI. Keep to the presets, which leave out the personal data of your site users and subscribers.

Questions and Troubleshooting

Can the AI change my plan, billing or FreshStore account?

No. A site API key only reaches the content of that one site. It cannot touch your subscription, your payments or your account at my.freshstore.com.

The AI gets "403 Forbidden"

The key is missing, wrong, expired or revoked. Check that the AI sends it as Authorization: Bearer KEY, and check the key's Expires date under Settings > API Keys. Keys made from a preset expire after 90 days. If it has expired, create a new one.

The AI gets "This token does not have access to ..."

The key does not include that permission. Choose the other preset, or tick the extra permission when you create a new key.

The AI gets "429 Too Many Requests"

The API takes up to 60 requests a minute for each key. Ask the AI to wait a second between requests.

I run more than one site

Create one key in each site, and give the AI the address and key of each one.

Claude, ChatGPT, Codex and Cursor are trademarks of their owners. FreshStore is not affiliated with them.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.