# 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: "2"

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

  - `workspace` (string, required)
    Workspace identifier
    Example: "Soluta cumque et dolores est repudiandae."

## Header parameters:

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

## Request fields (application/json):

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

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

  - `delete_on_date` (string)
    Specific date to delete workspace (ISO 8601 format, e.g. 2026-09-02)
    Example: "Sit voluptates pariatur."

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

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

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

  - `destroy_on_date` (string)
    Specific date to destroy infrastructure (ISO 8601 format, e.g. 2026-08-24)
    Example: "Amet labore itaque et cupiditate autem."

  - `pipeline_id` (string, required)
    Pipeline to run for destroying infrastructure
    Example: "Ratione id accusantium cum aut."

  - `provisioner` (string)
    Provisioner key (defaults to opentofu when omitted)
    Example: "Itaque pariatur officiis sint ducimus saepe."

## Response 200 fields (application/json):

  - `delete_at` (string)
    Computed delete timestamp (ISO 8601), empty if delete_workspace is false
    Example: "Voluptatem omnis laudantium porro ut."

  - `destroy_at` (string)
    Computed destroy timestamp (ISO 8601)
    Example: "Repudiandae voluptatem labore."

  - `status` (string, required)
    Outcome message
    Example: "Non laudantium laborum optio delectus illum."

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

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

  - `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?

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


