Aperture API reference
A typed, REST-shaped API. Base URL https://api.aperture.dev/v3. Authenticate every request with a bearer token. All responses are JSON.
List projects
Returns a cursor-paginated list of projects, most recent first. Use the query parameters to filter and page through results.
| Parameter | Type | Description |
|---|---|---|
| limit | integer | Page size, 1–100. Defaults to 20. |
| status | string | Filter by status: 'active', 'paused', or 'archived'. |
| cursor | string | A cursor from a prior response, to fetch the next page. |
curl https://api.aperture.dev/v3/projects?limit=10 \
-H "Authorization: Bearer sk_live_•••"
{
"object": "list",
"url": "/v3/projects",
"has_more": true,
"next_cursor": "crs_9aF2",
"data": [
{
"id": "prj_8Kd2",
"name": "Aperture",
"status": "active",
"created": 1717200000
}
]
}
Create a project
Creates a project. Pass an Idempotency-Key header to make the call safe to retry — repeating it returns the original project instead of creating a duplicate.
| Parameter | Type | Description |
|---|---|---|
| namerequired | string | A human-readable name, 1–80 characters. |
| regionrequired | string | Data region: 'us', 'eu', or 'ap'. |
| metadata | object | Up to 20 key/value pairs to attach to the project. |
curl -X POST https://api.aperture.dev/v3/projects \
-H "Authorization: Bearer sk_live_•••" \
-H "Idempotency-Key: a1b2c3" \
-d '{ "name": "Aperture", "region": "eu" }'
{
"id": "prj_8Kd2",
"object": "project",
"name": "Aperture",
"region": "eu",
"status": "active"
}
Retrieve a project
Fetches a single project by id. Use the expand parameter to inline related objects, such as the project owner, in one round-trip.
| Parameter | Type | Description |
|---|---|---|
| idrequired | string | The project id, e.g. prj_8Kd2 (in the path). |
| expand | array | Related objects to inline, e.g. ['owner', 'usage']. |
curl https://api.aperture.dev/v3/projects/prj_8Kd2 \
-H "Authorization: Bearer sk_live_•••"
{
"id": "prj_8Kd2",
"object": "project",
"name": "Aperture",
"status": "active",
"owner": "usr_3Lp9"
}
Delete a project
Permanently deletes a project and schedules its data for removal. This cannot be undone; the call is idempotent and returns the deleted marker.
| Parameter | Type | Description |
|---|---|---|
| idrequired | string | The id of the project to delete (in the path). |
curl -X DELETE https://api.aperture.dev/v3/projects/prj_8Kd2 \
-H "Authorization: Bearer sk_live_•••"
{
"id": "prj_8Kd2",
"object": "project",
"deleted": true
}
Create a webhook endpoint
Registers a URL to receive events. Aperture signs every delivery with the returned secret; verify the signature header before trusting the body.
| Parameter | Type | Description |
|---|---|---|
| urlrequired | string | An HTTPS URL that will receive POSTed events. |
| eventsrequired | array | Event types to subscribe to, e.g. ['project.created']. |
| description | string | An optional label shown in the dashboard. |
curl -X POST https://api.aperture.dev/v3/webhooks \
-H "Authorization: Bearer sk_live_•••" \
-d '{ "url": "https://app.acme.com/hooks", "events": ["project.created"] }'
{
"id": "whk_2Qe7",
"object": "webhook",
"url": "https://app.acme.com/hooks",
"secret": "whsec_•••",
"status": "enabled"
}
Status codes
Aperture uses conventional HTTP status codes. 2xx means success, 4xx means the request was at fault, and 5xx means we were — and is always safe to retry.
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | The request succeeded. |
| 201 | Created | A new resource was created. |
| 304 | Not Modified | A conditional GET matched — use your cache. |
| 400 | Bad Request | The request was malformed or missing a field. |
| 401 | Unauthorized | No valid API key was provided. |
| 404 | Not Found | The resource does not exist. |
| 409 | Conflict | An idempotency key was reused with a different body. |
| 429 | Too Many Requests | You hit a rate limit — back off and retry. |
| 500 | Server Error | Something went wrong on our end. Safe to retry. |