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

# Delete target

> Delete a Target, cancel its active jobs, and release exclusive graph audience membership.

Deletes the Target in the authenticated organization's scope. This is destructive and cannot be undone through the API.

## Request

<ParamField path="id" type="string" required>
  Target UUID.
</ParamField>

No query parameters or body.

## Response

`204 No Content` with an empty body means the Target was deleted. There is no response JSON, `data` object, or pagination metadata.

<ResponseExample>
  ```text 204 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  ```
</ResponseExample>

## Side effects and lifecycle

The service:

1. Marks this Target's `pending` and `running` ingest jobs as `failed` with error `watch deleted`.
2. Finds members that are exclusive to this Target within the organization and releases their graph audience access.
3. Deletes the Target. Its `watch_members` rows cascade from the foreign key, and jobs retain a nullable reference.

People also present on another Target or a custom List are not released from the organization's graph audience by this operation. Generated Lists are not deleted by this route: their `source_watch_id` is set to null by the foreign key. Do not assume deleting a Target removes every List-based event-visibility path. The route does not promise deletion of global person/profile data, and it does not delete another Target or its members.

There is no soft-delete or undo endpoint. If you need to preserve a Target's query, call [Get target](/api-reference/targets/get) first and save its `query`.

## Examples

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --fail-with-body --max-time 30 -X DELETE "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer $FRESHTALENT_API_KEY"
  ```

  ```js JavaScript fetch theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const id = "550e8400-e29b-41d4-a716-446655440000";
  const response = await fetch(`https://api.freshtalent.ai/v1/targets/${id}`, {
    method: "DELETE",
    signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
  });
  if (response.status !== 204) {
    const body = await response.text();
    throw new Error(`${response.status}: ${body}`);
  }
  ```

  ```python Python stdlib theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import os
  import urllib.error
  import urllib.request

  request = urllib.request.Request(
      "https://api.freshtalent.ai/v1/targets/550e8400-e29b-41d4-a716-446655440000",
      method="DELETE",
      headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
  )
  with urllib.request.urlopen(request, timeout=30) as response:
      assert response.status == 204
  ```
</RequestExample>

## Errors and recovery

* `401 unauthorized`, `402 payment_required`, and platform-key `400 invalid_request` have the shared authentication/access meanings.
* `404 not_found` means the Target was not found in the authenticated organization. A second delete after a successful delete also returns `404`; treat that as already absent only if your workflow can safely reconcile it.
* `429`/`5xx`: do not blindly repeat a destructive request after a timeout. First [List targets](/api-reference/targets/list) or [Get target](/api-reference/targets/get). If the Target is absent, the desired state is already reached; otherwise investigate before retrying.

## Next

* [List targets](/api-reference/targets/list) to verify that the Target is absent.
* [Create target](/api-reference/targets/create) to create a new Target from a saved query or input.
