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

# Pipedrive

> Pipedrive REST API access for querying and managing CRM records (Deals, Persons, Organizations, Leads, Activities, and Pipelines) in a connected user's account.

Pipedrive REST API access for querying and managing CRM records (Deals, Persons, Organizations, Leads, Activities, and Pipelines) in a connected user's account. Use when an agent needs to search the CRM, look up or create records, update fields, move deals through pipeline stages, or discover an account's custom-field schema. Routes through Pipedream Connect — the user sees one Pipedrive consent screen on connect that says "Pipedream wants access" (Pipedream owns the verified app), and all calls run under that user's own Pipedrive permissions. Works with any company account without the caller needing to know the account's Pipedrive subdomain.

9 example endpoints available through Lava's AI Gateway. See the [Pipedrive API docs](https://developers.pipedrive.com/docs/api/v1) for full documentation.

<Warning>This provider requires your own credentials — connect your API key or OAuth account before use.</Warning>

<Info>This is a **catch-all provider** — any valid URL under `https://company.pipedrive.com` is supported. Pipedrive REST API v1 endpoints. Construct URLs as [https://company.pipedrive.com/api/v1/\&#123;path\&#125](https://company.pipedrive.com/api/v1/\&#123;path\&#125); — the literal host `company.pipedrive.com` always works because the gateway routes by path and Pipedream resolves the connected org's real subdomain automatically (the org's actual host works too). Common roots: deals, persons, organizations, leads, activities, pipelines, stages, notes, products, users/me, itemSearch. Search with itemSearch?term=\{q}\&item\_types=deal,person,organization (term needs 2+ chars). List endpoints paginate with start (offset) + limit (max 500); the response's additional\_data.pagination tells you more\_items\_in\_collection and the next\_start to pass as start for the next page. Create with POST, update with PUT (Pipedrive applies partial updates — send only the fields you are changing), delete with DELETE. The Lava gateway requires a JSON body on every non-GET call — for DELETE, send an empty object as body\_json. Person email/phone are arrays of \{value,label,primary} objects. Custom fields have 40-char hash keys — discover them via dealFields / personFields / organizationFields. Every successful response wraps its payload under `data`. See [https://developers.pipedrive.com/docs/api/v1](https://developers.pipedrive.com/docs/api/v1) for the full reference. The endpoints below are curated examples.</Info>

## Endpoints

### Get the connected Pipedrive account (user email, name, company name, and currency). Use this as a cheap auth probe after connect — confirms the OAuth grant is healthy without enumerating CRM records.

**GET** `https://company.pipedrive.com/api/v1/users/me` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/users/me', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fusers%2Fme" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List deals — the workhorse for "what is in the pipeline" questions. Filter with status (open/won/lost/deleted/all\_not\_deleted), user\_id, stage\_id, or filter\_id. Paginate with start + limit (max 500); read additional\_data.pagination.next\_start for the next page.

**GET** `https://company.pipedrive.com/api/v1/deals?status=open&limit=50` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/deals?status=open&limit=50', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fdeals%3Fstatus%3Dopen%26limit%3D50" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Full-text search across the CRM. Use when you have a free-text term (a person's name, a company) and don't know its ID. Scope with item\_types — any of deal, person, organization, product, lead, file, mail\_attachment, project (omit to search all) — and limit fields per result; term needs 2+ characters.

**GET** `https://company.pipedrive.com/api/v1/itemSearch?term=Acme&item_types=organization,person&limit=10` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/itemSearch?term=Acme&item_types=organization,person&limit=10', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2FitemSearch%3Fterm%3DAcme%26item_types%3Dorganization%2Cperson%26limit%3D10" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Read a single person (contact) by numeric ID. Returns the full record under `data`, including email/phone arrays and any custom fields. Person IDs come from itemSearch or the persons list.

**GET** `https://company.pipedrive.com/api/v1/persons/123` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/persons/123', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fpersons%2F123" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### List the field schema for persons: field keys (custom fields use 40-char hash keys), names, types, and the options for enum/set fields — what you need to read custom values and build valid create/update bodies. Equivalent endpoints exist for deals (dealFields) and organizations (organizationFields).

**GET** `https://company.pipedrive.com/api/v1/personFields` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/personFields', { method: 'GET' });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2FpersonFields" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY"
    ```
  </Tab>
</Tabs>

### Create a person (contact). Required: name. email and phone are arrays of \{value,label,primary} objects. Link to a company with org\_id (an organization ID). Returns 201 with the new record under `data`.

**POST** `https://company.pipedrive.com/api/v1/persons` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/persons', {
      body: {
    "name": "Ada Lovelace",
    "email": [
      {
        "value": "ada@example.com",
        "primary": true,
        "label": "work"
      }
    ],
    "phone": [
      {
        "value": "+1-555-0100",
        "primary": true,
        "label": "work"
      }
    ]
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fpersons" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name":"Ada Lovelace","email":[{"value":"ada@example.com","primary":true,"label":"work"}],"phone":[{"value":"+1-555-0100","primary":true,"label":"work"}]}'
    ```
  </Tab>
</Tabs>

### Create a deal. Required: title. Set value + currency for the amount, person\_id / org\_id to link contacts, and pipeline\_id / stage\_id to place it (omit to use the default pipeline). status defaults to open. Returns 201 with the new deal under `data`.

**POST** `https://company.pipedrive.com/api/v1/deals` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/deals', {
      body: {
    "title": "Acme — Enterprise plan",
    "value": 50000,
    "currency": "USD",
    "status": "open"
    },
    });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X POST "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fdeals" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"title":"Acme — Enterprise plan","value":50000,"currency":"USD","status":"open"}'
    ```
  </Tab>
</Tabs>

### Update a person. Pipedrive applies partial updates on PUT — send only the fields you are changing; omitted fields are left untouched. Returns the updated record under `data`. (The same PUT-with-id shape updates deals and organizations.)

**PUT** `https://company.pipedrive.com/api/v1/persons/123` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/persons/123', { method: 'PUT', body: {"name":"Ada B. Lovelace"} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X PUT "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fpersons%2F123" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{"name":"Ada B. Lovelace"}'
    ```
  </Tab>
</Tabs>

### Delete a person. Returns `data: { id }` on success. The gateway requires a JSON body on every non-GET call, so send an empty object as body\_json. Prefer this only when the workflow truly needs a hard delete — Pipedrive deletes are recoverable from the UI for a limited window.

**DELETE** `https://company.pipedrive.com/api/v1/persons/123` — Free

<Tabs>
  <Tab title="SDK">
    ```typescript theme={null}
    const data = await lava.gateway('https://company.pipedrive.com/api/v1/persons/123', { method: 'DELETE', body: {} });
    ```
  </Tab>

  <Tab title="cURL">
    ```bash theme={null}
    curl -X DELETE "https://api.lava.so/v1/forward?u=https%3A%2F%2Fcompany.pipedrive.com%2Fapi%2Fv1%2Fpersons%2F123" \
      -H "Authorization: Bearer $LAVA_SECRET_KEY" \
      -H "Content-Type: application/json" \
      -d '{}'
    ```
  </Tab>
</Tabs>

## Next Steps

<CardGroup cols={2}>
  <Card title="All Providers" icon="grid" href="/gateway/supported-providers">
    Browse all supported AI providers
  </Card>

  <Card title="Forward Proxy" icon="route" href="/gateway/forward-proxy">
    Learn how to construct proxy URLs and authenticate requests
  </Card>
</CardGroup>
