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

# Add Contact to Segment

> Add a contact to a manual or static segment.

Assigns the specified contact to one or more segments via the Mailofly API.

### Path Parameters

**id** `string` *required*

The unique identifier of the contact.

### Body Parameters

**segmentId** `string` *required*

The ID of the segment to add the contact to.

### Response

**data** `object`

**contactId** `string`

The contact ID.

**segmentId** `string`

The segment ID.

**status** `string`

Operation status (`added`).

```bash cURL theme={null}
curl -X POST https://api.mailofly.com/contacts/cnt_123/segments \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "segmentId": "seg_vip_customers"
  }'
```

```json 200 OK theme={null}
{
  "data": {
    "contactId": "cnt_123",
    "segmentId": "seg_vip_customers",
    "status": "added"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.