# Buckets API

## Get Buckets

<mark style="color:blue;">`GET`</mark> `https://files.freddie.pw/api/bucket`

This endpoint allows you to get free cakes.

#### Headers

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

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

```
[
  {
    "UID": 1,
    "name": "ALAH",
    "owner": "1"
  },
  {
    "UID": 2,
    "name": "Home",
    "owner": "1"
  },
  {
    "UID": 3,
    "name": "Dump",
    "owner": "1"
  }
]
```

{% endtab %}

{% tab title="304 " %}

```
{error: "This API key doesn't have permission to preform this action!"}
```

{% endtab %}
{% endtabs %}

## Create New Bucket

<mark style="color:green;">`POST`</mark> `https://files.freddie.pw/api/bucket`

#### Path Parameters

| Name | Type   | Description                      |
| ---- | ------ | -------------------------------- |
| name | string | Name of the bucket to be created |

#### Headers

| Name           | Type   | Description |
| -------------- | ------ | ----------- |
| Authentication | string |             |

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

```
{"success": true}
```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `https://files.freddie.pw/api/bucket`

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
|      | string |             |

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

```
{"success": true}
```

{% endtab %}
{% endtabs %}

## Delete A Bucket

<mark style="color:red;">`DELETE`</mark> `https://files.freddie.pw/api/bucket`

#### Path Parameters

| Name | Type   | Description                    |
| ---- | ------ | ------------------------------ |
| id   | string | ID of the bucket to be deleted |

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

```
{"success": true}
```

{% endtab %}
{% endtabs %}
