Resource API integration
Discover a site and create or update IIIF resources from an unattended catalogue or import pipeline.
1. Create a scoped token
Sign in, open Account settings, and create a token for one site with site:read and resource:write. Copy it when shown; it cannot be retrieved later.
2. Discover the site
export IIIF_SITE_API=https://<account-host>
export IIIF_SITE_TOKEN=iiif_pat_replace_me
curl --fail-with-body \
-H "Authorization: Bearer $IIIF_SITE_TOKEN" \
"$IIIF_SITE_API/api/v1/sites"A bearer token sees only its assigned site. GET /api/v1/sites/:siteId/resources next to obtain the current numeric revision and resource IDs.
3. Write at a revision
POST a resource to /api/v1/sites/:siteId/resources with revision, slug, and a complete IIIF Presentation 3 document. PUT the same fields to /resources/:resourceId to update a copied resource.
A 409 revision_conflict means another writer won. GET the latest content, reapply the change, and retry with its revision. Quotas and account locks apply to bearer requests.
Errors and revocation
Errors use {"error":{"code":"…","message":"…"}}. Revoke credentials from Account settings; expiry, revocation, site scope, and account locks take effect on the next request.
The integration API is server-to-server and does not enable cross-origin credentialed browser requests. Resource changes appear in the account immediately; queue a preview build from the UI when the import batch is complete.