> This page is for Omni Channel.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.hams.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.hams.ai/_mcp/server.

# Get a contact

GET https://omni-channel.hams.ai/api/v1/accounts/{account_id}/developer/contacts/{id}

Reference: https://docs.hams.ai/omni-channel/reference/contacts/get-contact

## Authentication

- `api_access_token` header (required) — An API key that an administrator creates in **Settings** > **Developer**. The personal access token of a user does not work. A key reaches every inbox, conversation, and contact in the account that created it, and nothing in other accounts.

## Request

### Path parameters

- `account_id` (integer, required) — The id of your account. It is the number after `/accounts/` in the dashboard URL.
- `id` (integer, required) — The id of the contact.

## Response

### 200

The contact.

- `payload` (Contact, optional)

## Errors

### 401 Unauthorized Error

The token does not exist, is not an API key, or belongs to another account. The token can also be the token of a user who is not a member of the account, or the account can be suspended. The body has only the `error` field.

- `error` (string, required) — `Invalid Access Token`, `Key is not authorized to access this account`, `Access to this endpoint is not authorized for this token`, `You are not authorized to access this account`, or `Account is suspended`.

### 404 Not Found Error

The conversation or contact is not in this account. The body is `{"error": "Resource could not be found"}`.

- `error` (string, required)

## Types

### Contact

- `id` (integer, optional)
- `name` (string, optional)
- `email` (string, optional, nullable)
- `phone_number` (string, optional, nullable) — E.164, for example `+971500000000`.
- `identifier` (string, optional, nullable) — Your own id for the contact. It is unique in the account.
- `blocked` (boolean, optional)
- `availability_status` (string, optional)
- `thumbnail` (string, optional)
- `custom_attributes` (map from string to any, optional)
- `additional_attributes` (map from string to any, optional)
- `last_activity_at` (integer, optional) — Unix timestamp, in seconds.
- `created_at` (integer, optional) — Unix timestamp, in seconds.
- `contact_inboxes` (list of map from string to any, optional) — The inboxes where the contact has an address.

## Examples

**Response**

```json
{
  "payload": {
    "id": 1,
    "name": "string",
    "email": "string",
    "phone_number": "string",
    "identifier": "string",
    "blocked": true,
    "availability_status": "string",
    "thumbnail": "string",
    "custom_attributes": {},
    "additional_attributes": {},
    "last_activity_at": 1,
    "created_at": 1,
    "contact_inboxes": [
      {}
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1"

headers = {"api_access_token": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1';
const options = {method: 'GET', headers: {api_access_token: '<apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

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

func main() {

	url := "https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("api_access_token", "<apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["api_access_token"] = '<apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1")
  .header("api_access_token", "<apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1', [
  'headers' => [
    'api_access_token' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1");
var request = new RestRequest(Method.GET);
request.AddHeader("api_access_token", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["api_access_token": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://omni-channel.hams.ai/api/v1/accounts/1/developer/contacts/1")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```