Clearstory Contracts API
The Contracts API from Clearstory, for contracts.
The Contracts API from Clearstory, for contracts.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/extracker:extracker-contracts-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Clearstory Web Contracts API
version: 1.9.0
host: web-api.clearstory.build
description: 'The Clearstory Web API allows you to access and build your own applications that utilize your Clearstory data. The Clearstory Web API provides a RESTful interface with JSON-formatted responses to access many Clearstory resources. Check back here for more information as we continue to expanding our API functionality.
Web API domain: `https://web-api.clearstory.build`'
x-logo:
url: https://www.clearstory.build/hubfs/CS_Logo_Landscape_Color_1200x400.svg
backgroundColor: '#FFFFFF'
altText: Clearstory
servers:
- url: https://web-api.clearstory.build/
tags:
- name: Contracts
paths:
/contracts:
get:
operationId: ListContracts
responses:
'200':
description: Ok
content:
application/json:
schema:
properties:
records:
anyOf:
- $ref: '#/components/schemas/Contract'
- $ref: '#/components/schemas/ContractDetail'
limit:
type: number
format: double
offset:
type: number
format: double
count:
type: number
format: double
required:
- records
- limit
- offset
- count
type: object
'401':
description: Unauthorized
content:
application/json:
schema:
$ref: '#/components/schemas/UnauthorizedErrorResponse'
examples:
Example 1:
value:
message: unauthorized
'422':
description: Unprocessable Entity
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorResponse'
examples:
Example 1:
value:
success: false
errors:
- value: notAField
msg: Invalid value
param: sortBy
location: query
'500':
description: Internal Server Error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponseJSON'
examples:
Example 1:
value:
message: something went wrong
description: Retrieves a list of sent or received T&M Tags for the entire company with optional filtering.
tags:
- Contracts
security:
- ClearstoryAPIKey: []
parameters:
- description: How many records to skip
in: query
name: skip
required: false
schema:
format: int32
type: integer
- description: How many records to retrieve
in: query
name: take
required: false
schema:
format: int32
type: integer
maximum: 100
- description: Which field to sort by
in: query
name: sortBy
required: false
schema:
$ref: '#/components/schemas/ContractSortFields'
- description: The sorting direction
in: query
name: sortDirection
required: false
schema:
$ref: '#/components/schemas/SortDirection'
- description: If true, this will include associated contractor and customer project information
in: query
name: withProjects
required: false
schema:
type: boolean
- description: Search by contract name
in: query
name: searchName
required: false
schema:
type: string
- description: A project id to filter by
in: query
name: projectId
required: false
schema:
format: double
type: number
- description: Filter to include Contracts from their last updated timestamp (greater than or equal to) this ISO-8601 date, ie. `"2026-01-26T00:00:00Z"`. If no timezone is specified, UTC is used.
in: query
name: fromUpdatedAt
required: false
schema:
format: date-time
type: string
- description: Filter to include Contracts until their last updated timestamp (less than or equal to) this ISO-8601 date, ie. `"2026-01-27T00:00:00Z"`. If no timezone is specified, UTC is used.
in: query
name: untilUpdatedAt
required: false
schema:
format: date-time
type: string
summary: List contracts
x-summary-source: derived
x-operation-id-source: normalized
x-operation-id-original: List Contracts
components:
schemas:
StreetAddress:
properties:
projectAddress:
type: string
streetAddress:
type: string
city:
type: string
state:
type: string
zipCode:
type: string
postalCode:
type: string
country:
type: string
latitude:
type: number
format: double
longitude:
type: number
format: double
required:
- projectAddress
- streetAddress
- city
- state
- zipCode
- postalCode
- country
- latitude
- longitude
type: object
additionalProperties: false
SortDirection:
description: Sort direction options
enum:
- asc
- desc
type: string
Office:
properties:
id:
type: integer
format: int32
name:
type: string
description: 'The office name is only seen internally. It is not seen by other parties.
For example "Main" or "San Francisco" are common examples.'
businessName:
type: string
description: 'An optional business name that will be used instead of the company name
throughout the application, in the context of projects from this office,
for other parties. So when a customer sees their contractor''s company name,
it is derived from their contractor''s project''s office''s business name if set.
Otherwise it will be the contractor''s company name.'
address:
type: string
city:
type: string
state:
type: string
country:
type: string
zipCode:
type: string
phone:
type: string
fax:
type: string
lat:
type: number
format: double
lng:
type: number
format: double
customId:
type: string
description: 'An internal or custom id users can assign their office.
This can help when integrating with other systems.'
tzName:
type: string
description: 'The timezone the office is set to. This is important for PDF documents that get
generated, reporting, and more.'
regionId:
type: number
format: double
updatedAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
required:
- id
type: object
additionalProperties: false
Location:
type: string
enum:
- body
- cookies
- headers
- params
- query
ValidationError:
description: 'Note: This class is the same as defined by `express-validator` package.
It was just creating documentation issues with `tsoa` to use it from the package.'
properties:
location:
$ref: '#/components/schemas/Location'
param:
type: string
value: {}
msg: {}
nestedErrors:
items:
$ref: '#/components/schemas/ValidationError'
type: array
required:
- msg
type: object
additionalProperties: false
ContractDetail:
properties:
id:
type: integer
format: int32
name:
type: string
description: 'The contract name. Note this may be an empty string in some cases.
This name can be managed by either party (customer or contractor).
It is a shared record in this sense.'
contractValue:
type: number
format: decimal
description: 'The contract value. Again, this value can be managed by both
the contractor and the customer.'
customerProjectId:
type: integer
format: int32
contractorProjectId:
type: integer
format: int32
customerProject:
$ref: '#/components/schemas/Project'
contractorProject:
$ref: '#/components/schemas/Project'
required:
- id
- name
- contractValue
type: object
additionalProperties: false
UnauthorizedErrorResponse:
properties:
message:
type: string
type: object
additionalProperties: false
Contract:
properties:
id:
type: integer
format: int32
name:
type: string
description: 'The contract name. Note this may be an empty string in some cases.
This name can be managed by either party (customer or contractor).
It is a shared record in this sense.'
contractValue:
type: number
format: decimal
description: 'The contract value. Again, this value can be managed by both
the contractor and the customer.'
customerProjectId:
type: integer
format: int32
contractorProjectId:
type: integer
format: int32
required:
- id
- name
- contractValue
type: object
additionalProperties: false
IntegrationMetadata:
properties:
id:
type: string
provider:
type: string
name:
type: string
value: {}
updatedAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
required:
- id
- provider
- name
type: object
additionalProperties: false
Project:
properties:
id:
type: number
format: double
projectTitle:
type: string
jobNumber:
type: string
customerJobNumber:
type: string
division:
type: string
originType:
type: string
archived:
type: boolean
customer:
type: string
customerId:
type: number
format: double
customerInternalId:
type: string
contractValue:
type: number
format: double
address:
$ref: '#/components/schemas/StreetAddress'
officeId:
type: number
format: double
companyId:
type: number
format: double
office:
$ref: '#/components/schemas/Office'
contractWithCustomer:
$ref: '#/components/schemas/Contract'
contracts:
items:
$ref: '#/components/schemas/Contract'
type: array
integrationMetadata:
items:
$ref: '#/components/schemas/IntegrationMetadata'
type: array
updatedAt:
type: string
format: date-time
createdAt:
type: string
format: date-time
startDate:
type: string
format: date-time
endDate:
type: string
format: date-time
required:
- id
- customerJobNumber
- contractValue
- contractWithCustomer
type: object
additionalProperties: false
ValidationErrorResponse:
properties:
success:
type: boolean
errors:
items:
$ref: '#/components/schemas/ValidationError'
type: array
required:
- success
type: object
additionalProperties: false
ContractSortFields:
type: string
enum:
- createdAt
- updatedAt
- name
- contractValue
description: 'Valid sorting fields for contracts.
Note that the accepted sorting field values coming from request input are going to be uniform
and use camelCase. The actual values that will end up being needed can be camelCase or snake_case.
Consumers of the API will be able to rely upon just using camelCase field names this way.'
ErrorResponseJSON:
properties:
message:
type: string
type: object
additionalProperties: false
securitySchemes:
ClearstoryAPIKey:
type: http
scheme: basic
in: header
name: Authorization
description: 'The Web API currently uses Basic Auth where the username is the _Key ID_ and password is the _Key Secret._ **These API keys provide access to your data at a company level.**
There is a limit to the number of API keys a given company can have generated and active at any given time. Keys can be disabled and created again.
It is important to note the _Secret Key_ value cannot be retrieved again. Should you lose it, you will need to generate a new API key.
Basic Auth works simply by including an `Authorization` header with a base64 encoded string value that combines your _**Key ID**_ and _**Key Secret**_ separated by a colon. ie. `476B2524694742F2B2ACA15ACE3518C9:112cd32ec0d015fe9c5709d14cef3201`.
Your final header should look something like: `Authorization: Basic YWRzZmFkZmFrZmpoM2sybGpma3dhMw==`'