---
description: https://catpalm.net/api/icon/
---

# Icon

{% hint style="info" %}
The icon displayed on the comet map.
{% endhint %}

<details>

<summary>Icon Type List</summary>

`white`\
`orange`\
`magenta`\
`light_blue`\
`yellow`\
`lime`\
`pink`\
`gray`\
`light_gray`\
`cyan`\
`purple`\
`blue`\
`brown`\
`green`\
`red`\
`black`

</details>

## Get list of icons

<mark style="color:blue;">`GET`</mark> `https://catpalm.net/api/icon/`

_Requires `icon_get` permission_

#### Headers

| Name                                            | Type | Description        |
| ----------------------------------------------- | ---- | ------------------ |
| Authorization<mark style="color:red;">\*</mark> | str  | [License](license) |

{% tabs %}
{% tab title="200: OK List of Icons" %}
```json
{
    "icons": [
        {
            "world": 1,
            "x": 0,
            "z": -1,
            "type": "black",
            "name": "TEST!!!!",
            "visible": true,
            "time": 1673849800000
        }
    ]
}
```
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Players need to wait up to 5 seconds after in-game changes before updating.
{% endhint %}

## Add icons

<mark style="color:orange;">`PUT`</mark> `https://catpalm.net/api/icon/`

_Speed limit 0.5 sec/time_\
_Requires `icon_put` permission_

#### Headers

| Name                                            | Type | Description        |
| ----------------------------------------------- | ---- | ------------------ |
| Content-Type<mark style="color:red;">\*</mark>  | str  | `application/json` |
| Authorization<mark style="color:red;">\*</mark> | str  | [License](license) |

#### Request Body

| Name                                      | Type | Description                  |
| ----------------------------------------- | ---- | ---------------------------- |
| world<mark style="color:red;">\*</mark>   | int  |                              |
| x<mark style="color:red;">\*</mark>       | int  | _Between +-30050_            |
| z<mark style="color:red;">\*</mark>       | int  | _Between +-30050_            |
| type<mark style="color:red;">\*</mark>    | enum | [Icon Type](#icon-type-list) |
| name<mark style="color:red;">\*</mark>    | str  | Within 32 words              |
| visible<mark style="color:red;">\*</mark> | bool |                              |

{% tabs %}
{% tab title="200: OK Join successfully" %}

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Up to 45 icons, no error will be returned if more are added.
{% endhint %}

{% hint style="danger" %}
Only when the player is online will the icon officially start to take effect.
{% endhint %}

