> For the complete documentation index, see [llms.txt](https://dadocs.rickyjs.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dadocs.rickyjs.xyz/endpoints/advanced.md).

# /advanced

{% hint style="info" %}
This endpoint will require a POST request.&#x20;
{% endhint %}

{% hint style="danger" %}
This endpoint is only on the **BETA Version** of the API and may be unstable.

> Please report any & all bugs to the [Support Server](https://discord.com/invite/9s65BZDrbV)
> {% endhint %}

### Endpoint Headers:

* apikey - Your Api Auth Key <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* bot-token - Token of the Bot <mark style="color:orange;">**\[String]**</mark> (<mark style="color:green;">**Optional**</mark>)

### Endpoint Body Parameters

* requests - All the requests to complete <mark style="color:orange;">**\[Array of Objects]**</mark> (<mark style="color:red;">**Required**</mark>)&#x20;

### Request Object

* endpoint - Endpoint to request <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)
* headers - Headers to send <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:green;">**Optional**</mark>)
* body - Body parameters to send <mark style="color:orange;">**\[Object]**</mark> (<mark style="color:green;">**Optional**</mark>)
* method - Method to use in request <mark style="color:orange;">**\[String]**</mark> (<mark style="color:red;">**Required**</mark>)

{% hint style="info" %}
You do not need to resupply the `apikey` or `bot-token` on every request. Only add those headers to the initial request (this endpoint) and it will automatically resupply to each subsequential request. \
\
The bot token **is not required**, this was added for convience if you are requesting multiple endpoints that do require a token.
{% endhint %}

{% hint style="info" %}
Data API version required. Must replace `<version>` with either **release** or **beta**.
{% endhint %}

<details>

<summary>Bot Designer for Discord</summary>

Example usage of `/advanced` endpoint using BDFD

```bash
$httpAddHeader[apikey;<YOUR-API-KEY>]
$httpPost[https://bdfddata.rickyjs.xyz/<version>/advanced;{
  "requests": [
    {
      "endpoint": "/release/encode",
      "body": {"text": "This message was encoded using BDFDDataAPI"},
      "method": "POST"
    },
    {
      "endpoint": "/release/user",
      "headers": {
        "user-id": "672215920558604332"
      },
      "method": "GET"   
    }
  ]
}]

$httpResult OR $httpResult[details]
```

</details>

<details>

<summary>Discord.js</summary>

Example usage of `/advanced` endpoint using Discord.js

```javascript
const axios = require('axios');
(async () => {
return await axios.post('https://bdfddata.rickyjs.xyz/<version>/advanced', 
{
  "requests": [
  {
  "endpoint": "/release/encode",
    "body": {
    "text": "test"
    },
    "method": "POST"
  },
  {
  "endpoint": "/release/user",
  "headers": {
    "user-id": "672215920558604332"
    },
    "method": "GET"
}
]}, { 
headers: {
'apikey': <YOUR-API-KEY>,
}
}).then(res=>res.data)
})()
```

</details>

### Possible Responses (Codes)

<details>

<summary>Code 200 </summary>

API succeeded and details were fetched.

```javascript
{
    "status": 200,
    "details": [
     "l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l", 
     {
            "id": "672215920558604332",
            "username": "ricky.js",
            "avatar": "https://cdn.discordapp.com/avatars/672215920558604332/a_ad6aaf5ba45a62c73b9cf9f82f382206.gif",
            "discriminator": "0",
            "public_flags": ["HypeSquadOnlineHouse3", "ActiveDeveloper", "NitroSubscriber"],
            "premium_type": 2,
            "flags": 4194560,
            "banner": "https://cdn.discordapp.com/banners/672215920558604332/a_734707b0151143a8801f2767e1a23ecb.gif",
            "accent_color": 4879576,
            "global_name": "Ricky",
            "avatar_decoration_data": null,
            "banner_color": "4a74d8"
        }
    ]
}
```

</details>

<details>

<summary>Code 400</summary>

An error occurred that stopped execution.

```javascript
{
    status: 400
    error: 'Cannot read ...  (This can vary)'
}
```

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://dadocs.rickyjs.xyz/endpoints/advanced.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.
