# /advanced

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

{% hint style="danger" %}
This endpoint is locked to Alpha testers for bug fixing.

> 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>)

### 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:red;">**Required**</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>)

### Examples:

{% 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",
      "headers": {
        "apikey":"<YOUR-API-KEY>"
      },
      "body": {"text": "This message was encoded using BDFDDataAPI"},
      "method": "POST"
    },
    {
      "endpoint": "/release/user",
      "headers": {
        "apikey":"<YOUR-API-KEY>",
        "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",
  "headers": {
"apikey":"<YOUR-API-KEY>"
},
    "body": {"text": "test"},
    "method": "POST"
  },
  {
  "endpoint": "/release/user",
  "headers": {
"apikey":"<YOUR-API-KEY>",
    "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": [{
        "request": {
            "endpoint": "/release/encode",
            "headers": {
                "apikey": "<YOUR-API-KEY>"
            },
            "body": {
                "text": "test"
            },
            "method": "post"
        },
        "response": "l%0a7o7I%ll%0a22o22U%ll%0a8o8U%ll%0a7o7I%l"
    }, {
        "request": {
            "endpoint": "/release/user",
            "headers": {
                "apikey": "<YOUR-API-KEY>",
                "user-id": "672215920558604332"
            },
            "method": "get"
        },
        "response": {
            "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: 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.
