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

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

- `source` (EnvironmentSource, required)

Request body example:

```json
{
  "source": {
    "image": "string",
    "type": "image"
  }
}
```

**Responses**

- `201` — 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, 201:

```json
{
  "build_tool_version": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "environment_id": "string",
  "id": "string",
  "images": [
    {
      "image": "string",
      "index_digest": "string",
      "manifest_digest": "string",
      "platform": "string"
    }
  ],
  "importer_version": "string",
  "resolved_features": [
    {
      "digest": "string",
      "reference": "string"
    }
  ],
  "runtime": {
    "commands": [
      {
        "command": {
          "argv": [
            "string"
          ],
          "cwd": "string",
          "env": {
            "property1": "string",
            "property2": "string"
          }
        },
        "phase": "on_create"
      }
    ],
    "env": {
      "property1": "string",
      "property2": "string"
    },
    "posix_userland": true,
    "user": "string"
  },
  "source": {
    "image": "string",
    "type": "image"
  },
  "source_digest": "string",
  "subset_report": [
    {
      "disposition": "accepted",
      "key": "string",
      "reason": "string"
    }
  ]
}
```
