> ## Documentation Index
> Fetch the complete documentation index at: https://sudomock.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> The base URL is https://api.sudomock.com.
> Authenticate every request with the x-api-key header. Keys begin with sm_.
> A render returns the finished image at data.print_files[0].export_path. A request sent with is_async true returns a job_id to poll at GET /api/v1/jobs/{job_id}.
> Prefer the official SDKs over hand-written HTTP calls: npm install sudomock for Node, pip install sudomock for Python.

# Legacy paths

> What the older SudoMock paths map to, and what still works.

Eleven paths still answer under their earlier names. They serve the same
operations on the same data, so nothing you have already shipped needs to
change today.

## What changed

The eleven are marked deprecated in the OpenAPI spec and left out of the
reference navigation, so new code lands on the current name. Left out of the
navigation, not left out of the spec: download the spec and the eleven are
still in it, with `deprecated: true` on each, so a generated client keeps every
method it has and your linter is the one that tells you which to move off.

Three things carry the earlier spelling, and each one moves on its own: the
path you call, the `kind` a job reports, and the event name a webhook endpoint
receives.

## How to tell whether this affects you

* A request URL in your code contains `/api/v1/sudoai/2d-mockups` or
  `/api/v1/mockups`.
* Your generated client or linter flags one of its methods as deprecated.
* A job you read back reports `kind` as `2d_create` or `2d_render`.
* A webhook body you receive carries an `event` that starts with `2d_mockup.`
  or `2d_render.`.
* A request to `/api/v1/sudoai/2d-mockup/render` or `/api/v1/sudoai/render`
  answers `404`.

## What to change

### Photo mockup paths

Everything under `/api/v1/sudoai/2d-mockups` is the same operation as its
`/api/v1/photo-mockups` twin, on the same data. Moving is a string swap: the
headers, the body and the response are identical. The current two step flow,
end to end, is in [Photo mockups](/docs/photo-mockups/overview).

| Earlier path                                            | Current path                                                                                                                  |
| ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `POST /api/v1/sudoai/2d-mockups`                        | [`POST /api/v1/photo-mockups`](/docs/api-reference/photo-mockups/create-a-mockup-from-a-product-photo)                             |
| `GET /api/v1/sudoai/2d-mockups`                         | [`GET /api/v1/photo-mockups`](/docs/api-reference/photo-mockups/retrieve-a-list-of-photo-mockups)                                  |
| `GET /api/v1/sudoai/2d-mockups/{mockup_id}`             | [`GET /api/v1/photo-mockups/{mockup_id}`](/docs/api-reference/photo-mockups/retrieve-a-single-photo-mockup)                        |
| `PATCH /api/v1/sudoai/2d-mockups/{mockup_id}`           | [`PATCH /api/v1/photo-mockups/{mockup_id}`](/docs/api-reference/photo-mockups/update-an-existing-photo-mockup)                     |
| `PUT /api/v1/sudoai/2d-mockups/{mockup_id}/print-areas` | [`PUT /api/v1/photo-mockups/{mockup_id}/print-areas`](/docs/api-reference/photo-mockups/replace-the-print-areas-of-a-photo-mockup) |
| `POST /api/v1/sudoai/2d-mockups/{mockup_id}/render`     | [`POST /api/v1/photo-mockups/{mockup_id}/render`](/docs/api-reference/photo-mockups/render-a-photo-mockup)                         |
| `DELETE /api/v1/sudoai/2d-mockups/{mockup_id}`          | [`DELETE /api/v1/photo-mockups/{mockup_id}`](/docs/api-reference/photo-mockups/remove-an-existing-photo-mockup)                    |

### PSD mockup paths

Four paths under `/api/v1/mockups` are earlier names for the PSD mockup
collection.

| Earlier path                           | Current path                                                                                           |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `GET /api/v1/mockups`                  | [`GET /api/v1/psd-mockups`](/docs/api-reference/psd-mockups/retrieve-a-list-of-psd-mockups)                 |
| `GET /api/v1/mockups/{uuid}`           | [`GET /api/v1/psd-mockups/{uuid}`](/docs/api-reference/psd-mockups/retrieve-a-single-psd-mockup)            |
| `PATCH /api/v1/mockups/{uuid}`         | [`PATCH /api/v1/psd-mockups/{uuid}`](/docs/api-reference/psd-mockups/update-an-existing-psd-mockup)         |
| `DELETE /api/v1/mockups/{mockup_uuid}` | [`DELETE /api/v1/psd-mockups/{mockup_uuid}`](/docs/api-reference/psd-mockups/remove-an-existing-psd-mockup) |

### The two retired render paths

The singular render paths were retired and answer `404`:
`/api/v1/sudoai/2d-mockup/render` and its older alias `/api/v1/sudoai/render`.
The mockup id moved out of the request body and into the URL, so the body now
carries only `print_areas` and `export_options`.
[Render artwork](/docs/photo-mockups/render-artwork) has the shape the body takes
now, and [Render a photo mockup](/docs/api-reference/photo-mockups/render-a-photo-mockup)
carries the full contract.

```json 404 Not Found theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "detail": "Mockup not found",
  "success": false
}
```

<Info>
  Seeing this on a path you believe is current points at the id, not the name.
  Check that the mockup id in the URL belongs to your account before you change
  anything else.
</Info>

### The job kind

A job accepted on an earlier path reports the earlier `kind`, and the same job
accepted on the current path reports the current one. Code that compares the
kind literally should accept both spellings while you move.

| Earlier kind | Current kind          |
| ------------ | --------------------- |
| `2d_create`  | `photo_mockup_create` |
| `2d_render`  | `photo_mockup_render` |

### Webhook event names

A webhook endpoint created before the current names were introduced is pinned
to the earlier spelling and keeps receiving the same five events under it. The
`kind` inside a payload always follows the endpoint, whichever path accepted
the job.

| Earlier event         | Current event                   |
| --------------------- | ------------------------------- |
| `2d_mockup.ready`     | `photo_mockup.ready`            |
| `2d_mockup.rejected`  | `photo_mockup.rejected`         |
| `2d_mockup.failed`    | `photo_mockup.failed`           |
| `2d_render.succeeded` | `photo_mockup_render.succeeded` |
| `2d_render.failed`    | `photo_mockup_render.failed`    |

```json A pinned endpoint's payload theme={"theme":{"light":"github-light","dark":"vesper"}}
{
  "version": 1,
  "event": "2d_mockup.ready",
  "job_id": "b7f2c1a0-9e34-4d21-8f0a-1c2b3d4e5f60",
  "kind": "2d_create",
  "status": "ready",
  "mockup_id": "9b0a74cd-0ebb-4748-a748-976fec8cc000",
  "name": "Classic tee, front"
}
```

The endpoint object reports the spelling it receives in `event_naming`. An
endpoint follows the spelling its `event_types` list is written in, and falls
back to `legacy` when the list does not say. Re-pin an existing endpoint to
`current` with [Update an existing webhook
endpoint](/docs/api-reference/webhook-endpoints/update-an-existing-webhook-endpoint)
once your handler reads the new names.

<Warning>
  Change the handler before the endpoint. The switch takes effect on the next
  delivery, and a handler that still matches only on `2d_render.succeeded` will
  stop recognising its own renders.
</Warning>

Event names, payloads and signature verification are covered in
[Webhooks](/docs/webhooks/overview).

## If you are still stuck

1. Check the path in your request against a current name in the tables above.
2. Read `kind` on the job and `event` on the webhook body, and accept both
   spellings until every caller has moved.
3. Regenerate your client from the current spec, so the deprecation warnings
   point at what is left.
4. [Contact us](https://sudomock.com/contact) with the request path and the job
   id.
