# 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: 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://eshop.gitbook.io/eshopbox-developers/setting/contacts/create-a-contact.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.
