---
title: "Create deployment"
url: https://hexelstudio.com/docs/api/titan/management/create-deployment
---

# Create deployment

**POST** `/titan/management/deployments`

## Headers

- `Authorization: string`

  `Bearer <token>`. A Hexel Studio access token for a member or a service user of your organization (or send a service user's API key as X-API-Key).

- `Idempotency-Key: string`

  Organization-scoped request key. Reusing it with a different normalized request returns 409.

## Body parameters

- `exposure: string`

  One of: `"public"`, `"private"`

- `hosting_mode: string`

  One of: `"hexel_managed"`, `"hexel_managed_dedicated"`, `"customer_managed"`

- `name: string`

  Nonempty name without surrounding whitespace or ASCII control characters; backend limit is 128 UTF-8 bytes.

- `policy_template: string`

  One of: `"default-deny-v1"`

- `region: string`

  Must match an operator-approved region profile for the requested hosting mode and exposure.

## Returns

`202` Blueprint preparation accepted; no infrastructure has been provisioned. (`CreateResponse`)

- `deployment: object`

  - `config_digest: string`

  - `created_at: string`

  - `id: string`

  - `organization_id: string`

  - `plane: optional object`

    - `agent_namespace_pattern: string`

    - `audit_client_id: optional string`

    - `broker_audience: string`

    - `enforcement_deployment_id: string`

    - `hostname: optional string`

    - `runtime_audience: string`

  - `policy_layers_refused: optional object`

    - `error_code: optional string`

    - `layer_digests: map[string]`

    - `refused_at: string`

  - `requested_by: string`

  - `spec: object`

    - `exposure: string`

      One of: `"public"`, `"private"`

    - `hosting_mode: string`

      One of: `"hexel_managed"`, `"hexel_managed_dedicated"`, `"customer_managed"`

    - `name: string`

      Nonempty name without surrounding whitespace or ASCII control characters; backend limit is 128 UTF-8 bytes.

    - `policy_template: string`

      One of: `"default-deny-v1"`

    - `region: string`

      Must match an operator-approved region profile for the requested hosting mode and exposure.

  - `state: string`

    Desired deployment state; DRAFT is not deployment activation or signed approval. PROVISIONED means the deployment's keys and its Authority record (on the shared plane, or in its own Titan Dedicated instance) exist; it is not proof that every service serves it (see the plan's blockers).

    One of: `"DRAFT"`, `"PROVISIONED"`, `"FAILED_CLOSED"`, `"RETIRED"`

  - `updated_at: string`

- `operation: object`

  - `attempt: integer`

  - `created_at: string`

  - `deployment_id: string`

  - `error_code: optional string`

  - `id: string`

  - `organization_id: string`

  - `stage: string`

  - `state: string`

    PREPARED records blueprint generation only; it does not activate infrastructure or an endpoint. PROVISIONED (provisioned deployments only: hexel_managed on a shared plane, or hexel_managed_dedicated in its own Titan Dedicated instance) records that the deployment's keys and Authority record were created.

    One of: `"QUEUED"`, `"RUNNING"`, `"PREPARED"`, `"PROVISIONED"`, `"FAILED_CLOSED"`

  - `updated_at: string`

## Errors

- `400` Invalid request, path, query, or idempotency key; on create, PROFILE_NOT_AVAILABLE when the region, hosting mode and exposure match no approved profile.
- `401` Missing or invalid authenticated context.
- `402` PLAN_REQUIRED when the billing gate is on and the organization has no Titan plan, trial or override: error.message is "Start your 7-day trial or choose a plan." and error.billing_url the console's plans page. Nothing is created; a replay of an earlier successful create still returns it.
- `403` Organization mismatch or denied IAM action.
- `404` Unknown or foreign organization resource, or plan not yet prepared.
- `405` HTTP method is not supported on this route.
- `409` Idempotency conflict or organization deployment quota reached.
- `413` Request body exceeds its size limit.
- `415` Unsupported request media type.
- `503` Local storage or preparation service unavailable; PLAN_CHECK_UNAVAILABLE (with Retry-After) when the billing gate is on and billing could not be checked. Nothing is created; retry.

## Example

```bash
curl --request POST \
  --url 'https://api.hexelstudio.com/v1/titan/management/deployments' \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header 'Idempotency-Key: IDEMPOTENCY_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "exposure": "public",
  "hosting_mode": "hexel_managed",
  "name": "string",
  "policy_template": "default-deny-v1",
  "region": "string"
}'
```

### Response (202)

```json
{
  "deployment": {
    "config_digest": "string",
    "created_at": "2026-01-01T00:00:00Z",
    "id": "string",
    "organization_id": "string",
    "plane": {
      "agent_namespace_pattern": "string",
      "audit_client_id": "string",
      "broker_audience": "string",
      "enforcement_deployment_id": "string",
      "hostname": "string",
      "runtime_audience": "string"
    },
    "policy_layers_refused": {
      "error_code": "string",
      "layer_digests": {
        "key": "string"
      },
      "refused_at": "2026-01-01T00:00:00Z"
    },
    "requested_by": "string",
    "spec": {
      "exposure": "public",
      "hosting_mode": "hexel_managed",
      "name": "string",
      "policy_template": "default-deny-v1",
      "region": "string"
    },
    "state": "DRAFT",
    "updated_at": "2026-01-01T00:00:00Z"
  },
  "operation": {
    "attempt": 0,
    "created_at": "2026-01-01T00:00:00Z",
    "deployment_id": "string",
    "error_code": "string",
    "id": "string",
    "organization_id": "string",
    "stage": "string",
    "state": "QUEUED",
    "updated_at": "2026-01-01T00:00:00Z"
  }
}
```

### Response (400)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (401)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (402)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (403)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (404)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (405)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (409)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (413)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (415)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```

### Response (503)

```json
{
  "error": {
    "billing_url": "string",
    "code": "string",
    "message": "string"
  }
}
```
