Skip to main content

API reference

The ticketyboo API is a REST API served from AWS API Gateway in the eu-north-1 (Stockholm) region. All requests and responses use JSON. This page covers the base URL, authentication methods, and common response patterns.

Base URL

https://api.ticketyboo.dev

All endpoints are prefixed with this base URL. There is no versioning prefix on the main API path (/api/...). The archetypes endpoint used by the extension uses a /v1/ prefix.

Authentication

Most public endpoints (scan submission, newsletter) require no authentication. Account and billing endpoints require authentication. Two authentication methods are supported:

Cognito JWT (Bearer token)

Obtained after signing in to ticketyboo.dev. Sent as an Authorization header:

Authorization: Bearer <jwt-token>

JWTs are RS256 signed by the Cognito user pool eu-north-1_DKAA4NX9p. The API verifies the signature using the pool's JWKS endpoint before processing authenticated requests.

API key

Generated from your account page. Keys begin with tbo-. Sent as an x-api-key header:

x-api-key: tbo-your-key-here

API keys are used by the VS Code extension to call the archetypes endpoints. They can also be used in CI pipelines to submit scans programmatically.

Common response structure

All responses include CORS headers. Successful responses use 2xx status codes. Error responses use the following structure:

{
  "error": "error_type",
  "message": "Human-readable description"
}

Common error codes

StatusError typeMeaning
400invalid_requestMissing or invalid request body fields
401unauthorizedMissing or invalid authentication
403forbiddenAuthenticated but insufficient permissions or credits
404not_foundResource does not exist
429rate_limitedRate limit exceeded
500internal_errorUnexpected server error

Rate limits

EndpointLimitWindow
POST /api/scan (shallow)1 per IP24 hours
POST /api/scan (deep)3 per IP7-day rolling window

Rate limits are tracked by IP address in DynamoDB. Use GET /api/scan/deep-quota to check remaining deep scan quota for the current IP.

Endpoint index

MethodPathAuthDescription
POST/api/scanNone / API keySubmit a scan
GET/api/scan/{id}NoneGet scan status and findings
GET/api/scan/{id}/reportNoneGet full scan report from S3
GET/api/scan/deep-quotaNoneGet remaining deep scan quota for calling IP
POST/api/scan/{id}/feedbackJWT / API keySubmit finding feedback
GET/api/scan/{id}/feedbackJWT / API keyGet feedback for a scan
GET/v1/archetypesAPI keyList available contract archetypes
POST/v1/archetypes/{name}/instantiateAPI keyGenerate a devcontract.json from an archetype
GET/api/account/meJWTGet account profile and credit balance
POST/api/account/apikeyJWTGenerate a new API key
POST/api/checkoutJWTCreate Stripe checkout for subscription plan
POST/api/topupJWTCreate Stripe checkout for credit pack top-up
POST/api/stripe-webhookHMAC-SHA256Stripe webhook receiver
POST/api/subscribeNoneNewsletter subscribe
POST/api/unsubscribeNoneNewsletter unsubscribe (GDPR hard delete)
POST/api/supportNoneCreate Stripe checkout for one-time donation
GET/api/team/supportersNoneGet supporter count and total donation stats

Section contents