> For the complete documentation index, see [llms.txt](https://edrus.gitbook.io/appgregator-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://edrus.gitbook.io/appgregator-api-docs/appgregators/accounting/jurnal.id-final-version/api/contacts/create-contact-group.md).

# Create Contact Group

<mark style="color:green;">`POST`</mark> `https://us-central1-appgregator.cloudfunctions.net/jurnalID/contacts/contact_groups/`

#### Query Parameters

| Name                                               | Type   | Description             |
| -------------------------------------------------- | ------ | ----------------------- |
| name<mark style="color:red;">\*</mark>             | String | ft-4                    |
| connection\_name<mark style="color:red;">\*</mark> | String | intrapreneur-jurnalid-1 |

#### Headers

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| x-api-key<mark style="color:red;">\*</mark> | String | U2Fsd...    |

{% tabs %}
{% tab title="201: Created Success" %}

```javascript
{
    "contact_group": {
        "id": 81589,
        "name": "QC",
        "company_id": 473256,
        "contact_group_role": 1,
        "deleted_at": null,
        "created_at": "2022-08-10T07:03:37.675Z",
        "updated_at": "2022-08-10T07:03:37.675Z",
        "custom_id": null
    }
}
```

{% endtab %}
{% endtabs %}

<details>

<summary>Body JSON</summary>

```
{
  "contact_group": {
    "name": "QC",
    "company_id": 473256,
    "contact_group_role": 1
  }
}
```

</details>

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

```shell
curl --location --request POST 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/contacts/contact_groups?name=ft-4&connection_name=intrapreneur-jurnalid-1' \
--header 'x-api-key: U2Fsd...' \
--header 'Content-Type: application/json' \
--data-raw '{
  "contact_group": {
    "name": "QC",
    "company_id": 473256,
    "contact_group_role": 1
  }
}'
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "contact_group": {
    "name": "QC",
    "company_id": 473256,
    "contact_group_role": 1
  }
});

var config = {
  method: 'post',
  url: 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/contacts/contact_groups?name=ft-4&connection_name=intrapreneur-jurnalid-1',
  headers: { 
    'x-api-key': 'U2Fsd...', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://us-central1-appgregator.cloudfunctions.net/jurnalID/contacts/contact_groups?name=ft-4&connection_name=intrapreneur-jurnalid-1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
  "contact_group": {
    "name": "QC",
    "company_id": 473256,
    "contact_group_role": 1
  }
}',
  CURLOPT_HTTPHEADER => array(
    'x-api-key: U2Fsd...',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}
{% endtabs %}
