> For the complete documentation index, see [llms.txt](https://eshop.gitbook.io/eshopbox-developers/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eshop.gitbook.io/eshopbox-developers/setting/contacts/create-a-contact.md).

# Create a Contact

## Create a contact

<mark style="color:green;">`POST`</mark> `https://{{workspace}}.myeshopbox.com/api/v1/contact`

This endpoint is required to create a contact in the workspace.

#### Path Parameters

| Name          | Type   | Description                                    |
| ------------- | ------ | ---------------------------------------------- |
| Authorization | string | The Bearer token allows to grant access to API |

#### Request Body

| Name        | Type   | Description                                   |
| ----------- | ------ | --------------------------------------------- |
| contactType | string | Type of contact.                              |
| networkKey  | string | Network key of a workspace.                   |
| email       | string | Registered email of the contact               |
| phoneNumber | string | Registered phone number of contact            |
| status      | string | status of warehouse                           |
| pincode     | string | pin code of the area from where party belongs |
| contactCode | string | Unique reference id of contact                |
| contactName | string | Name of contact                               |
| gstin       | string | Registered GSTIN number of state              |
| addressLine | string | The registered address of the contact         |
| city        | string | Registered city of contact                    |
| state       | string | Registered state of contact                   |
| country     | string | Registered country of contact                 |

{% tabs %}
{% tab title="200 Contact successfully created" %}

```
{
 "accountSlug": "raymond",
 "contactName": "MONTE CARLO FASHIONS LTD.UNIT-6",
 "contactCode": "PW52",
 "networkKey": "montecarlo",
 "contactType": "vendor",
 "gstin": "06AADCB2230M1ZX",
 "address":{
 "addressLine1": "Khasra no 5/16/2,17, Near Subash Chowk, Sohana Road Village Behrampur",
 "city": "gurgaon",
 "state": "HARYANA",
 "pincode": "122018",
 "country": "India"
 },
 "contact":{
 "phoneNumber": "87564435",
 "email":"montecarlo.eshop@gmail.com"
 },
 "status":"active"
 "customField": [
                {
                    "label": "occassion",
                    "internalName": "occassion",
                    "value": [
                        "eid",
                        "holi",
                        "classy"
                    ]
                },
                {
                    "label": "batch",
                    "internalName": "batch",
                    "value": [
                        "currency"
                    ]
                }
            ],
     "createdAt": "2020-03-19T15:24:12.000Z",
     "updatedAt": "2020-03-19T15:24:12.000Z"
 
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST https://{{workspace}}.myeshopbox.com/api/v1/contact\
     -H "Authorization: Bearer XXXX" \
     -H "Content-Type: application/json" \
     -d $'{
      "data": {
      "contactName": "MONTE CARLO FASHIONS LTD.UNIT-6",
      "contactCode": "PW52",
      "contactType": "vendor",
      "networkKey": "montecarlo",
      "address":{
      "addressLine": "Khasra no 5/16/2,17, Near Subash Chowk, Sohana Road Village Behrampur",
      "city": "gurgaon",
      "pincode": "122018",
      "state": "HARYANA",
      "country": "India"
      },
      "gstin": "06AADCB2230M1ZX",
      "contact":{
      "phoneNumber": "87564435",
      "email":"montecarlo.eshop@gmail.com"
      },
      "customField": [
                {
                    "label": "occassion",
                    "internalName": "occassion",
                    "value": [
                        "eid",
                        "holi",
                        "classy"
                    ]
                },
                {
                    "label": "batch",
                    "internalName": "batch",
                    "value": [
                        "currency"
                    ]
                }
            ]
     
        }
    
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://eshop.gitbook.io/eshopbox-developers/setting/contacts/create-a-contact.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
