# Endpoints

### Endpoints

#### 1) Generate a token

**GET** `/generate?key=<api-key>[&info=true]`\
Parameters in brackets are optional.

Returns a fresh alt token you can use to log in. Works only for plans with API access.

**Sample request**

```http
https://api.thealtening.com/v2/generate?key=<api-key>
```

**With extra info**

```http
https://api.thealtening.com/v2/generate?key=<api-key>&info=true
```

**Response**

```json
{
  "token": "example@alt.com",         // Alt token
  "password": "anything",             // Any password works; provided for convenience
  "username": "Examp**",              // Last two characters hidden
  "limit": false,                     // True if daily limit reached (100+ alts/24h, see plan)
  "skin": "555...",                   // Use with CDN to fetch skin images
  "info": {                           // Included only if info=true (object may be empty)
    "hypixel.lvl": "10",
    "hypixel.rank": "MVP",
    "mineplex.lvl": "10",
    "mineplex.rank": "LEGEND",
    "labymod.cape": "true",
    "5zig.cape": "true"
  }
}
```

**Skin CDN helper**

```http
https://cdn.thealtening.com/skins/body/<skin>.png
```

***

#### 2) Check license

**GET** `/license?key=<api-key>`

Use this to validate an API key and read its plan and expiry.

**Sample request**

```http
https://api.thealtening.com/v2/license?key=<api-key>
```

**Response**

```json
{
  "username": "OnlyQubes",        // Owner of the API key
  "hasLicense": true,             // Active license
  "licenseType": "premium",       // e.g. "premium", "basic", "starter"
  "expires": "2020-08-05T00:00:00"
}
```

***

#### 3) Inspect a token

**GET** `/info?key=<api-key>&token=<alt-token>`

Check if a specific alt token is valid and when it expires.

**Sample request**

```http
https://api.thealtening.com/v2/info?key=<api-key>&token=<alt-token>
```

**Response**

```json
{
  "expires": "2020-08-05T00:00:00",
  "skin": "555...",               // Use with the CDN to fetch skin images
  "username": "Examp**"          // Last two characters hidden
}
```

***

#### 4) Favorite a token (Premium only)

**GET** `/favorite?key=<api-key>&token=<alt-token>`

Marks the provided token as a favorite. The token must belong to your account and must not be expired. Requires a **Premium** license. Non-eligible requests return `403 Forbidden`. Send the request again as a toggle to undo it.

**Response**

```json
{ "success": true }
```

***

#### 5) List favorites (Premium only)

**GET** `/favorites?key=<api-key>`

Returns an array of your favorited tokens. Each item follows the same shape as **Generate** responses.

**Response**

```json
[
  {
    "token": "example@alt.com",
    "password": "anything",
    "username": "Examp**",
    "limit": false,
    "skin": "555cbe24c15f4793b70239935dde21f6",
    "info": {
      "hypixel.lvl": "10",
      "..."
    }
  },
  {
    "token": "example2@alt.com",
    "password": "anything",
    "username": "Exampl**",
    "limit": false,
    "skin": "555cbe24c15f4793b70239935dde21f6",
    "info": {
      "mineplex.rank": "LEGEND",
      "..."
    }
  }
]
```

***

#### 6) Private a token (Premium only)

**GET** `/private?key=<api-key>&token=<alt-token>`

Marks the provided token as private. The token must belong to your account and must not be expired. Requires a **Premium** license. Send the request again as a toggle to undo it.

**Response**

```json
{ "success": true }
```

***

#### 7) List privates (Premium only)

**GET** `/privates?key=<api-key>`

Returns an array of your private tokens. Each item follows the same shape as **Generate** responses.

**Response**

```json
[
  {
    "token": "example@alt.com",
    "password": "anything",
    "username": "Examp**",
    "limit": false,
    "skin": "555...",
    "info": {
      "hypixel.lvl": "10",
      "..."
    }
  },
  {
    "token": "example2@alt.com",
    "password": "anything",
    "username": "Exampl**",
    "limit": false,
    "skin": "666...",
    "info": {
      "mineplex.rank": "LEGEND",
      "..."
    }
  }
]
```


---

# 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://support.thealtening.com/api-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.
