# Endpoints

{% hint style="info" %}
There's a insomnia.json file containing all endpoints inside the github repo.

This simplifies testing and shows example request bodies.
{% endhint %}

## Guide for contacting the API.

* Authorization works using a permanent API-key or session cookies generated when logging in.
* Endpoints accept **form** content-types only.
* JSON Output looks like this:&#x20;
  * `{"status": "error|success", "message": "the endpoint message"}`
* Status Codes:
  * 20\* is used if the operations was a success
  * 30\* to redirect to the frontend pages
  * 40\* for client-side errors (ex: failing parameters)
  * 50\* errors from the server side (ex: listener couldn't be started)


---

# 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://screamz2k.gitbook.io/phoenixc2/developer-reference/endpoints.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.
