Skip to Content

API

The public v1 API lets your own code read and write your project’s CMS and form submissions over HTTPS. Use it to sync content from another system, update a collection on a schedule (for example from a Cloudflare Worker, Google Apps Script or a cron job), or read submissions into a CRM.

Every request is authenticated with an API key. For the full list of endpoints, see the REST API reference.

Creating an API Key

  1. Open Integrations → Ycode API in the builder
  2. Click Generate API key and give the key a name
  3. Copy the key immediately

One-time display

The full API key is shown only once. Store it securely. If you lose it, generate a new key and delete the old one.

On Ycode Cloud, generating a key requires the Designer role or higher.

Key Format

An API key is a 64-character hexadecimal string. The key list shows its first 8 characters so you can tell keys apart. Keys are stored as SHA-256 hashes; the full value is never stored or displayed again.

Using API Keys

Every endpoint lives under your project’s base URL, https://<your domain>/ycode/api/v1. The Ycode API page shows it for the current domain under Base URL, with a copy button, and lists each endpoint relative to it.

Send the key in the Authorization header as a Bearer token, on your project’s own domain:

curl -H "Authorization: Bearer YOUR_API_KEY" \ https://yoursite.ycode.website/ycode/api/v1/collections

A key only works on the project it was created in. Requests without a valid key return 401 Unauthorized.

Permissions

Every API key has full access to the public v1 API of its project:

  • List and read collections and items
  • Create, update, and delete collection items
  • List and read forms and submissions
  • Create, update the status of, and delete form submissions
  • Read visitor analytics (Ycode Cloud only)

Keys do not grant access to the builder, settings, or any other part of Ycode. Anyone with a key can change your CMS content, so treat it like a password and keep it on the server side — never in browser JavaScript or a public repository.

Changes Go Live Immediately

Items created, updated, or deleted through the API change both the CMS and the live site at once, with no publish step. Pages that show the collection are refreshed automatically.

API writes do not trigger webhooks, and submissions created through the API do not send email notifications or run apps.

Ycode Cloud

The API works on every Ycode Cloud plan, on the project’s ycode.website subdomain or its custom domain. If a project is suspended, reads keep working and writes return 403 Forbidden.

Last Used

Each key shows when it was created and when it was last used. Check this to find keys that are no longer needed.

Deleting Keys

Delete a key at any time from its menu on the Ycode API page. It stops working immediately, and any application still using it gets 401 responses.

Security

Use a separate key for each application or environment, and delete keys that may have been exposed.

Last updated on