API reference

Stubsmith exposes two separate HTTP services. The ingest endpoint (POST /v1/captures) is served by the Go ingest service at https://ingest.stubsmith.dev. All other endpoints are served by the Node API at the app hostname. Both authenticate with Authorization: Bearer <project-key>; the ingest service also accepts the key in an X-Project-Token header. Dashboard operations use the session the dashboard signs in with, an HttpOnly cookie set by POST /v1/auth/login; it is not exposed to scripts or returned in the response. Where the table says JWT, the caller must hold the organisation admin role; other members receive 403.

MethodPathAuthPurpose
POST/v1/capturesProject keyIngest a captured request/response (ingest service: https://ingest.stubsmith.dev)
GET/v1/capturesJWT or project keyList captures for a project (newest first, max 100)
GET/v1/captures/:idJWT or project keyFull capture detail; append ?includeBodies=true to resolve offloaded body references
GET/v1/request-typesJWT or project keyList request types (method, path, pattern, and pending/approved/rejected fingerprint counts) for a project
GET/v1/request-types/:idJWT or project keyFull detail including fingerprints, response variants, and field rules
PUT/v1/request-types/:id/patternJWT or project keySet a path pattern; absorbs matching concrete request type rows
GET/v1/projects/:id/path-suggestionsJWT (org admin)Suggested path patterns for request types that differ in one segment, with the number each would fold and example values. Accept one with the pattern route above on its request_type_id
POST/v1/projects/:id/path-suggestions/dismissJWT (org admin)Dismiss a suggestion permanently; body {domain, method, pattern}
DELETE/v1/request-types/:idJWT (org admin) or project keyDelete a request type along with its captures and stored bodies. A project key alone is sufficient, so treat project keys as capable of deleting stored fixtures
POST/v1/review/:fingerprint_id/decisionOrg-admin JWT or org API key with review:approve scopeApprove or reject a pending fingerprint; submit field_rules on approve. The pushed_capture field has been removed: a request that includes it is refused with 400. Project keys cannot review
POST/v1/review/:fingerprint_id/reopenOrg-admin JWT or org API key with review:approve scopeSend an approved or rejected fingerprint back to pending
GET/v1/review/queueOrg-admin JWT or org API key with review:read scopeList pending fingerprints awaiting review
PUT/v1/request-types/:id/fingerprints/:fingerprintId/rulesOrg-admin JWTUpdate field_rules on an already-approved fingerprint; project keys are explicitly excluded. Editing masking rules is a privileged privacy action
GET/v1/anonymizer/rulesJWT or project keyList named global anonymizer rule sets for a project
POST/v1/anonymizer/rulesOrg-admin JWTCreate a new named rule set; 409 if name already exists
PUT/v1/anonymizer/rules/:idOrg-admin JWTPartially update a rule set, accepts any combination of name, rules, and enabled
DELETE/v1/anonymizer/rules/:idOrg-admin JWTDelete a rule set. Project keys get 403 on all three rule-set writes; they keep read access for the sync
GET/v1/sdk/syncProject keySDK rule sync: returns field_rules delta since cursor, path templates, merged global rule sets, per-request-type value-path config, and the project's email placeholder domain
GET/v1/rulesJWT or project keyAll approved field rules for a project in one list
GET/v1/alertsJWT or project keyList capture alerts
GET/v1/fixturesJWT or project keyFetch fixture variants for a request type (see Using fixtures)
GET/v1/replay/bundleProject keyFetch the offline replay bundle used by stubsmith pull and stubsmith.replay() (see Replay bundles)