<!-- Generated from the canonical 99 Digital API documentation. Do not edit this file. -->

Canonical page: https://docs.99digital.co.il/facebook-api/facebook-pages/get-lead

# Get Lead

`POST https://api.99digital.co.il/facebook/page/getLead`

This endpoint allows you to get the content of a Lead Ads lead: the answers a person gave in one of your Facebook Lead Ads forms.

You don't need it to receive your leads: the
[Facebook Lead](https://docs.99digital.co.il/facebook-api/webhooks/facebook-lead) webhook event already
carries the lead's content. Get Lead stays available as an optional
re-fetch — for example, for a lead event that arrived with `leadFetched`
false.

Get Lead helps after a temporary failure of the automatic fetch (for
example, Facebook did not answer in time). When the lead event arrived
with `leadFetched` false because the connection's token expired or a
permission is missing, Get Lead fails for the same reason (reason 10 or
11).

**Settings**:

| Setting | Value |
| --- | --- |
| URL | `https://api.99digital.co.il/facebook/page/getLead` |
| Method | JSON via POST |
| Header | Your API key for the service (the `apiKey` header) |

**Body**:

| Parameter | Description / Example | Mandatory | Example |
| --- | --- | --- | --- |
| from | The ID you received for the connection (a Facebook Pages connection) | yes | 463745743546345 |
| leadgenId | The lead ID: the `leadgenId` of the [Facebook Lead](https://docs.99digital.co.il/facebook-api/webhooks/facebook-lead) webhook event | yes | 1293847560192837 |

**Response**:

```json
{
  "status": "OK",
  "from": "463745743546345",
  "leadgenId": "1293847560192837",
  "lead": {
    "id": "1293847560192837",
    "created_time": "2026-11-25T08:30:00+0000",
    "form_id": "918273645501928",
    "is_organic": false,
    "field_data": [
      { "name": "full_name", "values": ["Dana Cohen"] },
      { "name": "email", "values": ["dana@example.com"] },
      { "name": "phone_number", "values": ["+972501234567"] }
    ]
  },
  "reason": 1
}
```

**Response-Explain**:

| Parameter | Description |
| --- | --- |
| status | OK or FAIL |
| from | Your ID for the service |
| leadgenId | The lead ID you sent |
| lead | The lead, as Facebook returns it — see the table below |

**lead**:

| Value | Information |
| --- | --- |
| id | The lead ID |
| created_time | When the form was submitted, as Facebook returns it: a date and time in UTC, for example `2026-11-25T08:30:00+0000` (not Unix time, unlike `createdTime` in the webhook event) |
| form_id | The ID of the Lead Ads form |
| is_organic | true - the lead came from organic reach. false - it came from an ad |
| field_data | The answers: one `name` and `values` for each question. `name` is the question's key as Facebook sends it (for example `full_name`, `email`, `phone_number`, or the key of your own question). `values` is a list of texts: a multiple-choice question can have several |

Other fields — `ad_id`, `adset_id` and `campaign_id` — are returned only
when Meta provides them.

**reason**:

| Value | Information |
| --- | --- |
| 1 | Not FAIL. The status is OK |
| 2 | Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error |
| 3 | Wrong apiKey (the apiKey header is missing or wrong) |
| 4 | leadgenId is missing (or is not a valid lead ID) |
| 6 | Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook Pages endpoint) |
| 7 | The connection is not active (it was disabled) |
| 10 | You must do the onboarding again, the connection has expired |
| 11 | A permission is missing: the connection does not have Meta's permission for this action (reading leads) |
| 12 | Rate limit error. Too many requests. Please wait a few minutes and try again |
| 13 | The leadgenId is invalid or wrong: the lead was not found, or you have no access to it |
| 15 | Meta rejected the request: an invalid parameter, or a policy violation |
| 18 | General error, try again |

**Remarks**:

- Lead answers are personal data of the person who filled in the form.
  Store and protect them on your side accordingly.

## Authentication

`apiKey` in the header — Your API key for the service.

## Request body

Content type: `application/json` (required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | string | Yes | The ID you received for the connection (a Facebook Pages connection). Example: `463745743546345`. |
| `leadgenId` | string | Yes | The lead ID: the `leadgenId` of the Facebook Lead webhook event. Example: `1293847560192837`. |

### Example: Get a lead

The content of one lead, by its `leadgenId`.

```json
{
  "from": "463745743546345",
  "leadgenId": "1293847560192837"
}
```

## Responses

### 200 — The request was processed. Both a successful and a failed request answer with HTTP 200 — check `status`, and `reason` when it is FAIL.

Content type: `application/json`

| Field | Type | Description |
| --- | --- | --- |
| `status` | string | (one of: OK) OK or FAIL. `OK` — the lead is in `lead`. Always `OK`. |
| `from` | string | (one of: OK) Your ID for the service. Example: `463745743546345`. |
| `leadgenId` | string | (one of: OK) The lead ID you sent. Example: `1293847560192837`. |
| `lead` | object | (one of: OK) The lead, as Facebook returns it. |
| `lead.id` | string | (one of: OK) The lead ID. Example: `1293847560192837`. |
| `lead.created_time` | string | (one of: OK) When the form was submitted, as Facebook returns it: a date and time in UTC, for example `2026-11-25T08:30:00+0000` (not Unix time, unlike `createdTime` in the webhook event). Example: `2026-11-25T08:30:00+0000`. |
| `lead.form_id` | string | (one of: OK) The ID of the Lead Ads form. Example: `918273645501928`. |
| `lead.is_organic` | boolean | (one of: OK) `true` — the lead came from organic reach. `false` — it came from an ad. Example: `false`. |
| `lead.field_data` | array of object | (one of: OK) The answers — one `name` and `values` for each question. |
| `lead.field_data[].name` | string | (one of: OK) The question's key as Facebook sends it (for example `full_name`, `email`, `phone_number`, or the key of your own question). Example: `full_name`. |
| `lead.field_data[].values` | array of string | (one of: OK) The answer, as a list of texts — a multiple-choice question can have several. |
| `lead.ad_id` | string | (one of: OK) The ID of the ad. Returned only when Meta provides it. Example: `120211938475610290`. |
| `lead.adset_id` | string | (one of: OK) The ID of the ad set. Returned only when Meta provides it. Example: `120211938475610288`. |
| `lead.campaign_id` | string | (one of: OK) The ID of the campaign. Returned only when Meta provides it. Example: `120211938475610280`. |
| `reason` | integer | (one of: OK) 1 — not FAIL, the status is OK. Always `1`. |
| `status` | string | (one of: FAIL) FAIL — the request was not carried out. `reason` says why. Always `FAIL`. |
| `reason` | integer | (one of: FAIL) The status explanation in case of FAIL. One of: `2` — Your "from" account does not exist (for example, its onboarding is not finished yet) or is missing, or JSON syntax error; `3` — Wrong apiKey (the apiKey header is missing or wrong); `4` — leadgenId is missing (or is not a valid lead ID); `6` — Wrong connection type. Your keys/ID are correct, but you are using the wrong endpoint (for example: your onboarding was for Facebook Messenger, but you are using this Facebook Pages endpoint); `7` — The connection is not active (it was disabled); `10` — You must do the onboarding again, the connection has expired; `11` — A permission is missing: the connection does not have Meta's permission for this action (reading leads); `12` — Rate limit error. Too many requests. Please wait a few minutes and try again; `13` — The leadgenId is invalid or wrong: the lead was not found, or you have no access to it; `15` — Meta rejected the request: an invalid parameter, or a policy violation; `18` — General error, try again. |
| `from` | string | (one of: FAIL) Your ID for the service. Returned when Meta rejected the request (reason 10 and above). Example: `463745743546345`. |

#### Example: OK

An organic lead — no ad fields.

```json
{
  "status": "OK",
  "from": "463745743546345",
  "leadgenId": "1293847560192837",
  "lead": {
    "id": "1293847560192837",
    "created_time": "2026-11-25T08:30:00+0000",
    "form_id": "918273645501928",
    "is_organic": true,
    "field_data": [
      {
        "name": "full_name",
        "values": [
          "Dana Cohen"
        ]
      },
      {
        "name": "email",
        "values": [
          "dana@example.com"
        ]
      },
      {
        "name": "phone_number",
        "values": [
          "+972501234567"
        ]
      }
    ]
  },
  "reason": 1
}
```

#### Example: OK — lead from an ad

A lead from an ad, with the ad fields Meta provided.

```json
{
  "status": "OK",
  "from": "463745743546345",
  "leadgenId": "1293847560199921",
  "lead": {
    "id": "1293847560199921",
    "created_time": "2026-11-25T09:15:00+0000",
    "ad_id": "120211938475610290",
    "adset_id": "120211938475610288",
    "campaign_id": "120211938475610280",
    "form_id": "918273645501928",
    "is_organic": false,
    "field_data": [
      {
        "name": "full_name",
        "values": [
          "Yossi Levi"
        ]
      },
      {
        "name": "preferred_contact_time",
        "values": [
          "morning",
          "evening"
        ]
      }
    ]
  },
  "reason": 1
}
```

#### Example: Reason 4

`leadgenId` is missing, or it is not a valid lead ID.

```json
{
  "status": "FAIL",
  "reason": 4
}
```

#### Example: Reason 11

The connection does not have Meta's permission to read leads.

```json
{
  "status": "FAIL",
  "reason": 11,
  "from": "463745743546345"
}
```

#### Example: Reason 13

The lead was not found, or you have no access to it.

```json
{
  "status": "FAIL",
  "reason": 13,
  "from": "463745743546345"
}
```
