# Close

> Close sales CRM via the REST API - manage leads, contacts, opportunities, activities, and tasks.

Lets an agent work with your Close sales CRM - find and update leads and contacts, manage opportunities (deals), log email/call/note activities, and create or list tasks.

## What it can do

| Method | What it does |
| --- | --- |
| `close_leads_search` | Search leads by name, email, phone, company, or status. |
| `close_lead_get` | Get one lead by ID. |
| `close_lead_create` | Create a new lead. |
| `close_lead_update` | Update an existing lead. |
| `close_contact_get` | Get one contact by ID. |
| `close_contact_create` | Create a new contact under a lead. |
| `close_contact_update` | Update an existing contact. |
| `close_opportunities_search` | Search opportunities by lead and/or status. |
| `close_opportunity_get` | Get one opportunity by ID. |
| `close_opportunity_create` | Create a new opportunity (deal) on a lead. |
| `close_opportunity_update` | Update an existing opportunity. |
| `close_activity_email_create` | Log an email activity on a lead. |
| `close_activity_call_create` | Log a call activity on a lead. |
| `close_activity_note_create` | Log a note activity on a lead. |
| `close_task_create` | Create a new task on a lead. |
| `close_task_update` | Update an existing task. |
| `close_tasks_list` | List tasks, filtered by lead and/or status. |

## How to get credentials

1. Open [app.close.com/settings/api/](https://app.close.com/settings/api/).
2. Go to **Settings** -> **API Keys**.
3. Click **New API Key** and give it a name (e.g. *FlyMyAI Agent*).
4. Copy the generated key - you will not be able to see it again later.

The key authenticates over HTTP Basic auth with a blank password, so the whole key is the only credential you need.

## Fields to fill in FlyMyAI

| FlyMyAI field | Where it comes from |
| --- | --- |
| `CLOSE_API_KEY` | Close -> Settings -> API Keys -> New API Key |
