API Documentation

Integrate Lapse into your workflows with our REST API.

Quick Start

1. Create an API Key

Go to Settings → API and create a new API key with the scopes you need.

2. Make Your First Request

curl -X GET "https://lapse.watch/api/v1/items" \
  -H "Authorization: Bearer lapse_k_YOUR_API_KEY"

Authentication

All API requests require authentication using an API key. Include your key in the Authorization header:

Authorization: Bearer lapse_k_your_api_key_here

API Key Scopes

ScopePermissions
readList and view items and contacts
writeCreate and update items
deleteDelete items

Rate Limiting

API requests are rate limited per team to ensure fair usage:

  • Read operations: 60 requests per minute
  • Write operations: 20 requests per minute
  • Delete operations: 10 requests per minute

Rate limit information is included in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset

Endpoints

MethodPathScopeDescription
GET/api/v1/itemsreadList all items with optional filtering
POST/api/v1/itemswriteCreate a new item
GET/api/v1/items/:idreadGet a single item by ID
PUT/api/v1/items/:idwriteUpdate an item
DELETE/api/v1/items/:iddeleteDelete an item
POST/api/v1/items/bulkwriteBulk create items (max 100)
DELETE/api/v1/items/bulkdeleteBulk delete items (max 100)
GET/api/v1/contactsreadList alert contacts
GET/api/v1/contacts/:idreadGet a single contact

Example: Create an Item

curl -X POST "https://lapse.watch/api/v1/items" \
  -H "Authorization: Bearer lapse_k_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "ssl_cert",
    "name": "Production API",
    "hostname": "api.example.com",
    "expiry_date": "2025-12-31T00:00:00Z"
  }'

OpenAPI Specification

Download our OpenAPI 3.0 specification for use with API clients, code generators, or documentation tools.

Download openapi.yaml

Error Handling

StatusDescription
401Invalid or missing API key
403API key lacks required scope
404Resource not found
422Validation failed (check details field)
429Rate limit exceeded
500Internal server error