> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracklysms.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a Creative

> Archive a creative (soft delete). The creative is not permanently removed.

Archives a creative by setting its status to `archived`. This is a soft delete -- the creative is not permanently removed from the system and will no longer appear in default list queries.

## Path Parameters

<ParamField path="id" type="integer" required>
  The unique identifier of the creative to archive.
</ParamField>

## Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the creative was archived successfully.
</ResponseField>

<ResponseField name="archived" type="boolean">
  Confirms the creative has been archived. Always `true` on success.
</ResponseField>

## Examples

<RequestExample>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.tracklysms.com/api/v2/creatives/101" \
    -H "X-Api-Key: trk_your_api_key_here"
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      "https://api.tracklysms.com/api/v2/creatives/101",
      headers={"X-Api-Key": "trk_your_api_key_here"}
  )

  data = response.json()
  if data["archived"]:
      print("Creative archived successfully.")
  ```

  ```javascript Node.js theme={null}
  const response = await fetch(
    "https://api.tracklysms.com/api/v2/creatives/101",
    {
      method: "DELETE",
      headers: {
        "X-Api-Key": "trk_your_api_key_here",
      },
    }
  );

  const data = await response.json();
  if (data.archived) {
    console.log("Creative archived successfully.");
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 — Success theme={null}
  {
    "success": true,
    "archived": true
  }
  ```

  ```json 404 — Not Found theme={null}
  {
    "error": "Creative not found",
    "code": "not_found"
  }
  ```

  ```json 401 — Unauthorized theme={null}
  {
    "error": "Invalid credentials",
    "code": "invalid_credentials"
  }
  ```
</ResponseExample>

## Error Codes

| HTTP Status | Error Code            | Description                                                                |
| ----------- | --------------------- | -------------------------------------------------------------------------- |
| 401         | `invalid_credentials` | API key is missing or invalid.                                             |
| 403         | `account_suspended`   | Your account is suspended. Resolve outstanding billing or contact support. |
| 429         | `rate_limited`        | Request throttled; retry with exponential backoff after the window resets. |
| 404         | `not_found`           | No creative exists with the given ID.                                      |

## Next Steps

<CardGroup cols={2}>
  <Card title="Creative Templates" icon="paintbrush" href="/guides/creatives/templates">
    Manage your templates
  </Card>

  <Card title="Create Schedule" icon="calendar" href="/api-reference/v2/schedules/create-schedule">
    Schedule campaigns
  </Card>
</CardGroup>
