TradesAPI Monitoring API
The monitoring API from TradesAPI — 6 operation(s) for monitoring.
The monitoring API from TradesAPI — 6 operation(s) for monitoring.
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/tradesapi-com:tradesapi-com-monitoring-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: Trades Monitoring API
description: Real-time contractor license verification across all 50 US states + DC, plus 16 metro areas. Send a license number + state + trade, get back a normalized JSON result with status, expiration, and disciplinary history.
version: 1.0.0
tags:
- name: Monitoring
paths:
/monitor:
post:
tags:
- Monitoring
summary: Create Monitor
description: 'Add one license to the watch list.
Returns 201 on a brand-new row, 200 on idempotent re-POST (active
duplicate) or reactivation (soft-deleted match), 400 on
uncovered jurisdiction or invalid subscription IDs, and 429 when
the active-monitor quota is exhausted.
The watch is *inert* in Phase 1 — it will not fire any
notifications until the Phase 2 fan-out integration ships. Customers
can populate the watch list ahead of that flip without observable
side effects.'
operationId: create_monitor_monitor_post
parameters:
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorCreateRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorPublic'
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorPublic'
description: OK
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Monitoring
summary: List Monitors
description: List the caller's monitors, newest first.
operationId: list_monitors_monitor_get
parameters:
- name: limit
in: query
required: false
schema:
type: integer
maximum: 100
minimum: 1
default: 50
title: Limit
- name: offset
in: query
required: false
schema:
type: integer
maximum: 10000
minimum: 0
default: 0
title: Offset
- name: include_inactive
in: query
required: false
schema:
type: boolean
default: false
title: Include Inactive
- name: jurisdiction
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Jurisdiction
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/monitor/bulk:
post:
tags:
- Monitoring
summary: Bulk Create
description: 'Bulk-add monitors via a CSV body.
Body: ``Content-Type: text/csv`` with a header row. Recognised
columns (case-insensitive): ``jurisdiction``, ``license_number``,
optional ``label``, optional ``trade`` (#1285 — routes the refresh
sweep''s re-scrape in trade-routing states). Extra columns are
ignored.
Returns 200 always (per-row outcomes in the body), or 400 when:
- the CSV is structurally malformed (missing required columns,
not parseable as CSV)
- the row count exceeds ``settings.monitoring_bulk_csv_max_rows``
Per-row outcomes: ``created`` (new row inserted), ``existed``
(active duplicate — no-op), ``error`` (per-row reason), or
``quota_exceeded`` (mid-batch cap hit; remainder short-circuits).
All rows commit under a SINGLE transaction. Per-row savepoints
would let one bad row''s failure not impact the others — but for
MVP we treat row-level errors as soft (recorded in outcomes), so
no savepoint is needed.
Audit log: ONE summary row per bulk call (Important 5), not N.'
operationId: bulk_create_monitor_bulk_post
parameters:
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/BulkResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/monitor/usage:
get:
tags:
- Monitoring
summary: Get Usage
description: 'Current period usage + projected monthly cost.
Cost is computed from the live active count at request time —
NOT from a billing snapshot. The Phase 4 cron stamps charges
against ``MonitoredLicense.monthly_credits_charged`` at month-end;
this endpoint just shows the customer the running total.'
operationId: get_usage_monitor_usage_get
parameters:
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/UsageResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/monitor/{monitor_id}/flip:
post:
tags:
- Monitoring
summary: Flip Sandbox Monitor
description: 'Sandbox only (#2027): push a synthetic status change for this
monitor''s license through the REAL change-detection pipeline.
Within about a minute the event clears stabilization; the next
fan-out sweep (every 5 minutes) delivers a signed
``license.status_changed`` to every webhook subscription on this
key (and any ``notify.email``). Point a subscription at
``POST /webhooks/sink/{token}`` if you do not have a receiver yet.
Returns what changed and the event type to expect. 403 for
production keys; 404 cross-tenant.'
operationId: flip_sandbox_monitor_monitor__monitor_id__flip_post
parameters:
- name: monitor_id
in: path
required: true
schema:
type: integer
minimum: 1
title: Monitor Id
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
requestBody:
content:
application/json:
schema:
anyOf:
- $ref: '#/components/schemas/FlipRequest'
- type: 'null'
title: Body
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/monitor/{monitor_id}:
get:
tags:
- Monitoring
summary: Get Monitor
description: Get a single monitor. 404 cross-tenant.
operationId: get_monitor_monitor__monitor_id__get
parameters:
- name: monitor_id
in: path
required: true
schema:
type: integer
minimum: 1
title: Monitor Id
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorPublic'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
patch:
tags:
- Monitoring
summary: Update Monitor
description: Update label / notify / active flag.
operationId: update_monitor_monitor__monitor_id__patch
parameters:
- name: monitor_id
in: path
required: true
schema:
type: integer
minimum: 1
title: Monitor Id
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorUpdateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorPublic'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
delete:
tags:
- Monitoring
summary: Delete Monitor
description: 'Soft-delete: ``active=false``. The row stays for audit history.'
operationId: delete_monitor_monitor__monitor_id__delete
parameters:
- name: monitor_id
in: path
required: true
schema:
type: integer
minimum: 1
title: Monitor Id
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/monitor/{monitor_id}/events:
get:
tags:
- Monitoring
summary: List Monitor Events
description: 'Delivered event history for one monitor''s license (#1597).
Mirrors fan-out delivery semantics: only stabilization-acked events,
``__new_record__`` baselines excluded — the same set that stamps
``last_event_at``, so the timestamp and the visible history never
disagree. 404 cross-tenant (via ``_load_monitor``).'
operationId: list_monitor_events_monitor__monitor_id__events_get
parameters:
- name: monitor_id
in: path
required: true
schema:
type: integer
minimum: 1
title: Monitor Id
- name: x-api-key
in: header
required: false
schema:
type: string
description: API key for authentication
default: ''
title: X-Api-Key
description: API key for authentication
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/MonitorEventListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
BulkResponse:
properties:
total:
type: integer
title: Total
created:
type: integer
title: Created
existed:
type: integer
title: Existed
error:
type: integer
title: Error
quota_exceeded:
type: integer
title: Quota Exceeded
insufficient_credits:
type: integer
title: Insufficient Credits
default: 0
results:
items:
$ref: '#/components/schemas/BulkRowResult'
type: array
title: Results
type: object
required:
- total
- created
- existed
- error
- quota_exceeded
- results
title: BulkResponse
MonitorEventPublic:
properties:
event_id:
type: integer
title: Event Id
observed_at:
type: string
format: date-time
title: Observed At
field_name:
type: string
title: Field Name
prior_value:
anyOf:
- {}
- type: 'null'
title: Prior Value
new_value:
anyOf:
- {}
- type: 'null'
title: New Value
source:
type: string
title: Source
type: object
required:
- event_id
- observed_at
- field_name
- prior_value
- new_value
- source
title: MonitorEventPublic
MonitorListResponse:
properties:
items:
items:
$ref: '#/components/schemas/MonitorPublic'
type: array
title: Items
total_active:
type: integer
title: Total Active
limit:
type: integer
title: Limit
offset:
type: integer
title: Offset
type: object
required:
- items
- total_active
- limit
- offset
title: MonitorListResponse
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
input:
title: Input
ctx:
type: object
title: Context
type: object
required:
- loc
- msg
- type
title: ValidationError
MonitorUpdateRequest:
properties:
label:
anyOf:
- type: string
maxLength: 500
- type: 'null'
title: Label
notify:
anyOf:
- $ref: '#/components/schemas/NotifyConfig'
- type: 'null'
active:
anyOf:
- type: boolean
- type: 'null'
title: Active
type: object
title: MonitorUpdateRequest
MonitorPublic:
properties:
id:
type: integer
title: Id
jurisdiction:
type: string
title: Jurisdiction
license_number:
type: string
title: License Number
trade:
anyOf:
- type: string
- type: 'null'
title: Trade
label:
anyOf:
- type: string
- type: 'null'
title: Label
notify:
anyOf:
- $ref: '#/components/schemas/NotifyConfig'
- type: 'null'
active:
type: boolean
title: Active
watching_since:
type: string
format: date-time
title: Watching Since
last_event_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Last Event At
entity_id:
anyOf:
- type: string
- type: 'null'
title: Entity Id
license_valid:
anyOf:
- type: boolean
- type: 'null'
title: License Valid
license_status:
anyOf:
- type: string
- type: 'null'
title: License Status
license_status_normalized:
anyOf:
- type: string
- type: 'null'
title: License Status Normalized
license_expiration:
anyOf:
- type: string
- type: 'null'
title: License Expiration
license_name:
anyOf:
- type: string
- type: 'null'
title: License Name
license_checked_at:
anyOf:
- type: string
format: date-time
- type: 'null'
title: License Checked At
type: object
required:
- id
- jurisdiction
- license_number
- trade
- label
- notify
- active
- watching_since
- last_event_at
- entity_id
title: MonitorPublic
NotifyConfig:
properties:
webhook_subscription_ids:
anyOf:
- items:
type: integer
type: array
- type: 'null'
title: Webhook Subscription Ids
email:
anyOf:
- type: string
maxLength: 255
- type: 'null'
title: Email
type: object
title: NotifyConfig
description: 'Notification preferences for a monitored license.
Both fields are independently optional. ``webhook_subscription_ids``
references entries in ``webhook_subscription`` owned by the same
api_key (cross-tenant + soft-deleted IDs rejected at validate
time). ``email`` adds an out-of-band Resend notification (Phase 2
integrates the email path).'
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
UsageResponse:
properties:
active_count:
type: integer
title: Active Count
current_month:
type: string
title: Current Month
projected_cost_credits:
type: integer
title: Projected Cost Credits
projected_cost_cents:
type: integer
title: Projected Cost Cents
projected_cost_usd:
type: string
title: Projected Cost Usd
current_tier:
type: string
title: Current Tier
next_tier_threshold:
type: integer
title: Next Tier Threshold
supported_jurisdictions:
items:
type: string
type: array
title: Supported Jurisdictions
billing_mode:
type: string
title: Billing Mode
default: metered
included_monitors:
anyOf:
- type: integer
- type: 'null'
title: Included Monitors
overage_monitors:
anyOf:
- type: integer
- type: 'null'
title: Overage Monitors
overage_billing:
type: boolean
title: Overage Billing
default: false
paused_since:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Paused Since
type: object
required:
- active_count
- current_month
- projected_cost_credits
- projected_cost_cents
- projected_cost_usd
- current_tier
- next_tier_threshold
- supported_jurisdictions
title: UsageResponse
BulkRowResult:
properties:
row:
type: integer
title: Row
outcome:
type: string
title: Outcome
id:
anyOf:
- type: integer
- type: 'null'
title: Id
reason:
anyOf:
- type: string
- type: 'null'
title: Reason
type: object
required:
- row
- outcome
title: BulkRowResult
FlipRequest:
properties:
to:
anyOf:
- type: string
enum:
- active
- suspended
- expired
- revoked
- type: 'null'
title: To
description: 'Target status. Omit to toggle: active -> suspended, anything else -> active.'
type: object
title: FlipRequest
description: Body for ``POST /monitor/{id}/flip`` (sandbox only).
MonitorEventListResponse:
properties:
items:
items:
$ref: '#/components/schemas/MonitorEventPublic'
type: array
title: Items
type: object
required:
- items
title: MonitorEventListResponse
MonitorCreateRequest:
properties:
jurisdiction:
type: string
maxLength: 32
minLength: 1
title: Jurisdiction
license_number:
type: string
maxLength: 100
minLength: 1
title: License Number
label:
anyOf:
- type: string
maxLength: 500
- type: 'null'
title: Label
notify:
anyOf:
- $ref: '#/components/schemas/NotifyConfig'
- type: 'null'
trade:
anyOf:
- type: string
maxLength: 40
- type: 'null'
title: Trade
type: object
required:
- jurisdiction
- license_number
title: MonitorCreateRequest
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
description: API key for authenticated endpoints. Sign up at /auth/login to get one. Every successful verification consumes one credit.