# OpenAPI specification

Source: https://www.geardex.app/api-docs/openapi

API access requires the GearDex Studio plan and a scoped Studio API key.

Use the live GearDex contract with API clients, collection importers, schema validators, and code generators.

## Live specification

GearDex serves its v1 Studio contract as OpenAPI JSON. The document is public so tooling can read endpoint schemas before you provide a key for authenticated requests.

`GET` `/api/studio-agent/openapi` OpenAPI 3.1 · GearDex Studio Agent API 1.0.0

[Open the live OpenAPI JSON](https://www.geardex.app/api/studio-agent/openapi)

Canonical source

Point automated tooling at the live URL instead of committing a stale copy unless your release process intentionally pins API contracts.

## Download

**Download OpenAPI JSON**

```bash
curl -L "https://www.geardex.app/api/studio-agent/openapi" \
  -H "Accept: application/json" \
  -o geardex-openapi.json
```

The endpoint does not require a Studio API key. Generated clients must still send a scoped bearer key when they call protected v1 resources.

## Client generation

Most OpenAPI-compatible generators can consume the live URL directly. Keep generated clients behind a server boundary so credentials never enter browser code.

**Generate TypeScript types**

```bash
npx openapi-typescript "https://www.geardex.app/api/studio-agent/openapi" \
  --output src/generated/geardex-api.d.ts
```

1. Generate types or a client during development or CI.
2. Review contract changes before updating application code.
3. Inject the Studio key at server runtime.
4. Preserve response status and error bodies for debugging.

## Coverage

**OpenAPI resource coverage**

| Resource | Shape | Operations |
| --- | --- | --- |
| `Gear` | `collection + detail` | List, create, update, and delete inventory records. |
| `Shoots` | `collection + detail` | List, create, update, and delete shoot plans. |
| `Maintenance` | `collection + detail` | List, create, update, and delete service records. |
| `Documents` | `collection` | Read document and warranty metadata. |
| `Analytics` | `summary` | Read aggregate Studio metrics. |
| `Profile` | `resource` | Read account and Studio profile metadata. |
| `Loans` | `collection + detail` | List loans, check gear out and in, extend, and cancel. |
| `Flags and availability` | `collection + query` | Read, raise, and resolve gear issues; check an item's availability for dates. |
| `Kits` | `collection + detail` | List, create, update, and delete rigs and kits. |
| `Incidents and stock` | `collection + detail` | Report lost and stolen gear, log shutter counts, and adjust consumables. |
| `Insurance` | `collection + detail` | Read policies and certificates with the gear they cover. |
| `Rentals and packing lists` | `collection + detail` | Track rented gear, and pack gear for a shoot. |

Dashboard-only operations

API key management, activity logs, and webhook endpoint configuration use authenticated GearDex dashboard sessions and are not part of the Studio bearer API specification.
