> For the complete documentation index, see [llms.txt](https://docs.podkrepi.bg/development/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podkrepi.bg/development/rest-api/endpoints/campaigns.md).

# Campaigns

## Get Campaigns

<mark style="color:blue;">`GET`</mark> `https://api.podkrepi.bg/v1/campaigns`

This endpoint allows you to get campaigns.

#### Headers

| Name           | Type   | Description                                                    |
| -------------- | ------ | -------------------------------------------------------------- |
| Authentication | string | Authentication token to track down who is emptying our stocks. |

{% tabs %}
{% tab title="200 Campaign successfully retrieved." %}

```javascript
[
    {
        "id": "5572f770-a434-4ed8-9a91-d94474d26c8e"
        "name": "Campaign name"
    },
    {
        "id": "97692474-2482-460f-86ec-2b84954f989b"
        "name": "Campaign name"
    }
]
```

{% endtab %}

{% tab title="404 Could not find a campaign matching this query." %}

```javascript
{
    "error": "Not Found"
}
```

{% endtab %}
{% endtabs %}

## Get Campaign by ID

<mark style="color:blue;">`GET`</mark> `https://api.podkrepi.bg/v1/campaigns/:id`

This endpoint allows you to get campaigns.

#### Path Parameters

| Name | Type   | Description                                |
| ---- | ------ | ------------------------------------------ |
| id   | string | ID of the cake to get, for free of course. |

#### Headers

| Name           | Type   | Description                                                    |
| -------------- | ------ | -------------------------------------------------------------- |
| Authentication | string | Authentication token to track down who is emptying our stocks. |

{% tabs %}
{% tab title="200 Campaign successfully retrieved." %}

```javascript
{
    "id": "5572f770-a434-4ed8-9a91-d94474d26c8e"
    "name": "Campaign name"
}
```

{% endtab %}

{% tab title="404 Could not find a campaign matching this query." %}

```javascript
{
    "error": "Not Found"
}
```

{% endtab %}
{% endtabs %}
