Using the API

Automate your site from code: tokens, endpoints, and worked examples.


The API gives you programmatic access to everything the site manager does: creating sites, editing content, uploading media, managing tags and links, and running SEO and AEO audits.

Every endpoint lives under /api/v1/, speaks JSON, and requires authentication. Start with API Basics -- tokens, conventions, errors, and permissions. Then use the Endpoint Reference for the resource you need.

Every call goes to https://e9sites.com.

Additive changes -- new endpoints, new fields, new optional query parameters -- land in /api/v1/ without a version bump. A breaking change would move to a new prefix, so code written against v1 keeps working.

Basics

API Basics covers what every call needs: a token, the right header, the shape of requests and responses, what an error looks like, and which role the call requires.

Permissions

Reading requires membership of the site. Writing requires the editor role. A few operations require admin.

Conventions

Requests and responses are JSON, with two exceptions: media uploads are multipart/form-data, and the public contact endpoint is form-encoded. The API never picks a format from your Accept header. When an endpoint can return something other than JSON, you ask with a query parameter such as ?dl=yaml.

Errors

Every error uses the same shape -- RFC 9457 Problem Details -- and the content type application/problem+json.

First Request

Two calls are enough to confirm your token works before you write anything larger.

Tokens

Every API call must be authenticated. An anonymous request returns 401.

Endpoints

Every endpoint below is scoped to one site, and the site is named by its domain in the URL path. Replace mysite.e9sites.com with your own domain, and put your token in an environment variable called ENINE_TOKEN.

Two groups are deliberately not documented here because they are not part of site management: /api/chat/ drives the built-in chat builder, and /api/contact/ receives submissions from your own site's contact form.

Content

Every category, section, and content item on your site is an artifact. Categories are roots; items are their children.

Mapping

A map is a cross-reference between two items -- a project and the service it used, an article and the person who wrote it. Each one appears on the other's page.

Media

Uploading is multipart/form-data on the field file, up to 10 MB per file. You can send several in one call.

SEO and AEO

A duplicate canonical returns 409.

Sites

You get 201 on success and 409 if the domain is already taken.

Tags

Tags belong to the site; assignments belong to artifacts. Create the tag once, then assign it wherever it applies.

Transfer

These are the API equivalents of the Export menu in the manager, which makes them the simplest way to back up a site on a schedule.

Links

There is no writable url field on an artifact. Every outbound destination -- a link on a card, a social profile, a phone number, an email -- is a catalogue entry that artifacts and the site config point at.

Team

Roles are reader, editor, and admin, and both username and role are required when adding someone.