> For the complete documentation index, see [llms.txt](https://docs.gem-suite.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gem-suite.com/api-reference/resources/projects.md).

# Projects

## List all projects

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/projects`

This endpoint allows you to get the list of your projects. \
The projects are returned sorted by creation date.

#### Query Parameters

| Name      | Type    | Description                                                                      |
| --------- | ------- | -------------------------------------------------------------------------------- |
| page      | integer | The number of the page you wish to see. Default is 1.                            |
| per\_page | integer | The number of the desired result per page. Default is 20. Maximum values is 100. |

#### Headers

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| Authentication | string | Bearer token.                 |
| Accept         | string | Should be `application/json`. |

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

```
{
    "data": [
        {
            "id": 73,
            "code": null,
            "client_id": 0,
            "active": 1,
            "nom": "Test Project",
            "description": null,
            "tasks": []
        },
        {
            "id": 72,
            "code": null,
            "client_id": 0,
            "active": 1,
            "nom": "Test Project 2",
            "description": null,
            "tasks": []
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 2
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## Retrieve a project

<mark style="color:blue;">`GET`</mark> `https://app.gem-books.com/api/projects/:id`

This endpoint allows you to get the details of the project.

#### Path Parameters

| Name | Type    | Description                        |
| ---- | ------- | ---------------------------------- |
| id   | integer | The ID of the project to retrieve. |

#### Headers

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| Authentication | string | Bearer token.                 |
| Accept         | string | Should be `application/json`. |

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

```
{
    "data": {
        "id": 73,
        "code": null,
        "client_id": 0,
        "active": 1,
        "nom": "Test Project",
        "description": null,
        "tasks": []
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## Create a project

<mark style="color:green;">`POST`</mark> `https://app.gem-books.com/api/projects`

This endpoint allows you to create a project. \
Returns the created project.

#### Headers

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| Authentication | string | Bearer token.                 |
| Content-Type   | string | Should be `application/json`. |
| Accept         | string | Should be `application/json`. |

#### Request Body

| Name | Type   | Description   |
| ---- | ------ | ------------- |
| name | string | Project name. |

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

```
{
    "data": {
        "id": 73,
        "code": null,
        "client_id": 0,
        "active": 1,
        "nom": "Test Project",
        "description": null,
        "tasks": []
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

```
{
    "name": "Test Project"
}
```

## Update a project

<mark style="color:orange;">`PUT`</mark> `https://app.gem-books.com/api/projects/:id`

This endpoint allows you to update a specific project. \
Returns the updated project.

#### Path Parameters

| Name | Type    | Description          |
| ---- | ------- | -------------------- |
| id   | integer | Project id to update |

#### Headers

| Name           | Type   | Description                   |
| -------------- | ------ | ----------------------------- |
| Authentication | string | Bearer token.                 |
| Content-Type   | string | Should be `application/json`. |
| Accept         | string | Should be `application/json`. |

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

```
{
    "data": {
        "id": 73,
        "code": null,
        "client_id": 0,
        "active": 1,
        "nom": "Test Project",
        "description": null,
        "tasks": []
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

```
{
    "name": "Test Project"
}
```
