# Enable ephemeral TTL for a workspace

Configures time-to-live settings to automatically destroy infrastructure and optionally delete the workspace.

Endpoint: PUT /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/ephemeral-config
Version: 1.0
Security: x-api-key

## Path parameters:

  - `org` (string, required)
    Org is the organisation identifier.
    Example: "px0"

  - `project` (string, required)
    Project is the project identifier.
    Example: "zwi"

  - `workspace` (string, required)
    Workspace identifier
    Example: "Quibusdam mollitia quia qui reiciendis ex facere."

## Header parameters:

  - `Harness-Account` (string, required)
    Account is the internal customer account ID.
    Example: "k"

## Request fields (application/json):

  - `delete_delay_unit` (string)
    Unit for delete delay
    Enum: "hours", "days"

  - `delete_delay_value` (integer)
    Delete workspace after N hours or days from now
    Example: 1208607632238069500

  - `delete_on_date` (string)
    Specific date to delete workspace (ISO 8601 format, e.g. 2026-09-02)
    Example: "Non facilis dolor esse accusamus non fugit."

  - `delete_workspace` (boolean)
    Whether to delete the workspace record after infrastructure is destroyed
    Example: true

  - `destroy_delay_unit` (string)
    Unit for destroy delay
    Enum: "hours", "days"

  - `destroy_delay_value` (integer)
    Destroy infrastructure after N hours or days from now
    Example: 6285340331420218000

  - `destroy_on_date` (string)
    Specific date to destroy infrastructure (ISO 8601 format, e.g. 2026-08-24)
    Example: "Voluptatem dolorum."

  - `pipeline_id` (string, required)
    Pipeline to run for destroying infrastructure
    Example: "Velit consequatur voluptatem."

  - `provisioner` (string)
    Provisioner key (defaults to opentofu when omitted)
    Example: "Perferendis vero."

## Response 200 fields (application/json):

  - `delete_at` (string)
    Computed delete timestamp (ISO 8601), empty if delete_workspace is false
    Example: "Eum tempora."

  - `destroy_at` (string)
    Computed destroy timestamp (ISO 8601)
    Example: "Vel cupiditate nemo."

  - `status` (string, required)
    Outcome message
    Example: "Totam dolor sit."

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?
    Example: true

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?
    Example: true

  - `timeout` (boolean, required)
    Is the error a timeout?


