# Errors

A failed call answers with a status code and a JSON body:

```json
{ "error": "entity_ids must be a non-empty array" }
```

Some carry a `code` too (`bad_project`, `project_not_found`, `team_forbidden`).

| Status | Means | Do |
|---|---|---|
| `200` / `201` | Done. `201` = something was created. | — |
| `400` | Something in the request is missing or wrong. | Read `error`, fix the request. |
| `401` | No key, a wrong key or a revoked key. | Check the key and the data centre. |
| `403` | Not allowed for this account. | — |
| `404` | Not found **in this project** — or `X-Entayo-Project` is not yours. | Check the id and the project. |
| `409` | Clashes with what is there — a name already taken, a campaign already sent. | Change the name, or leave it. |
| `500` | Our fault. | Try again; tell us if it keeps happening. |

## Good to know

- **Ids** are positive whole numbers. A person or company has a **master id**
  (`id`) and a **record id** (`entity_id`) — the reference says which one each
  endpoint takes.
- **Deletes cannot be undone.** Deleting a record also deletes its activity
  and tasks.
- **Big jobs:** keep pages to `limit=1000` or less, and send imports in chunks
  of a few hundred rows.
