Sourceflow API (1.0.0)

Download OpenAPI specification:

This documentation details the API for the Sourceflow platform.

Where endpoints require authentication, it will be marked as OAuth2.0. Authentication uses the client credentials flow of OAuth 2.0. See https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow for more information.

The token endpoint is /_sf/api/oauth/token.json. Authenticated endpoints require an Authorization header with the value Bearer TOKEN, where TOKEN is a UUID valid for 1 hour.

Authentication

Obtain OAuth2 access tokens using the client credentials flow

Get access token

Obtain a Bearer token using the OAuth 2.0 client credentials flow. The returned token is valid for 1 hour and must be included in subsequent authenticated requests as Authorization: Bearer TOKEN.

Request Body schema: application/json
required
grant_type
required
string
Value: "client_credentials"
client_id
required
string

Your OAuth2 client ID

client_secret
required
string

Your OAuth2 client secret

Responses

Request samples

Content type
application/json
{
  • "grant_type": "client_credentials",
  • "client_id": "your-client-id",
  • "client_secret": "your-client-secret"
}

Response samples

Content type
application/json
{
  • "access_token": "5b83dc8e-b95b-4c68-9e94-368a63e4b4f3",
  • "token_type": "bearer",
  • "expires_in": 3599
}

Jobs

Create, update, and delete job postings

Get all jobs

Returns all job records.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a new job

Create a new job posting. external_reference and url_slug must be unique. Set skip_webhook: true in the top-level body to suppress job webhooks.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
required
object (JobInput)
skip_webhook
boolean

Skip firing job webhooks for this request.

Responses

Request samples

Content type
application/json
{
  • "job": {
    },
  • "skip_webhook": true
}

Response samples

Content type
application/json
{
  • "action": "create",
  • "status": 0,
  • "job": {
    }
}

Update or create a job (by external_reference)

If a job with the given external_reference exists it will be updated; otherwise a new job will be created. Returns an action field indicating whether the record was created or updated. Set skip_webhook: true in the top-level body to suppress job webhooks.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
required
object (JobInput)
skip_webhook
boolean

Skip firing job webhooks for this request.

Responses

Request samples

Content type
application/json
{
  • "job": {
    },
  • "skip_webhook": true
}

Response samples

Content type
application/json
{
  • "action": "create",
  • "status": 0,
  • "job": {
    }
}

Update or create a job using simplified category names

Same upsert behaviour as /jobs/update_or_create.json but accepts human-readable category names (e.g. sector names) instead of UUIDs. Use /jobs/simplified_categories.json to retrieve the available names. Set skip_webhook: true in the top-level body to suppress job webhooks.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
required
object (SimplifiedJobInput)

Simplified job creation/update using category names instead of UUIDs

skip_webhook
boolean

Skip firing job webhooks for this request.

Responses

Request samples

Content type
application/json
{
  • "job": {
    },
  • "skip_webhook": true
}

Response samples

Content type
application/json
{
  • "action": "create",
  • "status": 0,
  • "job": {
    }
}

Update an existing job

Partially update an existing job. Only fields included in the payload will be changed. Setting a field to null will clear its value.

The {jobId} can be either the external_reference used when creating the job, or the Sourceflow UUID returned on creation. Set skip_webhook: true in the top-level body to suppress job webhooks.

Authorizations:
oauth2ClientCredentials
path Parameters
jobId
required
string

Sourceflow UUID or external_reference of the job

Request Body schema: application/json
required
required
object (JobInput)
skip_webhook
boolean

Skip firing job webhooks for this request.

Responses

Request samples

Content type
application/json
{
  • "job": {
    },
  • "skip_webhook": true
}

Response samples

Content type
application/json
{
  • "action": "create",
  • "status": 0,
  • "job": {
    }
}

Delete a job

Permanently delete a job from the website and search index. This cannot be undone and will remove the job's web page (potentially breaking existing links).

If you only want to hide a job, use PATCH to set expires_at to a date in the past.

The {jobId} can be either the external_reference or the Sourceflow UUID.

Authorizations:
oauth2ClientCredentials
path Parameters
jobId
required
string

Sourceflow UUID or external_reference of the job

Responses

Retrieve all live job references

Returns an array of external_reference strings for all currently live jobs.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • "JOB-12345",
  • "JOB-67890"
]

Get job publish status

Check whether a job's page has been published and is publicly accessible. When a job is first created there is a short delay before the page is live. Poll this endpoint to know when the job is available.

Authorizations:
oauth2ClientCredentials
query Parameters
id
required
string
Example: id=09605

The external_reference or Sourceflow UUID of the job

Responses

Response samples

Content type
application/json
{
  • "published": true
}

Get similar jobs

Returns jobs similar to a specified job, based on category matching.

query Parameters
job_id
required
string

The external_reference or Sourceflow UUID of the source job

Responses

Response samples

Content type
application/json
{
  • "jobs": [
    ]
}

Search for jobs

Search and filter the job index. Supports text queries, category filters, and commute-time filtering. Pagination is supported via page_token.

Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "job_search": {
    }
}

Response samples

Content type
application/json
{
  • "jobs": [
    ],
  • "page_token": "string"
}

Job Categories

Retrieve job category definitions and their available values

Get all available categories

Returns all job categories with their metadata.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get all simplified categories

Returns all categories in a simplified format designed for use with the /jobs/update_or_create_simplified.json endpoint. Keys match the field names accepted by that endpoint.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
{
  • "sectors": [
    ],
  • "employment_types": [
    ],
  • "salary_bands": [
    ],
  • "consultants": [
    ],
  • "regions": [
    ],
  • "pay_period": [
    ],
  • "hybrid_working": [
    ]
}

Get values for an individual category

Returns detailed information for a single category including all of its values.

Authorizations:
oauth2ClientCredentials
path Parameters
categoryId
required
string <uuid>

UUID of the category

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifier": "string",
  • "category_values": [
    ]
}

CMS

Manage CMS content categories and their schemas

List all dynamic pages

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • { }
]

Create a dynamic page

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
object (DynamicPageInput)

Responses

Request samples

Content type
application/json
{
  • "dynamic_page": {
    }
}

Update a dynamic page

Authorizations:
oauth2ClientCredentials
path Parameters
pageId
required
string <uuid>

UUID of the page to update

Request Body schema: application/json
required
object (DynamicPageInput)

Responses

Request samples

Content type
application/json
{
  • "dynamic_page": {
    }
}

Get all CMS categories

Returns all CMS categories.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a CMS category

Creates a new CMS category with a defined schema.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
dataset_id
string <uuid>
name
required
string
description
string
required
Array of objects (CmsCategorySchemaField)
has_template
boolean
url_pattern
string
identifier
required
string
job_categorisation
boolean
is_job_categorisation_required
boolean
is_nested
boolean
default_sort_field
string
default_sort_direction
string
Enum: "ASC" "DESC"
simplified_api_name
string
category_type
Array of strings
locked_values
boolean

Responses

Request samples

Content type
application/json
{
  • "dataset_id": "8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0",
  • "name": "string",
  • "description": "string",
  • "schema": [
    ],
  • "has_template": true,
  • "url_pattern": "string",
  • "identifier": "string",
  • "job_categorisation": true,
  • "is_job_categorisation_required": true,
  • "is_nested": true,
  • "default_sort_field": "string",
  • "default_sort_direction": "ASC",
  • "simplified_api_name": "string",
  • "category_type": [
    ],
  • "locked_values": true
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifier": "string",
  • "category_values": [
    ]
}

Get a single CMS category

Returns a specific CMS category by ID, including its schema and all values.

Authorizations:
oauth2ClientCredentials
path Parameters
categoryId
required
string <uuid>

UUID of the CMS category

Responses

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifier": "string",
  • "category_values": [
    ]
}

Update a CMS category

Replaces the definition of an existing CMS category including its schema.

Authorizations:
oauth2ClientCredentials
path Parameters
categoryId
required
string <uuid>

UUID of the CMS category

Request Body schema: application/json
required
dataset_id
string <uuid>
name
required
string
description
string
required
Array of objects (CmsCategorySchemaField)
has_template
boolean
url_pattern
string
identifier
required
string
job_categorisation
boolean
is_job_categorisation_required
boolean
is_nested
boolean
default_sort_field
string
default_sort_direction
string
Enum: "ASC" "DESC"
simplified_api_name
string
category_type
Array of strings
locked_values
boolean

Responses

Request samples

Content type
application/json
{
  • "dataset_id": "8c4c51f1-f6f3-43bc-b65d-7415e8ef22c0",
  • "name": "string",
  • "description": "string",
  • "schema": [
    ],
  • "has_template": true,
  • "url_pattern": "string",
  • "identifier": "string",
  • "job_categorisation": true,
  • "is_job_categorisation_required": true,
  • "is_nested": true,
  • "default_sort_field": "string",
  • "default_sort_direction": "ASC",
  • "simplified_api_name": "string",
  • "category_type": [
    ],
  • "locked_values": true
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z",
  • "identifier": "string",
  • "category_values": [
    ]
}

Search CMS categories

Authorizations:
oauth2ClientCredentials
query Parameters
keyword
string
Example: keyword=test

Keyword to filter categories by name

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Create a category value

Creates a new value in the specified CMS category. Keys in schema_attributes must match the field names defined in the category's schema.

  • form fields: pass the UUID of the form
  • category fields: pass the UUID of a value from the referenced category
  • object fields: pass an array of objects, each with a generated UUID and field values
  • file fields: reference files by field name in the top-level files object, providing a filename and base64-encoded content
Authorizations:
oauth2ClientCredentials
path Parameters
categoryId
required
string <uuid>

UUID of the category

Request Body schema: application/json
required
object
object

File attachments keyed by the file field name as defined in the category schema

attachments_to_delete
Array of strings

IDs of existing attachments to remove

Responses

Request samples

Content type
application/json
{
  • "category_value": {
    },
  • "files": {
    },
  • "attachments_to_delete": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Update a category value

Replaces the data for an existing category value. Keys in schema_attributes must match the field names defined in the category's schema.

Pass attachment IDs in attachments_to_delete to remove existing files. Add new files via the files object using base64-encoded content.

Authorizations:
oauth2ClientCredentials
path Parameters
categoryId
required
string <uuid>

UUID of the category

categoryValueId
required
string <uuid>

UUID of the category value to update

Request Body schema: application/json
required
object
object

File attachments keyed by the file field name as defined in the category schema

attachments_to_delete
Array of strings

IDs of existing attachments to remove

Responses

Request samples

Content type
application/json
{
  • "category_value": {
    },
  • "files": {
    },
  • "attachments_to_delete": [
    ]
}

Response samples

Content type
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "name": {
    },
  • "created_at": "2019-08-24T14:15:22Z",
  • "updated_at": "2019-08-24T14:15:22Z"
}

Placements

Submit and manage placement data for analysis and reporting

Get all placements

Returns all placement records.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • { }
]

Update or create a placement

Placement is located by external_placement_id. If found it will be updated; otherwise a new placement record is created.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
object (PlacementInput)

Responses

Request samples

Content type
application/json
{
  • "placement": {
    }
}

Delete a placement

Deletes a placement identified by the external_placement_id query parameter.

Authorizations:
oauth2ClientCredentials
query Parameters
external_placement_id
required
string

External placement ID to delete

Responses

Webhooks

Create and manage webhooks for receiving job application and form submission events

Create a webhook

Creates a webhook that fires when subscribed events occur.

Supports job_application and form_submission event types in any combination. For form_submission triggers, omit form_id to receive all form submissions, or set it to restrict to a specific form. Use excluded_form_ids to receive all submissions except from specific forms (set form_id to null in this case).

Custom headers are included in every outgoing webhook POST and can be used for recipient-side authentication.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
object (WebhookInput)

Responses

Request samples

Content type
application/json
{
  • "webhook": {
    }
}

Delete a webhook

Authorizations:
oauth2ClientCredentials
path Parameters
webhookId
required
string <uuid>

UUID of the webhook to delete

Responses

Get example webhook payload

Returns an example of the payload that would be sent to a webhook endpoint.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
{ }

Retrigger a webhook event

Resends a previously fired webhook event using its event_id. Any expiring URLs or signatures in the payload are refreshed. Events can be retriggered for up to 90 days after they were first sent.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
event_id
required
string <uuid>

Responses

Request samples

Content type
application/json
{
  • "event_id": "5897f650-ee24-4862-9f22-ddc6a19cedb1"
}

Forms

Retrieve form schemas describing what data each form collects

Get all form schemas

Returns schema information for each form, describing what data is collected. Useful for understanding what fields will appear in a form_submission webhook payload.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • { }
]

Emails

Send emails via the Sourceflow platform, optionally from reusable templates.

The template workflow has three steps: create a template from a JSON configuration of components (POST /email_templates.json), list templates to discover the Liquid parameters each one needs (GET /email_templates.json), then send an email referencing the template_id and supplying those parameters (POST /emails/send_email.json). Raw html_body sends are still supported and require no template.

Create an email template

Creates a reusable email template from a JSON configuration of components and their options.

A template is an ordered list of component "blocks"; each block names a component (key) and supplies that component's options (props). The available components and their valid prop keys are defined per-site (published to the site's component library). The header and footer are rendered automatically and must not be included in the config.

On save, the system scans the fully-assembled template (all components plus the props) for Liquid {{ variable }} placeholders and records the distinct set in the returned parameters — these are the values a caller must supply when sending with this template. Site-level variables that are filled automatically (site.name, site.url, unsubscribe_url) are excluded.

Requires the email_templates/write permission.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
required
object

Responses

Request samples

Content type
application/json
{
  • "email_template": {
    }
}

Response samples

Content type
application/json
{
  • "id": "5f1c…",
  • "name": "Application received",
  • "email_type": "job_application",
  • "parameters": [
    ]
}

List email templates

Lists every email template for the current site, including the parameters each one needs.

Use the returned parameters to discover which variable names to pass to parameters on the send endpoint. An empty array means the template needs no caller-supplied parameters.

Requires the email_templates/read permission.

Authorizations:
oauth2ClientCredentials

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get a single email template

Returns a single template by id, including its full component config (template_json) — use this to load a saved template into an editor before updating it. Unlike the list endpoint (GET /email_templates.json), which returns only metadata and parameters, this response includes the template_json body.

The typical round-trip is: GET /email_templates/{id}.json to load → edit → PATCH /email_templates/{id}.json to save.

Requires the email_templates/read permission.

Authorizations:
oauth2ClientCredentials
path Parameters
id
required
string

ID of the email template (as returned by create or list).

Responses

Response samples

Content type
application/json
{
  • "id": "5f1c…",
  • "name": "Application received",
  • "email_type": "job_application",
  • "parameters": [
    ],
  • "template_json": [
    ]
}

Update an email template

Updates an existing template. Partial updates are supported — send only the fields you want to change. Omitting template_json leaves the stored component blocks untouched; including it replaces the blocks entirely and re-validates them against the site's component library (same rules as create). When the blocks change, parameters is recomputed.

PUT is also accepted and behaves identically.

Requires the email_templates/write permission.

Authorizations:
oauth2ClientCredentials
path Parameters
id
required
string

ID of the email template (as returned by create or list).

Request Body schema: application/json
required
required
object

Partial update — supply only the fields you want to change.

Responses

Request samples

Content type
application/json
Example
{
  • "email_template": {
    }
}

Response samples

Content type
application/json
{
  • "id": "5f1c…",
  • "name": "Application received (v2)",
  • "email_type": "job_application",
  • "parameters": [
    ]
}

Update an email template (alias of PATCH)

Identical to PATCH /email_templates/{id}.json. See that operation for request and response details.

Requires the email_templates/write permission.

Authorizations:
oauth2ClientCredentials
path Parameters
id
required
string

ID of the email template (as returned by create or list).

Request Body schema: application/json
required
required
object

Partial update — supply only the fields you want to change.

Responses

Request samples

Content type
application/json
{
  • "email_template": {
    }
}

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "email_type": "string",
  • "parameters": [
    ]
}

Delete an email template

Permanently deletes the template.

Requires the email_templates/write permission.

Authorizations:
oauth2ClientCredentials
path Parameters
id
required
string

ID of the email template (as returned by create or list).

Responses

Response samples

Content type
application/json
{
  • "error": {
    }
}

Send an email

Sends an email via the Sourceflow platform.

The body of the email can be provided in exactly one of two ways: a raw html_body, or a template_id plus a parameters object that fills the template's Liquid variables. Supplying both html_body and template_id, or neither, returns 400.

Use application/json for plain or HTML emails without attachments. Use multipart/form-data when including file attachments.

Requires the emails/send permission.

Authorizations:
oauth2ClientCredentials
Request Body schema:
required
to
required
string

Recipient(s). Comma-separated for multiple recipients.

subject
required
string
from
string <email>

Sender address the email is sent from. If omitted, the site's default sending address is used. The domain of this address must be a validated (verified) sending domain for the site; addresses on unvalidated domains are rejected with 400.

body
string

Plain-text body. When html_body is omitted and no template is used, this is converted to HTML. Optional when a template is used.

html_body
string

Raw HTML body. Displayed to clients that support HTML email. Mutually exclusive with template_id.

template_id
string

ID of an email template (see GET /email_templates.json) to render as the email body. Mutually exclusive with html_body.

object

Values for the template's Liquid variables; only meaningful with template_id. Nested objects map to dotted variable names — e.g. {{ candidate.name }} is supplied as { "candidate": { "name": "Jane" } }. Variables left unsupplied render as empty strings.

reply_to
string <email>

Sets the Reply-To header on the email. If omitted, replies will go to the sending address.

attachments
Array of strings <binary> [ items <binary > ]

File attachments (max 5 MB per file, 15 MB total). Only supported when the request is sent as multipart/form-data.

Responses

Request samples

Content type
Example
{
  • "to": "jane@example.com",
  • "from": "careers@example.com",
  • "subject": "Thanks for applying",
  • "template_id": "5f1c…",
  • "parameters": {}
}

Response samples

Content type
application/json
{
  • "message": "Email with subject 'Thanks for applying' sent successfully to jane@example.com"
}

API Users

Provision and manage API partner users

Provision an API user

Provisions a new API partner user, returning client credentials.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "api_user": {
    }
}

Response samples

Content type
application/json
{
  • "message": "API User 'Partner Name API User' provisioned.",
  • "user": {
    }
}

Customers

Global-level API for provisioning customers, sites, and API users. Base URL is https://app.sourceflow.co.uk/_sf/api/v1

Provision a new customer

Creates a new Customer entity and assigns an initial user. Returns credentials for the user that can be used for future site-level API calls.

This is a global-level API. The base URL for customer endpoints is https://app.sourceflow.co.uk/_sf/api/v1 regardless of which site is being managed.

Requires elevated global API permissions — contact Sourceflow if you have a use case for this.

Authorizations:
oauth2ClientCredentials
Request Body schema: application/json
required
object
object

Responses

Request samples

Content type
application/json
{
  • "customer": {
    },
  • "user": {
    }
}

Provision a new site for a customer

Creates a new site under the specified customer.

This is a global-level API. The base URL for customer endpoints is https://app.sourceflow.co.uk/_sf/api/v1.

Requires elevated global API permissions.

Authorizations:
oauth2ClientCredentials
path Parameters
customerId
required
string <uuid>
Request Body schema: application/json
required
object

Responses

Request samples

Content type
application/json
{
  • "site": {
    }
}

Provision an API user for a customer

Provisions an API user under the specified customer. If a user with the given name already exists and reset_password is not set, only the client_id is returned.

This is a global-level API. The base URL for customer endpoints is https://app.sourceflow.co.uk/_sf/api/v1.

Requires elevated global API permissions.

Authorizations:
oauth2ClientCredentials
path Parameters
customerId
required
string <uuid>
Request Body schema: application/json
required
user_name
string

Name for the API user

reset_password
boolean

If true, resets and returns new credentials even if the user already exists. If omitted and the user already exists, only the client_id is returned.

Responses

Request samples

Content type
application/json
{
  • "user_name": "Partner Name API User",
  • "reset_password": true
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "user": {
    }
}

Images

Manage images stored in the Sourceflow Image Manager service (image-manager.sourceflow.co.uk).

Authentication flow (two steps):

  1. POST /_sf/api/v1/auth_tokens.json on your Sourceflow site → receive a short-lived JWT
  2. Pass that JWT as Authorization: Bearer <token> on all Image Manager requests

Scopes — request only what you need when getting the token:

  • image/upload — required to upload images
  • image/delete — required to delete images
  • Read operations (list, get) accept any valid token regardless of scope

CDN URLs — uploaded images are served from https://cdn.sourceflow.co.uk/__gallery/{uuid}

Get Image Service token

Issues a short-lived JWT for use with Image Manager endpoints. The JWT is signed with a shared secret and carries the requested scope claims.

This endpoint is intended for use within the Sourceflow CMS UI and requires an active CMS session (cookie-based). It is not part of the machine-to-machine OAuth 2.0 flow used by the rest of this API.

Request only the scope(s) you need:

  • image/upload — required to upload images
  • image/delete — required to delete images
Request Body schema: application/json
required
scope
required
Array of strings
Items Enum: "image/upload" "image/delete"

Permissions to grant the token. Request only the scope(s) needed for the operation.

Responses

Request samples

Content type
application/json
{
  • "scope": [
    ]
}

Response samples

Content type
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c2VyLTEyMyIsInNpdGVfaWQiOiJzaXRlLWFiYyIsInNjb3BlIjpbImltYWdlL3VwbG9hZCIsImltYWdlL2RlbGV0ZSJdfQ.signature"
}

List images

Returns images belonging to the authenticated site, ordered newest-first. Supports cursor-based pagination via lastItemId.

Requires any valid Image Service token (no specific scope required).

Authorizations:
imageServiceBearer
query Parameters
size
integer [ 1 .. 100 ]
Default: 10

Number of images per page (1–100, default 10)

lastItemId
string <uuid>

UUID of the last image from the previous page, for cursor pagination

Responses

Response samples

Content type
application/json
{}

Upload an image

Uploads an image as a base64-encoded string. The service detects the real MIME type from the binary content (not the filename) and rejects non-image files.

On success the file is stored in S3 at __gallery/{uuid} and served via the CDN at https://cdn.sourceflow.co.uk/__gallery/{uuid}.

Requires a token with the image/upload scope.

Authorizations:
imageServiceBearer
Request Body schema: application/json
required
image_name
required
string

Filename for the image.

image
required
string <byte>

Base64-encoded image file content. The service validates the real MIME type from the binary content — the filename extension is not used for type detection.

Responses

Request samples

Content type
application/json
{
  • "image_name": "profile-photo.jpg",
  • "image": "/9j/4AAQSkZJRgABAQEASABIAAD..."
}

Response samples

Content type
application/json
{}

Get image by key

Returns metadata for a single image by its UUID. Requires any valid Image Service token (no specific scope required).

Authorizations:
imageServiceBearer
path Parameters
key
required
string <uuid>

UUID of the image

Responses

Response samples

Content type
application/json
{}

Delete an image

Permanently deletes an image from both DynamoDB and S3. This cannot be undone.

The token must belong to the same site that owns the image. If the S3 deletion fails after the DynamoDB record is removed, a rollback is automatically attempted to restore the metadata record.

Requires a token with the image/delete scope.

Authorizations:
imageServiceBearer
path Parameters
key
required
string <uuid>

UUID of the image to delete

Responses

Response samples

Content type
application/json
{
  • "status": "Deleted",
  • "id": "550e8400-e29b-41d4-a716-446655440000"
}