Files#
Store briefs, plans, reports, and notes against a campaign, activity, or creator, and read them back.
Authentication required
Authorization header. See the Authentication guide for setup instructions.GET /v1/files#
List the files attached to one campaign, activity, or creator, including who added each file and whether a person uploaded it or an AI assistant wrote it.
GET /v1/files?owner_type=...&owner_id=...
Authorization: Bearer {token}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| ownerType | 'campaign' | 'activity' | 'creator' | Required | Which kind of record this file belongs to: campaign, activity, or creator. |
| ownerId | string (UUID) | Required | Identifier of the campaign, activity, or creator. |
| organizationId | string (UUID) | — | Organization identifier. |
Response#
Returns { items, totalCount, facets, _meta } with paginated results.
POST /v1/files#
Create a text, markdown, or CSV file on a campaign, activity, or creator by supplying its content directly. Use this to save a written report, summary, plan, or notes.
POST /v1/files
Authorization: Bearer {token}
Content-Type: application/json
{
"owner_type": "...",
"owner_id": "...",
"file_name": "...",
"content_type": "...",
"content": "Note content here."
}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| ownerType | 'campaign' | 'activity' | 'creator' | Required | Which kind of record this file belongs to: campaign, activity, or creator. |
| ownerId | string (UUID) | Required | Identifier of the campaign, activity, or creator. |
| organizationId | string (UUID) | — | Organization identifier. |
| fileName | string | Required | File name including its extension, for example "wrap-report.md". |
| contentType | 'text/markdown' | 'text/plain' | 'text/csv' | Required | Media type of the supplied content. |
| content | string | Required | The complete text content to store. |
| description | string | null | — | Short note about what this file contains and why it was attached. |
Response#
Returns { data, _meta } with the result.
GET /v1/files/:id/download#
Get a short-lived authorized URL for reading one private file, so it can be opened or fetched and analysed.
GET /v1/files/:id/download
Authorization: Bearer {token}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Unique identifier (UUID v4). |
Response#
Returns { data, _meta } with the result.
PATCH /v1/files/:id#
Update the name of a file attached to a campaign, activity, or creator so it says what the document actually is.
PATCH /v1/files/:id
Authorization: Bearer {token}
Content-Type: application/json
{
"file_name": "..."
}Parameters#
| Name | Type | Required | Description |
|---|---|---|---|
| id | string (UUID) | Required | Unique identifier (UUID v4). |
| fileName | string | Required | A clearer name for this file, including its extension. |
Response#
Returns { data, _meta } with the result.