Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API 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.
openapi: 3.2.0
info:
title: Lathe customer Webhooks API
description: 'Manage your Lathe instances from code or from an AI agent.
**Authentication.** Create an API key on the Access page of the portal and send it as
`Authorization: Bearer lathe_…`. Keys act as the customer who created them; they cannot create or
revoke other keys.
**Creating an instance.** Where `GET /plans` offers Free, `POST /instances` with `tier: "free"` creates a $0 instance immediately, with no card or checkout; it returns `checkout_url: null`. Free has 1000 GB outbound traffic per month and no daily backups. A paid plan returns `checkout_url`:
open it in a browser and pay; the instance is provisioned as soon as the payment page returns and
the response''s `instance_id` is valid from the start (poll `GET /instances/{id}` - its `status` goes
`awaiting_payment` → `pending` → `creating` → `running`; `payment_failed` if the card was declined,
`error` if creation failed). A coupon that covers the whole first month skips the page. Every paid
purchase goes through the hosted page, card on file or not. Where the trial is offered (`GET /plans` →
`trial`), a customer''s first Mini starts with a 14-day free trial and the response says `trial: true`.
With `trial.card = "later"` the instance is created at once (`status: pending`, no `checkout_url`) and it is kept
from the portal''s billing page before the trial ends; without that it pauses and is deleted a week later. What
keeping it costs depends on the gateway: where a card can be verified and held, adding one charges nothing and the
first month is charged when the trial ends; where the provider holds the subscription itself there is no such page,
so keeping the instance is the purchase and the first month is charged at once, ending the trial there. With
`trial.card = "start"`, `checkout_url` verifies the card first (a temporary $1 authorisation that is released) and
the first month is charged when the trial ends.
**Slow operations are jobs.** Reset, restore, rotate, allowlist, upgrade, SQL console and delete
answer `202` with a `job_id`; one job runs per instance at a time and the instance answers `409`
while one is queued or running. Destructive actions (reset, restore, delete) require
`confirm` to equal the instance id. (The portal asks for the instance''s name instead, since that is what a
person knows; either is accepted.)
The same operations are available to AI agents over MCP: the server is the MCP host itself, no path.'
version: '1.0'
servers:
- url: /api/v1
tags:
- name: Webhooks
paths:
/webhooks:
get:
tags:
- Webhooks
summary: Your webhook endpoints
operationId: list_webhooks_webhooks_get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
post:
tags:
- Webhooks
summary: Add an https endpoint; the signing secret is in this answer only
operationId: add_webhook_webhooks_post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookIn'
required: true
responses:
'201':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/webhooks/{webhook_id}:
delete:
tags:
- Webhooks
summary: Remove an endpoint and its delivery log
operationId: delete_webhook_webhooks__webhook_id__delete
parameters:
- name: webhook_id
in: path
required: true
schema:
type: string
title: Webhook Id
responses:
'204':
description: Successful Response
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/webhooks/{webhook_id}/enable:
post:
tags:
- Webhooks
summary: Switch a disabled endpoint back on
operationId: enable_webhook_webhooks__webhook_id__enable_post
parameters:
- name: webhook_id
in: path
required: true
schema:
type: string
title: Webhook Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/webhooks/{webhook_id}/deliveries:
get:
tags:
- Webhooks
summary: 'The last 50 deliveries: status, attempts, next try'
operationId: webhook_deliveries_webhooks__webhook_id__deliveries_get
parameters:
- name: webhook_id
in: path
required: true
schema:
type: string
title: Webhook Id
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
WebhookIn:
properties:
url:
type: string
title: Url
type: object
required:
- url
title: WebhookIn
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
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError