# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.freddie.pw/master.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
