# Get contact by ID with GET /api/v1/contacts/{id}

> Get one contact by ID from the Mujib REST API with GET /api/v1/contacts/{id}, with examples in curl, JavaScript and Python, the response, and what a 404 means.

To get a contact by ID, call `GET /api/v1/contacts/{id}`, where `{id}` is the customer's id from the contacts list or from a booking. It returns the customer with the same fields as the list, and it needs a key with the `contacts.read` scope.

## When should I get a single contact?

Use it when you hold a customer's id and want their current details, without reading the whole list.

- **From a booking:** every booking carries `customer.contactId`, which reads the customer's name, phone number and current stage.
- **To refresh your own record:** if you store customers in your system, read one by id to see their stage and tags as they are now.

## Which parameters does it take?

One parameter, in the path:

| Parameter | Where | Meaning |
| --- | --- | --- |
| `id` | path | The customer's id, as in the list's `id` or a booking's `customer.contactId` |

A malformed id returns a 404, exactly like an id that does not exist.

## How do I send the request?

```bash
curl https://api.mujib.ai/api/v1/contacts/5d8f2a61-0c4e-4b7a-9f13-6e2b8c0d4a57 \
  -H "Authorization: Bearer $MUJIB_API_KEY"
```

```js
const id = '5d8f2a61-0c4e-4b7a-9f13-6e2b8c0d4a57';
const res = await fetch(`https://api.mujib.ai/api/v1/contacts/${encodeURIComponent(id)}`, {
  headers: { Authorization: `Bearer ${process.env.MUJIB_API_KEY}` },
});
const body = await res.json();
if (res.status === 404) console.log('not in this business');
else if (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);
else console.log(body.data.name, body.data.stage);
```

```python
import os
import requests

contact_id = "5d8f2a61-0c4e-4b7a-9f13-6e2b8c0d4a57"
res = requests.get(
    f"https://api.mujib.ai/api/v1/contacts/{contact_id}",
    headers={"Authorization": f"Bearer {os.environ['MUJIB_API_KEY']}"},
    timeout=30,
)
body = res.json()
if res.status_code == 404:
    print("not in this business")
elif not res.ok:
    raise RuntimeError(f"{res.status_code} {body['error']['code']}: {body['error']['message']}")
else:
    print(body["data"]["name"], body["data"]["stage"])
```

## What does the response look like?

A 200, with the customer in `data`. The data is made up:

```json
{
  "data": {
    "id": "5d8f2a61-0c4e-4b7a-9f13-6e2b8c0d4a57",
    "name": "سارة",
    "phone": "962790000000",
    "channel": "whatsapp",
    "stage": "qualified",
    "tags": ["استشارة"],
    "createdAt": "2026-11-02T09:14:37.205Z",
    "lastActiveAt": "2026-11-03T16:40:02.918Z"
  }
}
```

Each field and its possible values are described in [list contacts](https://docs.mujib.ai/en/developers/api-contacts/).

## What does a 404 mean here?

It means your business has no customer with that id, whatever the reason:

```json
{ "error": { "code": "NOT_FOUND", "message": "Contact not found" } }
```

The same error comes back for an id that does not exist, an id that belongs to another business and a malformed id, so the response reveals nothing about anyone else's data. The other errors:

| HTTP | `code` | Why |
| --- | --- | --- |
| 401 | `UNAUTHORIZED` | No key, or a key that is not valid |
| 403 | `FORBIDDEN` | The key lacks `contacts.read` |
| 429 | `RATE_LIMITED` | You went over a rate limit |
| 500 | `INTERNAL` | An unexpected server error |

## Frequently asked questions

### Where do I get a contact's id?

From the id field in the contacts list, or from customer.contactId in a booking.

### Why do I get a 404 for an id I know exists?

Usually because the key belongs to a different business than the one the id came from, or because a character was lost in copying. Both return the same 404.

### Does this request return more fields than the list?

No. It returns the same fields every customer carries in the list.

---

Source: https://docs.mujib.ai/en/developers/api-contact/ · Last updated: 2026-11-04
