# API Key

{% hint style="warning" %}
**Important:** Only Elite Plan users have access to API keys. Ensure the key is kept private and only used in authorized games.
{% endhint %}

### **Endpoint URL**

```
POST https://api.panora.cc/v1/apikey
```

***

### **Headers**

| Header        | Value                   | Required |
| ------------- | ----------------------- | -------- |
| Authorization | `Bearer <YOUR_API_KEY>` | ✅ Yes    |
| Content-Type  | `application/json`      | ✅ Yes    |

***

### **Request Body**

The request body must be a JSON object containing:

| Field   | Type   | Description                                            |
| ------- | ------ | ------------------------------------------------------ |
| placeid | number | The Roblox **Place ID** of the game you want to verify |

**Example Request Body:**

```json
{
  "placeid": 12345678
}
```

***

### **Example Usage in Roblox Lua**

```lua
local HttpService = game:GetService("HttpService")

local requestBody = {
    placeid = game.PlaceId
}

local success, response = pcall(function()
    return HttpService:RequestAsync({
        Url = "https://api.panora.cc/v1/apikey",
        Method = "POST",
        Headers = {
            ["Authorization"] = "Bearer APIKEY",
            ["Content-Type"] = "application/json"
        },
        Body = HttpService:JSONEncode(requestBody)
    })
end)

if success then
    print("Workspace ID returned:", response.Body)
else
    warn("API Key verification failed:", response)
end
```

> 🔐 **Tip:** Replace `"APIKEY"` with your Elite Plan API key. Only whitelisted games will return a valid workspace ID.

***

### **Response**

#### **Success – 200 OK**

Returns the workspace ID associated with the API key if the key is valid and the game is whitelisted:

```json
"12345"
```

#### **Errors**

<table><thead><tr><th width="151">Status Code</th><th>Reason</th><th>Description</th></tr></thead><tbody><tr><td>400</td><td>Missing placeid</td><td>The request did not include <code>placeid</code>.</td></tr><tr><td>401</td><td>Missing or invalid Authorization header</td><td>The API key is missing or malformed.</td></tr><tr><td>401</td><td>Invalid API Key</td><td>The provided API key does not match any Elite workspace.</td></tr><tr><td>403</td><td>Place not whitelisted</td><td>The game (Place ID) is not whitelisted for this API key.</td></tr><tr><td>500</td><td>Internal Server Error</td><td>Unexpected server-side error.</td></tr></tbody></table>

***

### **Notes**

* The API key must be from an active **Elite Plan** workspace.
* The game’s Place ID must be whitelisted and active.
* Use this endpoint to confirm integration before triggering rank changes, applications, or other API features.


---

# 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.panora.cc/api/endpoints/apikey.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.
