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

# Get Contact

> Ambil kontak dari list tertentu menggunakan ID list

Gunakan endpoint ini untuk mengambil kontak dari satu list. Ganti `:id` pada URL dengan ID list, lalu sertakan API key pada header `api-key`.

## Request

### Headers

| Header    | Type   | Required | Description             |
| --------- | ------ | -------- | ----------------------- |
| `api-key` | string | Yes      | API key DripSender Anda |

### Path Parameters

<ParamField name="id" type="string" required>
  ID list yang kontaknya ingin Anda ambil.
</ParamField>

### Query Parameters

<ParamField name="all" type="boolean">
  Gunakan `true` untuk mengambil semua kontak tanpa pagination.
</ParamField>

### Example Request

<CodeGroup>
  ```bash theme={null}
  # Get all contacts without pagination
  curl -X GET "https://api.dripsender.id/lists/YOUR_LIST_ID?all=true" \
    -H "api-key: YOUR_API_KEY"
  ```

  ```javascript theme={null}
  // Get all contacts without pagination
  axios.get("https://api.dripsender.id/lists/YOUR_LIST_ID", {
    headers: {
      "api-key": "YOUR_API_KEY"
    },
    params: {
      all: true
    }
  }).then(response => {
    console.log(response.data);
  });
  ```
</CodeGroup>

## Response

### Success

<ResponseField name="status" type="string">
  **Code:** `200`
</ResponseField>

```json theme={null}
{
  "status": 200,
  "statusText": "",
  "data": [
    {
      "name": "Group 3",
      "phone": "120363421725383520",
      "is_group": true,
      "id": "f986abd6-1658-5ba4-80b2-c1fdba600e55",
      "created_at": 1778488291404,
      "updated_at": 1778488291404
    }
  ],
  "headers": {
    "content-length": "163",
    "content-type": "application/json"
  }
}
```

The `data` array contains the contacts in the selected list. Group entries have `is_group: true`; timestamps are Unix timestamps in milliseconds.

### Error

<ResponseField name="error" type="string">
  **Code:** `404` - Not Found (API key invalid or list not found)<br />
  **Code:** `500` - Internal Server Error
</ResponseField>
