# Quickstart

Set two variables first:

```bash
export CRM=https://apac.zocton.com/entayo-crm/api   # your data centre
export KEY=entayo_…                                  # your API key
```

## 1. Check the key

```bash
curl -s $CRM/auth/me -H "Authorization: Bearer $KEY"
```

## 2. See the columns of a person

```bash
curl -s $CRM/master/people/fields -H "Authorization: Bearer $KEY"
```

Use these `slug`s as keys in `values`.

## 3. Add a person

```bash
curl -s -X POST $CRM/master/people \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"values":{"first_name":"Ada","last_name":"Lovelace","email":"ada@example.com"}}'
```

The answer has two ids:

- `id` — the **master id**. Lists and campaigns use it.
- `entity_id` — the **record id**. Activity, tasks and every `/entities/{id}`
  call use it.

## 4. Find people

```bash
curl -s "$CRM/master/people?search=lovelace&limit=20" -H "Authorization: Bearer $KEY"
```

## 5. Log a phone call

Find the activity type's id first:

```bash
curl -s $CRM/activity-types -H "Authorization: Bearer $KEY"
```

Then log it on the person's record id:

```bash
curl -s -X POST $CRM/entities/9121/activities \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"activity_type_id":7,"direction":"outbound","subject":"Intro call","body":"Talked about the rollout."}'
```

## 6. Create a follow-up task

```bash
curl -s -X POST $CRM/tasks \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"title":"Send the proposal","entity_id":9121,"priority":"high","due_date":"2026-11-05T09:00:00Z"}'
```

## 7. Put the person in a list

```bash
curl -s -X POST $CRM/lists \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"name":"Webinar Nov 2026","kind":"person","master_ids":[312]}'
```

Everything else is in the [API reference](https://www.entayo.com/docs/api/entayo-crm).
