API reference

Every call the API takes: what it reads, what it costs and what it answers. This page is made from the document the API serves, so it says what the API does today.

Addresshttps://api.sundayclerk.com/v1

Your key

Send it as a Bearer token. Make one on the API keys page, where your first call takes a click.

OpenAPI document

What calls cost

Reading companies, lists and what you watch costs nothing extra. Each call below says what it uses, and a call that fails is never charged.

Retries

Send an Idempotency-Key and a retried call is charged once.

Files and seals

A file never changes once it is sealed. Its PDF carries its fingerprint, the SHA-256 of its JSON, and its verify link, where anyone can check a copy.

Workspace overview

The workspace at a glance: its lists and the companies they found, the rows waiting for a person, how many companies it watches, the newest exclusions file's changes to watched companies, the last seven days' changes, and any family of checks that is stale or unavailable

GET/v1/home

Free.

Free. Also the MCP tool workspace_overview.

Answers 200 with

Name
listsnumber
newestListIdstring or null
companiesnumber
reviewobject
watchednumber
exclusionsobject or null
weeklist of object
attentionlist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/home" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Companies

Companies a name or an identifier finds

GET/v1/companies

A UEI or a CAGE code finds its company exactly; a name finds up to 100, 25 a page, each with its identifiers, place, registration status, risk band, adverse records by family, sites, newest record's date and why it came up. Filters narrow them by state, risk band, family of adverse records and active registration, and facets counts each option among all the name found. No model decides anything: the caller picks. Free.

Free. Also the MCP tool search_companies.

Parameters

NameInWhat it is
qrequiredstringqueryA company name, a UEI or a CAGE code.
modeone of search, suggestquerysuggest: what a person has typed so far, answered at once, by names that begin with it and no similar names. search when left out.
pagewhole numberqueryWhich page of companies, from 1.
statestringqueryOnly companies in these states, comma separated, as their registration states them (TX,CA).
riskstringqueryOnly companies with these risk bands, comma separated: high, elevated, low, not_enough_checked.
findingsstringqueryOnly companies with an adverse record in these families, comma separated: registrations, exclusions, workplace, environment, transport, product, health, finance, nonprofits, awards, courts, disclosures, ip, registries.
activeone of truequerytrue: only companies whose registration is active.

Answers 200 with

Name
querystring
identifiedobject or null
candidateslist of object
totalnumber
familiesnumber
pagenumber
pagesnumber
facetsobject

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/companies?q={q}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Matches one company now, in this request

POST/v1/companies/match

A UEI or CAGE code finds its company exactly. A name, with its address when you have it, is matched the way a list's row is, and looked up on the web when no record matches. status: identified (by UEI or CAGE code), matched (by name), review (the facts were not enough, or more than one company may be it: candidates holds them), or unresolved (no matching record in the sources checked). Your lists' rows still waiting that are written the same way take the answer. Free.

Free. Also the MCP tool match_company.

Body (JSON)

NameWhat it is
namestring or nullThe company's name, as you write it.
addressstring or nullIts street address.
citystring or nullIts city.
statestring or nullIts state or province.
postalstring or nullIts postal code.
countrystring or nullIts country.
websitestring or nullIts website.
ueistring or nullIts UEI, when you have it.
cagestring or nullIts CAGE code, when you have it.

Answers 200 with

Name
statusone of identified, matched, review, unresolved
companyobject or null
decidedBystring or null
candidateslist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. Neither a name, a UEI nor a CAGE code was sent.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged. not_in_plan: matching names comes with Pro; the message says the way to it. A UEI or CAGE code needs no plan.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
  • 503unavailable: the match could not be finished now; try again in a minute.
Example
curl -X POST "https://api.sundayclerk.com/v1/companies/match" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

One source's records of a company, a page at a time, in the order the company's record shows them (adverse first, then the newest), each citing its source, the record's key and the date of the file it was read from

GET/v1/companies/records

The company's record answers each source's first page and its total; this answers any page. Same access as companies.get. Free.

Free. Also the MCP tool company_source_records.

Parameters

NameInWhat it is
companyrequiredstringqueryThe company's id (sc_ and 16 hex characters).
sourcerequiredstringqueryThe source's id, as the company's record names it (src_ and 16 hex characters).
pagewhole numberqueryThe page, from 1.

Answers 200 with

Name
companyobject
sourcestring
pagenumber
pagesnumber
totalnumber
recordslist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402record_locked: this company's full record comes with the plan.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No company has this id, or no source has this id.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/companies/records?company={company}&source={source}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

A person's answer about evidence that reaches a company only through a name and address matching found to be it

POST/v1/companies/review

For a record (source, kind and key, as the company's record cites it: a facility's violation, an enforcement case, a charged-off loan): does it belong to this company? For a facility (site, as the company's record lists it under sites, linked by its named operator or owner): is it this company's, for every adverse record reached through it? "belongs" counts it for this workspace, "not_this_company" removes it from this workspace's view, and "undo" takes the answer back. A record's own answer, where given, comes before its facility's. Kept for this workspace alone; it never changes another workspace's evidence. Free.

Free. Also the MCP tool review_company.

Body (JSON)

NameWhat it is
companyrequiredstringThe company's id (sc_ and 16 hex characters).
decisionrequiredone of belongs, not_this_company, undoThe person's answer, or undo.
sitestringA facility's id, as the company's record lists it under sites.
sourcestringA record's source, as the company's record cites it (src_ and 16 hex characters).
kindstringThe record's kind, as cited.
keystringThe record's key, as cited.

Answers 200 with

Name
decisionone of belongs, not_this_company, null

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. Neither a facility nor a whole record citation was sent, or both were.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402record_locked: this company's full record comes with the plan.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No company has this id, or it has no record or facility waiting for review with these.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/companies/review" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company": "{company}", "decision": {decision}}'

One company as its records state it: its identifiers, names, addresses and sites, what each source says with its coverage, and its timeline, every fact citing its source, the record's key and the date of the file it was read from

GET/v1/companies/{id}

Full records come with the plan; before the trial the first company looked up opens, and while the plan is paused the first tenth of the companies watched open as they stood when it ended (asOf). Free.

Free. Also the MCP tool get_company.

Parameters

NameInWhat it is
idrequiredstringpathThe company's id, as a search answers it (sc_ and 16 hex characters).

Answers 200 with

Name
watchedboolean
watchOwnerobject or null
idstring
namestring
identifierslist of object
nameslist of object
addresseslist of object
siteslist of object
siteCountnumber
sourceslist of object
checkslist of object
eventslist of object
riskobject or null
asOfstring or null

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402record_locked: this company's full record comes with the plan; details.company names it, and the message says the way to it.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No company has this id.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/companies/{id}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

A company's relationships as its records state them, never inferred from a name or an address: its direct and ultimate parents, subsidiaries and group companies, international branches, a fund's manager, umbrella and feeders, its successor, and the companies it assigned trademarks to, took them from or pledged them to as recorded assignments state them

GET/v1/companies/{id}/relationships

Each relation says where it reads (above, below, related or transfers) and cites the record that states it, with its dates and whether it is current; each related company says how many sources hold a record of it and whether the workspace watches it. tree is the map, from the ultimate parent down to the direct subsidiaries. Comes with the full record, as companies.get does. Free.

Free. Also the MCP tool company_relationships.

Parameters

NameInWhat it is
idrequiredstringpathThe company's id, as a search answers it (sc_ and 16 hex characters).

Answers 200 with

Name
companyobject
relationslist of object
treelist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402record_locked: this company's full record comes with the plan; details.company names it, and the message says the way to it.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No company has this id.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/companies/{id}/relationships" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Lists

The workspace's lists, newest first, each with how far its check has come

GET/v1/lists

Free.

Free. Also the MCP tool list_lists.

Answers 200 with

Name
listslist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/lists" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Adds a list of companies and starts checking it: text from a spreadsheet (tab separated), a CSV file, or one name a line

POST/v1/lists

The header names say which column holds the name, your own id, a UEI or CAGE code, and the address; rows with a UEI or CAGE code are matched at once, names as the check reaches them. A list whose header names no such column waits for its columns (lists.columns). Free.

Free. Also the MCP tool check_list.

Body (JSON)

NameWhat it is
textrequiredstringThe list, as text: CSV, tab separated, or one name a line, with a header row when it has one.
namestringWhat to call the list; "Pasted list" when left out.

Answers 201 with

Name
idstring
namestring
columnslist of string
mappingobject
statusone of checking, done, needs_columns, needs_plan
createdAtstring
finishedAtstring or null
countsobject

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. The list could not be read, is empty, or is larger than a list holds.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/lists" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "{text}"}'

One list: how far its check has come (rows identified by UEI or CAGE code, matched by name, to review, with no matching record, still waiting), and a page of its rows as written, each with the company it names and its risk band; riskCounts counts the rows by their company's band as last scored

GET/v1/lists/{id}

Free.

Free. Also the MCP tool read_list.

Parameters

NameInWhat it is
idrequiredstringpathThe list's id, as creating it answers.
pagewhole numberqueryWhich page of rows, from 1.
statusone of waiting, identified, matched, review, unresolvedqueryOnly the rows in this state.
riskone of high, elevated, low, not_enough_checkedqueryOnly the rows whose company has this risk band, as last scored.

Answers 200 with

Name
summaryobject
rowslist of object
pagenumber
pagesnumber
riskCountsobject

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No list has this id in this workspace.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/lists/{id}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Says which of a list's columns holds what, for a list whose header did not, and starts its check

POST/v1/lists/{id}/columns

Each field takes a column's number from 0, or null; a name, UEI or CAGE column is needed. Free.

Free. Also the MCP tool set_list_columns.

Parameters

NameIn
idrequiredstringpath

Body (JSON)

Name
namewhole number or null
theirIdwhole number or null
ueiwhole number or null
cagewhole number or null
addresswhole number or null
address2whole number or null
citywhole number or null
statewhole number or null
postalwhole number or null
countrywhole number or null
websitewhole number or null
emailwhole number or null

Answers 200 with

Name
idstring
namestring
columnslist of string
mappingobject
statusone of checking, done, needs_columns, needs_plan
createdAtstring
finishedAtstring or null
countsobject

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No list has this id in this workspace.
  • 409The list's columns are set already.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/lists/{id}/columns" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

A list's rows that matching could not settle, oldest first, a page at a time: each row as written, the companies found for it side by side (name, address, where formed, website, identifiers), what matching made of each, and the facts that decided it in plain words

GET/v1/lists/{id}/review

suggested is the one company matching found to be the same, when there is exactly one. Free.

Free. Also the MCP tool rows_to_review.

Parameters

NameInWhat it is
idrequiredstringpathThe list's id, as creating it answers.
pagewhole numberqueryWhich page of rows to review, from 1.

Answers 200 with

Name
rowslist of object
pagenumber
pagesnumber
totalnumber

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No list has this id in this workspace.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/lists/{id}/review" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

A person's decision on a list's row awaiting review: the id of the company it names (one of those found), "none" when it is none of them, or "undo" to put a decided row back in review

POST/v1/lists/decide

Kept for the workspace, so the same row in a later list is decided at once. Free.

Free. Also the MCP tool decide_row.

Body (JSON)

NameWhat it is
listrequiredstringThe list's id, as creating it answers.
rowrequiredwhole numberThe row's number in the list, from 1.
choicerequiredstringA company id from the row's candidates, "none", or "undo".

Answers 200 with

Name
positionnumber
statusstring
entityIdstring or null

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. The company is not one of those found for this row.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No list or row has this id in this workspace.
  • 409The row is not waiting for a decision, or its decision was not a person's.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/lists/decide" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"list": "{list}", "row": {row}, "choice": "{choice}"}'

A list as CSV: every row as you wrote it, your columns and spelling unchanged, then what the check found: the result, the company with its Sunday Clerk id, UEI, CAGE codes, LEI, CIK, EIN, NPI, FDIC certificate, CRD number, EPA registry ids and link, who decided, and each family of checks (found, no matching record, checking, source stale or unavailable)

GET/v1/lists/{id}/export

Free.

Free.

Parameters

NameInWhat it is
idrequiredstringpathThe list's id, as creating it answers.

Answers 200 with

Name
namestring
csvstring

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No list has this id in this workspace.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/lists/{id}/export" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Watchlist

The companies the workspace watches, newest watch first, fifty a page, each with when its watch began and its owner in the workspace, if any

GET/v1/watch

Free.

Free. Also the MCP tool watched_companies.

Parameters

NameInWhat it is
pagewhole numberqueryWhich page, from 1.

Answers 200 with

Name
companieslist of object
totalnumber
pagenumber
pagesnumber

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/watch" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Watches companies: those named by id, or every company a list matched or identified

POST/v1/watch

Alerts start now; nothing from before is sent. Answers how many were added and how many the workspace watches. Needs the plan or its trial.

Free. Also the MCP tool watch_companies.

Body (JSON)

NameWhat it is
companyIdslist of stringCompany ids (sc_ and 16 hex characters).
listIdstringA list's id: every company it matched or identified.

Answers 200 with

Name
addednumber
watchingnumber

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402plan_required: watching comes with the plan, its trial included; the workspace is not on it now. Start or resume it on Billing.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No list, or no company, has these ids in this workspace.
  • 409increase_needed: the companies take the plan past what it is billed for; details.increase says to how many and the new price. Nothing is watched until the account's owner raises the plan on Billing. plan_limit: the companies take the workspace past what its plan holds (Pro holds 250; more is Enterprise, by contract). Nothing is watched.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/watch" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Stops watching a company

DELETE/v1/watch/{companyId}

Its history stays; no further alert is sent for it. Answers how many the workspace still watches. Free.

Free. Also the MCP tool stop_watching.

Parameters

NameInWhat it is
companyIdrequiredstringpathThe company's id.

Answers 200 with

Name
watchingnumber

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 409watch_list_kept: while the plan is paused, the watch list is kept as it was; resume the plan on Billing to change it.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X DELETE "https://api.sundayclerk.com/v1/watch/{companyId}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Gives a watched company an owner in the workspace, or none: its alerts go to that person alone, and with none to everyone in the workspace

POST/v1/watch/owner

Answers the owner. Free.

Free. Also the MCP tool set_company_owner.

Body (JSON)

NameWhat it is
companyrequiredstringThe company's id.
ownerrequiredstring or nullThe id of a person in this workspace, or null for no owner.

Answers 200 with

Name
ownerobject or null

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404The workspace does not watch this company, or no one in it has this id.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/watch/owner" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company": "{company}", "owner": "{owner}"}'

Questions

Asks a question about companies: those the workspace watches or has on its lists, or any company it names

POST/v1/asks

The answer is written from company records: every figure and record in it is measured from them and cited. Answers the question's answer once it is ready, or after wait seconds as it stands (its status still planning, measuring, writing or checking): read it later by its id. A follow-up names its conversation with threadId. Counts one question once the answer is final.

Free. Also the MCP tool ask.

Body (JSON)

NameWhat it is
questionrequiredstringThe question, in plain words.
companyIdstringThe company the question is about, when it is asked from that company ("this company").
threadIdstringThe conversation to continue: its first answer's id.
waitwhole numberSeconds to wait for the answer, up to 50; 0 answers at once with the question's id. 50 by default.

Answers 200 with

Name
idstring
threadIdstring
questionstring
statusstring
partslist of object or null
followUpslist of string
companieslist of object
choiceslist of object
unmatchedlist of string
countedboolean
createdAtstring
finishedAtstring or null

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402allowance_used: the workspace has used its questions for now; details.renewsAt says when more come.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404The conversation named is not in this workspace.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/asks" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"question": "{question}"}'

A conversation: every question asked in it and its answer, in the order asked

GET/v1/asks/thread

Free.

Free. Also the MCP tool conversation.

Parameters

NameInWhat it is
threadrequiredstringqueryThe conversation's id: its first answer's id.

Answers 200 with

Name
answerslist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No conversation in this workspace has this id.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/asks/thread?thread={thread}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

An answer as it stands: while it is made, its status (planning, measuring, writing, checking); then final, refused or failed, with its parts (text, each figure with what it measures, each record with its source and citation), the companies it read and three follow-up questions

GET/v1/asks/{answerId}

Free.

Free. Also the MCP tool answer.

Parameters

NameInWhat it is
answerIdrequiredstringpathThe answer's id.

Answers 200 with

Name
idstring
threadIdstring
questionstring
statusstring
partslist of object or null
followUpslist of string
companieslist of object
choiceslist of object
unmatchedlist of string
countedboolean
createdAtstring
finishedAtstring or null

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No answer in this workspace has this id.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/asks/{answerId}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Webhooks

The workspace's webhook endpoints, their delivery health, and how deliveries are signed

GET/v1/webhooks

Free.

Free.

Answers 200 with

Name
endpointslist of object
signatureobject

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/webhooks" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Add an HTTPS endpoint

POST/v1/webhooks

The signing secret is in this response only. Free.

Free.

Body (JSON)

NameWhat it is
urlrequiredstringA public HTTPS URL.

Answers 201 with

Name
signatureobject
idstring
urlstring
signingSecretstring

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged. invalid_url: the URL is not a public HTTPS address without embedded credentials. endpoint_limit: the workspace already has the most endpoints it may.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/webhooks" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "{url}"}'

Remove an endpoint

DELETE/v1/webhooks/{id}

Deliveries stop now; it and its delivery history are deleted 30 days later, and until then it can be restored in the app. Free.

Free.

Parameters

NameIn
idrequiredstringpath

Answers 200 with

Name
idstring
statusone of disabled
deletedForGoodAtstring

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404not_found: no endpoint with that id in this workspace.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X DELETE "https://api.sundayclerk.com/v1/webhooks/{id}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Send the endpoint a signed test event now, the same as a real one, to check it receives and verifies deliveries

POST/v1/webhooks/{id}/test

Its delivery shows in the endpoint's health. Free.

Free.

Parameters

NameIn
idrequiredstringpath

Answers 202 with

Name
queuedone of true

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404not_found: no endpoint with that id in this workspace.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/webhooks/{id}/test" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Usage

The workspace's plan; its questions, with what its grants include, have left and have used; and what was used each day (MST) and from where (app, api, mcp)

GET/v1/usage

Free.

Free.

Parameters

NameInWhat it is
dayswhole numberqueryHow many days of use to list, newest first; 30 when left out.

Answers 200 with

Name
planone of free, pro, starter
questionsobject
dayslist of object

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/usage" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Keys for agents

Starts an agent's sign-up for the person it works for: returns a setup link and code to show that person, and a claim_token to poll with

POST/v1/agent/registerNo key needed

The person signs in or signs up, approves the agent, and the next poll returns an API key.

Free.

Body (JSON)

NameWhat it is
emailrequiredstringThe email of the person you are setting this up for. They sign in or sign up with it.
key_namestringThe name of the API key that will be created, such as the project it is for. Defaults to Agent.
client_namestringYour own name, such as Claude Code, Codex or Cursor. The person sees it when they approve.

Answers 200 with

Name
setupobject
claim_tokenstring
key_namestring

Refusals

  • 400invalid_input: an unknown field, or email is not an email address.
  • 429rate_limit_exceeded: more than 10 setups an hour from this address or 5 a day for this email. Stop and tell the person; do not retry in a loop. rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/agent/register" \
  -H "Content-Type: application/json" \
  -d '{"email": "{email}"}'

Polls an agent sign-up: authorization_pending until the person approves, then the new workspace API key, once

POST/v1/agent/tokenNo key needed

Free.

Body (JSON)

NameWhat it is
claim_tokenrequiredstringThe claim_token from POST /v1/agent/register. Keep it in memory only.

Answers 200 with

Name
api_keystring
key_namestring
key_prefixstring

Refusals

  • 400authorization_pending: the person has not approved yet, poll again after interval seconds. slow_down: you polled too soon. expired_token: the code expired, start again. access_denied: the person declined. invalid_grant: the claim_token is unknown or was already used.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/agent/token" \
  -H "Content-Type: application/json" \
  -d '{"claim_token": "{claim_token}"}'

Other

The workspace's files, newest first, 50 a page: company files, list audits and watch reports, each with its number, what it is about, its status, its verdict or its counts, and its seal

GET/v1/files

Free.

Free. Also the MCP tool list_files.

Parameters

NameInWhat it is
pagewhole numberqueryThe page, from 1.
liststringqueryA list's id: its audit alone, sealed when its check finished.

Answers 200 with

Name
fileslist of object
pagenumber
pagesnumber
totalnumber

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/files" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Asks for a sealed file on one company: its record as it stands today, every finding with its evidence, its relationships, what was checked with dates, and a verdict (clear, review or not_clear) by one fixed rule

POST/v1/files

Sealed at once when the company has been checked before; otherwise status is making for a minute or two while it is checked, then sealed. The seal is a SHA-256 fingerprint of the file's body; verifyUrl lets anyone check a copy. Each plan includes files a month (Starter 2, Pro 10, the trial 2); past them a file is $49.00, bought with pay: true. A file that fails is never charged.

Free. Also the MCP tool create_file.

Body (JSON)

NameWhat it is
companyrequiredstringThe company: its id (sc_ and 16 hex characters), its UEI or its CAGE code.
paybooleantrue: when this month's included files are used, buy this one at the price file_price names ($49.00), held on the card on file and charged once the file is sealed. Left out, such a request is refused with the price.

Answers 201 with

Name
idstring
numberstring
kindone of company, list, watch
statusone of failed, making, sealed
subjectstring or null
companyobject or null
listobject or null
verdictobject or null
countsobject or null
requestedAtstring
sealedAtstring or null
sealobject or null
verifyUrlstring

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 402plan_required: files come with the plan, its trial included; the workspace is not on it now. Start or resume it on Billing. file_price: this month's included files are used; details.priceCents is one more file's price. Ask again with pay: true to buy it. files_after_trial, card_needed or card_declined: an extra file could not be paid for; the message says the way on. Nothing was charged.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No company has this id, UEI or CAGE code.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl -X POST "https://api.sundayclerk.com/v1/files" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"company": "{company}"}'

A sealed file's body as JSON, byte for byte as sealed: its SHA-256 is the file's fingerprint

GET/v1/files/{id}/data

Free.

Free.

Parameters

NameInWhat it is
idrequiredstringpathThe file's number.

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No sealed file of this workspace has this number.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/files/{id}/data" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

A sealed file as a PDF, as made when it was sealed: the verdict first, then what turned up, who the company is, what was checked and the seal, then every finding with its evidence

GET/v1/files/{id}/pdf

Its SHA-256 is the file's second fingerprint. Free.

Free.

Parameters

NameInWhat it is
idrequiredstringpathThe file's number.

Answers 200 with

Name
BYTES_PER_ELEMENTnumber
bufferobject
byteLengthnumber
byteOffsetnumber
lengthnumber
__@toStringTag@819one of Uint8Array

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No sealed file of this workspace has this number.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/files/{id}/pdf" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

One file: its number, what it is about, its status (making, sealed or failed), its verdict, when it was sealed, its fingerprints and its verify link

GET/v1/files/{id}

Free.

Free. Also the MCP tool get_file.

Parameters

NameInWhat it is
idrequiredstringpathThe file's number.

Answers 200 with

Name
idstring
numberstring
kindone of company, list, watch
statusone of failed, making, sealed
subjectstring or null
companyobject or null
listobject or null
verdictobject or null
countsobject or null
requestedAtstring
sealedAtstring or null
sealobject or null
verifyUrlstring

Refusals

  • 400invalid_input: an unknown field, a missing or malformed value, or inputs that do not go together. The message names the field. Nothing is charged.
  • 401unauthorized: no API key, or one that is not valid or whose workspace is paused.
  • 403not_in_plan: the account's plan does not include this call. The API comes with Pro. Nothing is charged.
  • 404No file of this workspace has this number.
  • 429rate_limited: more requests than one key or address may send in a short time; retryAfterSec and Retry-After say when to try again. Nothing is charged.
Example
curl "https://api.sundayclerk.com/v1/files/{id}" \
  -H "Authorization: Bearer $SUNDAY_CLERK_KEY"

Webhook events

Each delivery is a signed POST to the address you gave. Check its signature before you trust it.

finding.corrected

Sent when a newer version of a record you were told about changes it: the change as it now stands, and the file it corrects.

Body (JSON)

Name
idrequiredstring
typerequiredone of finding.corrected
idempotencyKeyrequiredstring
createdAtrequiredstring
datarequiredobject

finding.created

Sent when a new file changes companies your workspace watches: once per file, every change in it, each with the company, what happened, the record's own date and the record it rests on. Sent only for changes made after a company was watched.

Body (JSON)

Name
idrequiredstring
typerequiredone of finding.created
idempotencyKeyrequiredstring
createdAtrequiredstring
datarequiredobject

webhook.test

Sent to one endpoint when its owner asks for a test event. Nothing happened: it is there to check that the endpoint receives deliveries and verifies their signature.

Body (JSON)

Name
idrequiredstring
typerequiredone of webhook.test
idempotencyKeyrequiredstring
createdAtrequiredstring
datarequiredobject