> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/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.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the contact.
</ParamField>

### Body Parameters

<ParamField body="segmentId" type="string" required>
  The ID of the segment to add the contact to.
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="contactId" type="string">The contact ID.</ResponseField>
  <ResponseField name="segmentId" type="string">The segment ID.</ResponseField>
  <ResponseField name="status" type="string">Operation status (`added`).</ResponseField>
</ResponseField>

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

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


## Related topics

- [List Segment Contacts](/api/segments/list-segment-contacts.md)
- [Delete Contact Segment](/api/contacts/delete-contact-segment.md)
- [List Contact Segments](/api/contacts/list-contact-segments.md)
- [Segments](/audience/segments.md)
- [Create Segment](/api/segments/create-segment.md)
