Skip to main content

Context API Endpoints

This page documents all endpoints exposed by the Context API.

Base URL depends on your environment (see Base URLs for more information). All of the following endpoints are relative to that base URL.

Unless otherwise noted, all endpoints require Authorization: Bearer <access_token>.


GET /files/upload/presigned-url

Returns a presigned upload URL and an objectKey that uniquely identifies the file in storage.

Query parameters

ParameterTypeRequiredDescription
contentTypestringYesMIME type of the file to upload (for example, application/pdf, image/png)

Request

GET /latest/api/context-enrichment/files/upload/presigned-url?contentType=application/pdf HTTP/1.1
Host: knowledge-enrichment.ai.app.hyland.com
Authorization: Bearer <access_token>

Response

Status: 200 OK

FieldTypeDescription
presignedUrlstringPresigned URL for uploading the file directly to storage.
objectKeystringUnique identifier for the file in storage. Pass this in subsequent POST /content/process requests.
{
"presignedUrl": "https://<storage-endpoint>/contents/abc123.pdf?<signature>",
"objectKey": "testing/fae61283-571c-403a-b33f-c8d982158da9/documents/report.pdf"
}

PUT {presignedUrl}

Uploads the file to storage using the presigned URL from GET /files/upload/presigned-url. This request goes directly to storage, not to the Context API base URL.

Request

HeaderValue
Content-TypeMIME type of the file (for example, application/pdf)

Body: Raw binary content of the file. Do not include Authorization.

Response

Status: 200 OK — empty body on success


POST /content/process

Submits an enrichment job for one or more files.

Request

POST /latest/api/context-enrichment/content/process HTTP/1.1
Host: knowledge-enrichment.ai.app.hyland.com
Authorization: Bearer <access_token>
Content-Type: application/json

Body:

FieldTypeRequiredDescription
versionstringYesMust be "context.api/v2".
objectKeysarrayYesArray of file references. Each item must have either path (for files uploaded via presigned URL) or documentId (for files already in the Cloud Content Repository).
actionsobjectYesMap of action names to action configuration. See Actions for all available actions and their parameters.

objectKeys item:

FieldTypeDescription
pathstringobjectKey value returned by GET /files/upload/presigned-url
documentIdstringID of a document already ingested via the Data Curation API

Example:

{
"version": "context.api/v2",
"objectKeys": [
{ "path": "testing/fae61283-571c-403a-b33f-c8d982158da9/documents/report.pdf" }
],
"actions": {
"textSummarization": { "maxWordCount": 150 },
"textClassification": {
"classes": ["Report", "Contract", "Invoice", "Other"]
}
}
}

Response

Status: 200 OK

FieldTypeDescription
processingIdstringUnique identifier for this processing job. Use to poll results.
{
"processingId": "a3f9c821-4e3b-47e9-9b0c-1e7e29f87a12"
}

Error responses

400 Bad Request — validation error (invalid version, missing required fields):

{
"title": "Request Processing Error",
"detail": "Validation failed for one or more fields"
}

400 Bad Request — some objects don't exist or have incorrect content type:

{
"title": "Request Processing Error",
"detail": "Some objects specified in objectKeys do not exist or have an incorrect content type",
"notExistingObjects": [
"testing/abc123/documents/missing.pdf"
]
}

500 Internal Server Error — queue processing error:

{
"title": "Request Processing Error",
"detail": "An error occurred while sending a message to the queue",
"status": 500
}

GET /content/process/{processingId}/results

Polls the status of an enrichment job and retrieves results when complete.

Path parameters

ParameterTypeDescription
processingIdstring (GUID)The processingId returned by POST /content/process

Request

GET /latest/api/context-enrichment/content/process/a3f9c821-4e3b-47e9-9b0c-1e7e29f87a12/results HTTP/1.1
Host: knowledge-enrichment.ai.app.hyland.com
Authorization: Bearer <access_token>

Response

Status: 202 Accepted (while in progress) or 200 OK (when complete)

FieldTypeDescription
idstring (GUID)The processing job ID
timestampstringISO 8601 timestamp indicating when the result was generated
statusstringJob status (see the following values). May be null during early processing.
inProgressbooleantrue while the job is running. Stop polling when false.
resultsarrayArray of result objects per objectKey. Empty while inProgress is true.

Status values:

ValueTerminalDescription
PROCESSINGNoJob is being processed.
SUCCESSYesAll actions completed successfully.
PARTIAL_FAILUREYesJob completed, but one or more actions failed; check error fields in individual action results.
FAILUREYesJob failed entirely.

Action result structure:

Each action result is an object with the following structure:

FieldTypeDescription
isSuccessbooleantrue if the action completed successfully, false if it failed
resultvariesThe action result. Type depends on the action (see Actions for details). May be null if the action failed.
errorobject or nullError details if the action failed, null if successful.

Error object:

FieldTypeDescription
errorTypestringMachine-readable error type identifying the category of failure.
messagestringHuman-readable error message explaining what went wrong.

Error responses

404 Not Found — processing job does not exist or you don't have access:

{
"title": "Request Processing Error",
"detail": "Content processing result with specified ID does not exist",
"status": 404
}

400 Bad Request — job completed but general processing errors occurred:

{
"title": "Request Processing Error",
"detail": "Content processing failed",
"status": 400
}

Examples

While in progress (202 Accepted):

{
"id": "a3f9c821-4e3b-47e9-9b0c-1e7e29f87a12",
"timestamp": "2025-08-25T13:06:00.8286903+00:00",
"status": "PROCESSING",
"inProgress": true
}

When complete (200 OK):

{
"id": "a3f9c821-4e3b-47e9-9b0c-1e7e29f87a12",
"timestamp": "2025-08-25T13:06:00.8286903+00:00",
"status": "SUCCESS",
"inProgress": false,
"results": [
{
"objectKey": "testing/fae61283-571c-403a-b33f-c8d982158da9/documents/report.pdf",
"textSummary": {
"isSuccess": true,
"result": "This is a concise summary of the document content.",
"error": null
},
"textClassification": {
"isSuccess": true,
"result": "Report",
"error": null
}
}
]
}

GET /content/process/actions

Returns a list of available action names for the current environment.

Query parameters

ParameterTypeRequiredDescription
versionstringNoAPI version string (for example, context.api/v2). Defaults to v1 format if not provided.

Request

GET /latest/api/context-enrichment/content/process/actions HTTP/1.1
Host: knowledge-enrichment.ai.app.hyland.com
Authorization: Bearer <access_token>

Response

Status: 200 OK

Returns an array of available action names:

[
"imageDescription",
"imageMetadataGeneration",
"textMetadataGeneration",
"textClassification",
"textSummarization",
"imageClassification",
"imageEmbeddings",
"textEmbeddings",
"namedEntityRecognitionImage",
"namedEntityRecognitionText"
]

Error responses

400 Bad Request — invalid version parameter:

{
"title": "Validation error",
"detail": "Version must be null or one of the supported values (context.api/v2)."
}

GET /healthy

Health check endpoint. Returns 200 OK when the service is healthy. Returns 503 Service Unavailable if unhealthy. No authentication required.

Response

Status: 200 OK (healthy)

Body: "Healthy"

Status: 503 Service Unavailable (unhealthy)

Body: Status description string