---
title: "DELETE /v1/jobs/{jobId}/candidates"
description: Remove study candidates from a job
full: true
---

**Auth:** required. Send an `ivy_` API key (`Authorization: Bearer ivy_…` or `X-Ivy-Api-Key`), a Clerk session JWT (`Authorization: Bearer …`) or the Clerk `__session` cookie (browser sessions). See [Authentication](/docs/api/authentication).

Removes the candidates with the given ids from a job you can write to. Only candidates recorded for this job are removed; an id that belongs to another job, or that does not exist, is ignored. The response reports how many ids were sent, not how many rows were removed.

A project viewer cannot remove candidates. With a project-scoped API key, a job outside the key's projects returns 403.

## Request

#### Path parameters

- `jobId` (string (uuid)) —
Job UUID.

#### Query parameters

- `id` (string[]) —
Candidate id to remove. Repeat the parameter to remove several.

## Responses

### `200` OK

The ids were processed

Response shape:

- `ok` (boolean) —

- `deleted` (integer) —
Number of ids sent

### `400` Bad Request

The job id is empty, or no `id` was given

Response shape: `object`

### `401` Unauthorized

Authentication required

Response shape: `object`

### `403` Forbidden

You cannot write to the job, or it is outside your API key's project scope

Response shape: `object`

### `429` Too Many Requests

Rate limit exceeded

Response shape: `object`

### `500` Internal Server Error

Removing candidates failed

Response shape: `object`

**curl**

```bash
curl -X DELETE 'https://ivybiosciences.com/api/v1/jobs/{jobId}/candidates' \
  -H "Authorization: Bearer $IVY_API_KEY"
```

**JavaScript**

```js
const res = await fetch('https://ivybiosciences.com/api/v1/jobs/{jobId}/candidates', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.IVY_API_KEY}`,
  },
});
const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.delete(
    "https://ivybiosciences.com/api/v1/jobs/{jobId}/candidates",
    headers={"Authorization": f"Bearer {os.environ['IVY_API_KEY']}"},
)
data = res.json()
```
