> 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/agenda/workflows.md).

# Workflows

## List all agenda workflows

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

This endpoint allows you to get the list of your workflows. \
The workflows are returned sorted by most recent number.

#### Headers

| Name                                               | Type   | Description                  |
| -------------------------------------------------- | ------ | ---------------------------- |
| Authentification<mark style="color:red;">\*</mark> | string | Bearer Token                 |
| Accept                                             | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 2,
            "name": "Conflict",
            "order": 1,
            "color": "#000000",
            "background_color": "#ff0000"
        },
        {
            "id": 1,
            "name": "Not available",
            "order": 0,
            "color": "#000000",
            "background_color": "#cccccc"
        }
    ],
    "meta": {
        "current_page": 1,
        "last_page": 1,
        "per_page": 25,
        "total": 2
    },
    "success": true
}
```

{% endtab %}
{% endtabs %}

## List a specific agenda workflow

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

This endpoint allows you to get one specific workflow.&#x20;

#### Headers

| Name                                               | Type   | Description                  |
| -------------------------------------------------- | ------ | ---------------------------- |
| Authentification<mark style="color:red;">\*</mark> | string | Bearer Token                 |
| Accept                                             | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 1,
            "name": "Not available",
            "order": 0,
            "color": "#000000",
            "background_color": "#cccccc"
        }
    ],
    "success": true
}
```

{% endtab %}
{% endtabs %}

## Create an agenda workflow

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

#### Headers

| Name             | Type   | Description                  |
| ---------------- | ------ | ---------------------------- |
| Authentification | string | Bearer Token                 |
| Accept           | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 1,
            "name": "Not available",
            "order": 0,
            "color": "#000000",
            "background_color": "#cccccc"
        }
    ],
    "success": true
}
```

{% endtab %}
{% endtabs %}

#### Body Example

```json
{
    "name": "Not available",
    "order": 0,
    "color": "#000000",
    "background_color": "#cccccc"
}
```

## Update a workflow

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

#### Headers

| Name             | Type   | Description                  |
| ---------------- | ------ | ---------------------------- |
| Authentification | string | Bearer Token                 |
| Accept           | string | Should be `application/json` |

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

```json
{
    "data": [
        {
            "id": 1,
            "name": "Not available",
            "order": 0,
            "color": "#000000",
            "background_color": "#cccccc"
        }
    ],
    "success": true
}
```

{% endtab %}
{% endtabs %}

#### Body Example

```json
{
    "name": "Not available",
    "order": 0,
    "color": "#000000",
    "background_color": "#cccccc"
}
```
