# 7. API get segment

URL: <https://apiring.antbuddy.com/segments/set-contact>

Method: POST

Content-Type: application/json Limit 100 contacts per request

Body: { contacts: \[{customer data A}, {customer data B}], segmentId: “CRM segment id”

}

| **Parameters**    | **Type** | **Required** | **Explain**                                                                                                                                                                                                                          |
| ----------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| name              | string   | AND          | Customer name                                                                                                                                                                                                                        |
| customerIdApiRing | string   | N            | Customer's code                                                                                                                                                                                                                      |
| type              | string   |              | <p>Customer Type. (0: contact, 1: account). Default is</p><p>0</p>                                                                                                                                                                   |
| contactType       | string   |              | “lead" or “customer". Default is lead                                                                                                                                                                                                |
| dateOfBirth       | string   |              | Date of birth. (“March 15, 2000”)                                                                                                                                                                                                    |
| gender            | string   |              | Sex. (0: Male, 1: Female, 2: Other). Default is 2                                                                                                                                                                                    |
| dateOfBirth       | string   |              | Date of birth. (“March 15, 2000”)                                                                                                                                                                                                    |
| gender            | string   |              | Sex. (0: Male, 1: Female, 2: Other). Default is 2                                                                                                                                                                                    |
| addresses         | array    |              | <p>Customer address.</p><p>\[{ city: "Ho Chi Minh City", state: "Tan Binh District", street: "319", (house number) streetName: "Nguyen Kiem", wards: "Ward 12",</p><p>"country": {</p><p>"code": "VN",</p><p>"name": "Vietnam" }</p> |
|                   |          |              | <p>}]</p><p>Record the same as the address on the system.</p>                                                                                                                                                                        |
| phone             | array    |              | <p>Phone number.</p><p>\[{type:”Work”, value: “01223223”} ]</p>                                                                                                                                                                      |
| emails            | array    |              | <p>Phone number.</p><p>\[{type:”Work”, value: “01223223”} ]</p>                                                                                                                                                                      |
| industry          | string   |              | Industry (“Real Estate”)                                                                                                                                                                                                             |
| in the            | array    |              | <p>Social network.</p><p>\[{protocol: “Facebook”, “value”: “<https://abc.com”>}]</p>                                                                                                                                                 |
| bgInfo            | string   |              | Note. (“VIP Customer”)                                                                                                                                                                                                               |
| stage             | string   |              | Status. ("A new customer")                                                                                                                                                                                                           |
| tags              | string   |              | <p>Label.</p><p>\[ “Not yet contacted”, “Contacted” ]</p>                                                                                                                                                                            |
| sourceContact     | string   |              | Contact source. ("Advertisement")                                                                                                                                                                                                    |
| responsibleStaff  | string   |              | Email of the person in charge. (“<nhanvien1@gmail.com>”)                                                                                                                                                                             |
| cusFields         | array    |              | <p>Custom fields on AntCRM.</p><p>\[</p><p>{ name: "Shipping unit", value: “Fast delivery”</p><p>}</p><p>]</p>                                                                                                                       |

Results returned:

HTTP Response Code: 200

Response: Ok


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.antbuddy.com/huong-dan-tich-hop-api-team-technical-api-integration-guide-technical-team/antcrm/7.-api-get-segment.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
