# GET /contacts/{{id}} — Get Contact by Id

> Product: **Pabbly Chatflow** (v1)
> Base URL: `https://chatflow.pabbly.com/api/v1`
> Auth: Bearer via `Authorization` header
> Canonical: `/chatflow/contacts/get-contact-by-id`

Hit the API with GET method to retrieve details of a specific contact. Path Variables (URL Params):

**Path parameters:**

| Name | Type | Required | Description |
|------|------|----------|-------------|
| id | string | Yes | 24-character Hexadecimal id to identify the specific contact |

**Response (200)** — Success Response:

```json
{
    "status": "success",
    "message": "Contact retrieved successfully.",
    "data": {
        "_id": "677d07cda3005d94XXXXXXXX",
        "name": "John Maverick",
        "settingId": "6764020afc600862XXXXXXXX",
        "userId": "668e6cd7aacce525XXXXXXXX",
        "countryCode": "91",
        "mobile": "9176978XXXXX",
        "status": "active",
        "source": "manual",
        "optin": true,
        "attributes": [
            {
                "name": "city",
                "value": "bhopal",
                "_id": "67d01f30a2dc6b66XXXXXXXX"
            },
            {
                "name": "taxes",
                "value": "30",
                "_id": "67d01f30a2dc6b66XXXXXXXX"
            },
            {
                "name": "price",
                "value": "70",
                "_id": "67d01f30a2dc6b66XXXXXXXX"
            }
        ],
        "incomingBlocked": false,
        "broadcastIds": [],
        "list": [
            "testing",
            "sups"
        ],
        "tags": [
            "sup"
        ],
        "__v": 3,
        "createdAt": "2024-12-11T06:54:55.969Z",
        "updatedAt": "2025-03-11T11:37:39.954Z",
        "lastActive": "2025-03-11T06:08:46.563Z"
    }
}
```

**Code examples:**

_cURL_

```curl
curl https://chatflow.pabbly.com/api/v1/contacts/{{id}} \
  -H "Authorization: Bearer {{YOUR_API_KEY}}"
```

_Ruby_

```ruby
require 'net/http'
require 'json'

uri = URI('https://chatflow.pabbly.com/api/v1/contacts/{{id}}')
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'Bearer {{YOUR_API_KEY}}'

response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(request)
end

data = JSON.parse(response.body)
```

_Python_

```python
import requests

response = requests.get(
    'https://chatflow.pabbly.com/api/v1/contacts/{{id}}',
    headers={'Authorization': 'Bearer {{YOUR_API_KEY}}'},
)

data = response.json()
```

_PHP_

```php
<?php
$ch = curl_init('https://chatflow.pabbly.com/api/v1/contacts/{{id}}');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer {{YOUR_API_KEY}}']);

$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
```

_Java_

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

HttpClient client = HttpClient.newHttpClient();
HttpRequest.Builder builder = HttpRequest.newBuilder()
    .uri(URI.create("https://chatflow.pabbly.com/api/v1/contacts/{{id}}"))
    .header("Authorization", "Bearer {{YOUR_API_KEY}}")
    .GET();

HttpRequest request = builder.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

_Node.js_

```node
const response = await fetch('https://chatflow.pabbly.com/api/v1/contacts/{{id}}', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer {{YOUR_API_KEY}}',
  },
});

const data = await response.json();
```

_Go_

```go
package main

import (
    "fmt"
    "io"
    "net/http"
)

func main() {
    req, _ := http.NewRequest("GET", "https://chatflow.pabbly.com/api/v1/contacts/{{id}}", nil)
    req.Header.Set("Authorization", "Bearer {{YOUR_API_KEY}}")

    res, _ := http.DefaultClient.Do(req)
    defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)
    fmt.Println(string(body))
}
```

_.NET_

```dotnet
using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading.Tasks;

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://chatflow.pabbly.com/api/v1/contacts/{{id}}");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer {{YOUR_API_KEY}}");

var response = await client.SendAsync(request);
var data = await response.Content.ReadAsStringAsync();
Console.WriteLine(data);
```

---

**Other endpoints in Contacts:**

- [POST /contacts — Create Contacts](/chatflow/contacts/create-contacts)
- [PUT /contacts/{{id}} — Update Contact](/chatflow/contacts/update-contact)
- [GET /contacts/ — Get Contacts](/chatflow/contacts/get-contacts)
- [GET /contacts/lists — Get Contact-lists](/chatflow/contacts/get-contact-lists)

