Skip to navigation

Run Style Agent File

Run a Style Agent check on an uploaded document.

Accepts PDF, Word (.docx), HTML, XML (including DITA), Markdown, and plain-text files. The file is uploaded unchanged and checked in the format its content is detected as, so the check runs against the document as submitted. The extension doesn’t change how content is analyzed: a .txt file that contains an HTML document is checked as HTML.

.txt uploads are accepted whatever markup they contain. An .html or .htm upload must begin with <!DOCTYPE html> or an <html> root element. (Binary content in a .txt is typed by its bytes as usual.)

Behaves like POST /style-agent/run otherwise: wait=true blocks for the result (201 Created), the default returns 202 Accepted with a workflow id to poll via GET /style-agent/workflows/{workflow_id}. A large file can take longer than the synchronous request window, so prefer polling for those.

For plain-text, HTML, and XML files, issue positions are offsets into the text of the file you uploaded, counted in UTF-16 code units (JavaScript string indices). For PDF and Word files, positions index the text extracted from the document; use each issue’s context_surface to locate it in the original.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Query parameters

waitbooleanOptionalDefaults to false

Request

This endpoint expects a multipart form containing a file.
style_guide_idstring or nullOptional>=1 character

Style guide ID to check the document against. target_id is a deprecated alias for this field; send exactly one of the two names.

content_profile_idstring or nullOptional>=1 character

Language-service content profile ID for style checking.

domain_idslist of strings or nullOptional
Terminology domain IDs.
document_refstring or nullOptional1-512 characters

Caller-provided document identifier for tracking across scans.

urlstring or nullOptional>=1 character
Document URL.
document_namestring or nullOptional>=1 character
Document name or title.
webhook_urlstring or nullOptionalformat: "uri"1-2083 characters
Optional webhook URL for async result delivery.
file_uploadfileRequired

The document to analyze. Text (.txt), Markdown (.md), HTML (.html, .htm), XML including DITA (.xml, .dita), Word (.docx), and PDF (.pdf) files are accepted. The max file size is 7 MB. Content is analyzed in the format it is detected as, whatever the extension: a .txt file that contains HTML is checked as HTML. For plain-text, HTML, and XML files, issue positions are offsets into the text of the file you uploaded, counted in UTF-16 code units.

Response

Successful Response
workflow_idstring
Workflow ID for tracking
statusenum
Workflow status
Allowed values:
started_atdatetime
Workflow start time
request_idstring or nullOptional
Request tracking ID
document_refstring or nullOptional

Caller-provided document identifier.

check_typeenumOptional

How this check is counted: ‘batch’ for a document checked as part of a batch, ‘interactive’ for a direct /run check.

Allowed values:
assignedbooleanOptionalDefaults to true
Whether the check counts as authoring activity for an author.
batch_idstring or nullOptional

Owning batch id (agbw_<nanoid>); null unless this is a batch check.

resultobject or nullOptional

Execution result (if completed)

completed_atdatetime or nullOptional
Workflow completion time
duration_secondsdouble or nullOptional
Execution duration

Errors

401
Unauthorized Error
403
Forbidden Error
413
Content Too Large Error
422
Unprocessable Entity Error
500
Internal Server Error