# Projects API

## Create Project

<mark style="color:green;">`POST`</mark> `https://integrator.dckap.com/api/projects/create`

To create a new project and for providing access to given users or to specific groups.

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Bearer {access\_token} |

#### Request Body

| Name                 | Type   | Description         |
| -------------------- | ------ | ------------------- |
| project\_name        | string | Project Name        |
| project\_description | string | Project Description |
| users                | array  | User Email ID's     |
| groups               | array  | User Group ID's     |

{% tabs %}
{% tab title="200 Successfull Response" %}

```
{
    "additional_data": {},
    "data": {
        "project_id": "6024f4cc15bea95eea74ef5d"
    },
    "error_code": "",
    "message": "Success",
    "status": 200,
    "success": true
}
```

{% endtab %}

{% tab title="401 Authentication Error" %}

```
{
    "data": null,
    "message": "UserWarning('Suspicious login attempt',)",
    "response_status": 401,
    "status": false,
    "status_code": 401
}
```

{% endtab %}
{% endtabs %}

## Update Project

<mark style="color:green;">`POST`</mark> `https://integrator.dckap.com/api/projects/update/:id`

To modify and update the existing project.&#x20;

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| id   | string | Project ID  |

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Bearer {access\_token} |

#### Request Body

| Name                 | Type   | Description         |
| -------------------- | ------ | ------------------- |
| users                | array  | User Email ID's     |
| groups               | array  | User Group ID's     |
| project\_name        | string | Project Name        |
| project\_description | string | Project Description |

{% tabs %}
{% tab title="200 Successfull Response" %}

```
{
    "additional_data": {},
    "data": {
        "project_id": "6024f4cc15bea95eea74ef5d"
    },
    "error_code": "",
    "message": "Success",
    "status": 200,
    "success": true
}
```

{% endtab %}

{% tab title="401 Authentication Error" %}

```
{
    "data": null,
    "message": "UserWarning('Suspicious login attempt',)",
    "response_status": 401,
    "status": false,
    "status_code": 401
}
```

{% endtab %}
{% endtabs %}

## Update Project Settings

<mark style="color:green;">`POST`</mark> `https://integrator.dckap.com/workspace/:project_id/api/settings/update`

To modify and update the project settings

#### Path Parameters

| Name        | Type   | Description |
| ----------- | ------ | ----------- |
| project\_id | string | Project ID  |

#### Headers

| Name          | Type   | Description            |
| ------------- | ------ | ---------------------- |
| Authorization | string | Bearer {access\_token} |

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

```
{
    "errors": {},
    "status": "success"
}
```

{% endtab %}

{% tab title="401 " %}

```
{
    "data": null,
    "message": "UserWarning('Suspicious login attempt',)",
    "response_status": 401,
    "status": false,
    "status_code": 401
}
```

{% endtab %}
{% endtabs %}

#### Body Parameters

```
{
    "general___timezone: "America/Juneau",
    "activity_logs___activity_logs":false,
    "projects_console___default_console_options":{"api_method":true,"api_request":true,"api_response":false, "api_headers": false, "api_params": false},
    "projects_console___projects_console":false
}
```

To enable project activity logs, provide the key `activity_logs___activity_logs` with value `true` in body parameters and all the other settings can be modified in the same way.

{% hint style="success" %}
Only Project Owner can modify the project settings. Project Administrators are not allowed to modify/update the project settings **through API**.
{% endhint %}
