---
search:
  tags:
    - Environments
    - POST
seo:
  description: >-
    Reference for the POST /v1/revisions/{revision_id}/prepare endpoint in the
    Carton API reference.
sidebar:
  label: POST /v1/revisions/{revision_id}/prepare
  badge: POST
title: POST /v1/revisions/{revision_id}/prepare
type: openapi-operation
---
`POST /v1/revisions/{revision_id}/prepare`

**Request body** (`application/json`, required)

- `platforms` (Platform[])
- `resources` (ResourceRequest, required)
- `targets` (Text[], required)

Request body example:

```json
{
  "platforms": [
    "string"
  ],
  "resources": {
    "cpu_millicores": {
      "max": 250,
      "min": 250
    },
    "disk_bytes": {
      "max": 1,
      "min": 1
    },
    "guarantee": "best_effort",
    "memory_bytes": {
      "max": 268435456,
      "min": 268435456
    },
    "size": "xsmall"
  },
  "targets": [
    "string"
  ]
}
```

**Responses**

- `202` — Success
- `400` — Typed error; Retry-After is present when retryable
- `401` — Typed error; Retry-After is present when retryable
- `403` — Typed error; Retry-After is present when retryable
- `404` — Unknown resource
- `409` — Idempotency request in progress, expired response, or conflicting state
- `413` — Request exceeds policy body limit
- `415` — Expected application/json
- `422` — Typed error; Retry-After is present when retryable
- `429` — Typed error; Retry-After is present when retryable
- `500` — Typed error; Retry-After is present when retryable
- `503` — Typed error; Retry-After is present when retryable

Response example, 202:

```json
{
  "artifacts": [
    {
      "error": {
        "code": "unsupported_capability",
        "details": {
          "capability": null,
          "field": null,
          "outcome": null,
          "reason": null,
          "scope": null,
          "trace": null,
          "vendor_details": {},
          "violations": null
        },
        "message": "string",
        "retryable": true
      },
      "id": "string",
      "offering": "string",
      "phase": "pending",
      "platform": "string",
      "revision": "string",
      "target": "string"
    }
  ],
  "created_at": "2019-08-24T14:15:22Z",
  "id": "string",
  "revision": "string"
}
```
