Lincoln Cannon LLC

Assets API Integration Guide

Schemas and Try it: API Reference (assets). This page is an Integration Guide. Related: Knowledge API Integration Guide · SSO Integration Guide

Manage unpublished media libraries for your Lincoln Cannon LLC account: named libraries, file inventory, and publish to the public CDN (https://assets.lincolncannon.co in production; https://assets-dev.lincolncannon.co on the development API). This is not the chat/agent API — for that see Agent API Integration Guide. It is not the knowledge API — for document libraries see Knowledge API Integration Guide.

Base URL: https://api.lincolncannon.co/assets. If your integration contact gives you a non-production API base, use https://api-dev.lincolncannon.co/assets instead.

Authentication

Send one of:

HeaderWho
Authorization: Bearer <id_token>Organization owner account, or an additional mailbox your integration contact configures. Obtain tokens per SSO Integration Guide.
x-api-keyAPI key your integration contact issued for your account.

Do not send an invalid or expired Bearer token together with an API key — a present Bearer that fails is not ignored. Missing credentials → Authorization required.

CORS: the API echoes a valid Origin on responses. Browser preflight is handled automatically.

Libraries

A library is one unpublished media collection. Lincoln Cannon LLC assigns the id (UUID). name is required, unique in your account (case-insensitive), and may be renamed.

Supported types:

typeclassUse
curatedcuratedYou and agents write files
uploadreadonlyYour HTTP upload only; agents may list, read, share, and publish

Unknown type values are rejected: type must be one of: curated, upload. class must match the type (class must be curated for type curated, class must be readonly for type upload). class, type, and visibility cannot be changed after create: class, type, and visibility cannot be changed after create.

Public library JSON (success bodies). Fields may grow; ignore unknown keys.

FieldNotes
idLibrary UUID
nameHuman-facing name
classcurated or readonly
typecurated or upload
visibilityexternal (default) or internal (org-session agent tools only; cannot be shared)
enabledDefaults true
publicKeyPrefixPrefix under the public CDN for published objects from this library

Creating a library with this API grants no agents. Associate them separately. Creating an agent (management UI or repository sync your integration contact enables) also creates a curated library named after that agent. For repository-managed agents, list associated library names in the agent definition your contact supplies (assetLibraries); that list is the complete set after each sync — see Agent API Integration Guide.

GET /libraries

List libraries for the authenticated account.

POST /libraries

JSON body:

{ "name": "Brand images", "class": "curated", "type": "curated", "enabled": true }

enabled may be omitted (defaults true).

Upload library (your HTTP files; agents may still list, read, share, and publish):

{ "name": "Press kit", "class": "readonly", "type": "upload" }

Typical errors: name is required, name is already in use, name is too long, name must not contain #, type must be one of: curated, upload, class must be curated for type curated, class must be readonly for type upload.

GET /libraries/{id}

{id} is the library UUID. Typical error: library was not found.

PUT /libraries/{id}

JSON body (all optional): { "name": "New name", "enabled": false }. Sending class, type, or visibility returns class, type, and visibility cannot be changed after create.

DELETE /libraries/{id}

Deletes the library, its associations, files in that library, unpublished files for that library, and published CDN objects for that library.

Files

type=upload and type=curated libraries accept files through these routes. You PUT bytes to a short-lived URL. Lincoln Cannon LLC assigns each file a fileId (UUID). Inventory name is a relative POSIX path unique in that library (logo.png, generated/uuid.jpg). Folders are not separate objects — group on / in name. File list is this inventory API — not a browse of underlying storage. Publication bookkeeping entries are not listed as customer files.

Do not POST file bytes through this API.

Allowed extensions: .png, .jpg, .jpeg, .webp, .gif, .svg, .pdf, .md, .txt, .json, .csv, .doc, .docx, .htm, .html, .xls, .xlsx. Maximum 10 MB (byteSize ≤ 10485760). Audio, video, and sidecar names (*.metadata.json) are rejected. name must not start with /, contain .., or be a sidecar path.

Quotas (per library): 500 objects / 200 MiB for type=curated libraries and every visibility=internal library; 500 published objects; 30 mutations per minute; 20 publishes per minute.

Public file JSON (ignore unknown keys):

FieldNotes
fileIdFile UUID
nameRelative POSIX path unique in this library
byteSizeExact size in bytes; must match the PUT
contentMd5Echoed when you sent it
contentTypeMIME type matching the extension
createdAtISO timestamp when the file was first created
statuspending until complete; then complete
publicUrlPresent after a successful publish

downloadUrl appears on GET (and complete) for unpublished bytes. uploadUrl / uploadHeaders appear on initiate and replace.

GET /libraries/{id}/files

Optional query: prefix (path prefix, for example generated/), cursor (the last fileId from the previous page), limit (default 100, maximum 500). When more names remain, the response includes cursor.

POST /libraries/{id}/files

Start an upload, or replace the existing file when name already exists in this library (case-insensitive). JSON body (required name, byteSize):

{ "name": "logo.png", "byteSize": 12000 }

Optional contentMd5: 32-character hex MD5 of the bytes. Optional contentType: must match the file extension when sent.

Success includes uploadUrl and uploadHeaders. HTTP PUT the bytes to uploadUrl with those headers (Content-Type and Content-Length). Then call complete.

Typical errors: library was not found, library is not writable, name is required, name must have an assets extension, name must be a relative file path, name must not be a sidecar, byteSize is required, byteSize exceeds maximum, curated object quota exceeded, curated byte quota exceeded, RATE_LIMITED.

GET /libraries/{id}/files/{fileId}

{fileId} is the file UUID. Success includes downloadUrl when the file is complete. Optional query share=true lengthens the presigned download TTL (24 hours) for shareable (visibility=external) libraries; internal libraries cannot be shared (Internal libraries cannot be shared.). Typical error: file was not found.

POST /libraries/{id}/files/{fileId}

Replace the same fileId. Same body as create. Returns a new uploadUrl. Call complete after PUT. Sending another file’s name returns name is already in use.

POST /libraries/{id}/files/{fileId}/complete

Empty body. Confirms the PUT. PUT must already have succeeded with the same byteSize.

Typical errors: uploaded object was not found, uploaded object size does not match byteSize.

DELETE /libraries/{id}/files/{fileId}

Deletes that file’s unpublished object, inventory row, and published CDN object when present. Typical error: file was not found.

POST /libraries/{id}/files/{fileId}/publish

Empty body. Copies this unpublished file to the public CDN. Success JSON includes publicUrl. The unpublished file remains the source of truth. While continuously published, the public key stays the same. Republish after unpublish receives a new public key.

Typical errors: file is not complete, published object quota exceeded, revision conflict, RATE_LIMITED. 503 means publish is unavailable — contact your integration contact.

POST /libraries/{id}/files/{fileId}/unpublish

Empty body. Removes this file from the public CDN. Typical errors: file was not found, revision conflict, RATE_LIMITED.

Associations

Replace-sets. The array you send is the complete list.

Agents and workflows are consumers. They are not created here. Use the agent id or workflow definition id (UUID) your integration contact already issued. Associating an agent that is not in your account returns agent was not found. Library associations for manifest-managed agents cannot be changed here — PUT returns agent associations are managed by the agent manifest. GET still works. For those agents, list library names in the agent manifest (assetLibraries); see Agent API Integration Guide.

GET / PUT /libraries/{id}/consumers

PUT body:

{ "consumers": [{ "kind": "agent", "consumerId": "<agent-uuid>" }] }

kind is agent or workflow. consumerId is that consumer’s UUID.

GET / PUT /consumers/{kind}/{id}/libraries

kind is agent or workflow. {id} is that consumer’s UUID.

PUT body:

{ "libraryIds": ["<library-uuid>"] }

Empty arrays mean no associations.

Typical errors: kind must be one of: agent, workflow, libraryIds must be an array, libraryIds must be ids, consumers must be an array, consumerId is required, agent was not found, agent associations are managed by the agent manifest.

Errors

JSON { "error": "<message>" } (ignore extra keys). Typical cases:

StatusTypical meaning
401Missing or invalid credentials
403Access denied (for example Email is not verified)
429Rate limited (Too Many Requests / RATE_LIMITED) — retry with backoff
400Invalid body or state (for example name is already in use, library is not writable, class, type, and visibility cannot be changed after create, agent associations are managed by the agent manifest). See the API Reference (assets) for full schemas
404library was not found, file was not found, agent was not found
409revision conflict
503Publish or library service unavailable — contact your integration contact

MCP: the same routes appear as tools for a registered API key or a customer Bearer session (see MCP Integration Guide).