> For the complete documentation index, see [llms.txt](https://painor.gitbook.io/gramjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://painor.gitbook.io/gramjs/working-with-stickers/stickers.createstickerset.md).

# stickers.createStickerSet

Create a stickerset, bots only.

## Example

{% tabs %}
{% tab title="Javascript" %}

```javascript
const {Api, TelegramClient} = require('telegram');
const {StringSession} = require('telegram/sessions');

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result = await client.invoke(new Api.stickers.createStickerSet({
        masks: true,
        animated: true,
        userId: new Api.InputUser({...}),
        title: 'random string here',
        shortName: 'random string here',
        thumb: new Api.InputDocument({...}),
        stickers: [new Api.InputStickerSetItem({...})],
        }));
    console.log(result); // prints the result
})();
```

{% endtab %}

{% tab title="TypeScript" %}

```typescript
import {Api, TelegramClient} from 'telegram';
import {StringSession} from 'telegram/sessions';

const session = new StringSession('');
const client = new TelegramClient(session, apiId, apiHash, {});

(async function run() {
    const result: Api.messages.StickerSet = await client.invoke(new Api.stickers.createStickerSet({
        masks: true,
        animated: true,
        userId: new Api.InputUser({...}),
        title: 'random string here',
        shortName: 'random string here',
        thumb: new Api.InputDocument({...}),
        stickers: [new Api.InputStickerSetItem({...})],
        }));
    console.log(result); // prints the result
})();
```

{% endtab %}
{% endtabs %}

## TL schema

```
messages.stickerSet#b60a24a6 set:StickerSet packs:Vector<StickerPack> documents:Vector<Document> = messages.StickerSet;
---functions---
stickers.createStickerSet#f1036780 flags:# masks:flags.0?true animated:flags.1?true user_id:InputUser title:string short_name:string thumb:flags.2?InputDocument stickers:Vector<InputStickerSetItem> = messages.StickerSet;
```

## Parameters

|       Name      | Type                                                                                                                                         | Description                                                                                                                                          |
| :-------------: | -------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
|    **flags**    | [#](https://core.telegram.org/type/%23)                                                                                                      | Flags, see [TL conditional fields](https://core.telegram.org/mtproto/TL-combinators#conditional-fields)                                              |
|    **masks**    | [flags](https://core.telegram.org/mtproto/TL-combinators#conditional-fields).0?[true](https://core.telegram.org/constructor/true)            | Whether this is a mask stickerset                                                                                                                    |
|   **animated**  | [flags](https://core.telegram.org/mtproto/TL-combinators#conditional-fields).1?[true](https://core.telegram.org/constructor/true)            | Whether this is an animated stickerset                                                                                                               |
|   **user\_id**  | [InputUser](https://core.telegram.org/type/InputUser)                                                                                        | Stickerset owner                                                                                                                                     |
|    **title**    | [string](https://core.telegram.org/type/string)                                                                                              | Stickerset name, 1-64 chars                                                                                                                          |
| **short\_name** | [string](https://core.telegram.org/type/string)                                                                                              | Sticker set name. Can contain only English letters, digits and underscores. Must end with *"*&#x62;&#x79;*"* ( is case insensitive); 1-64 characters |
|    **thumb**    | [flags](https://core.telegram.org/mtproto/TL-combinators#conditional-fields).2?[InputDocument](https://core.telegram.org/type/InputDocument) | Thumbnail                                                                                                                                            |
|   **stickers**  | [Vector](https://core.telegram.org/type/Vector%20t) < [InputStickerSetItem](https://core.telegram.org/type/InputStickerSetItem) >            | Stickers                                                                                                                                             |

## Result

[messages.StickerSet](https://core.telegram.org/type/messages.StickerSet)

## Possible errors

| Code | Type                        | Description                                           |
| :--: | --------------------------- | ----------------------------------------------------- |
|  400 | BOT\_MISSING                | This method can only be run by a bot                  |
|  400 | PACK\_SHORT\_NAME\_INVALID  | Short pack name invalid                               |
|  400 | PACK\_SHORT\_NAME\_OCCUPIED | A stickerpack with this name already exists           |
|  400 | PACK\_TITLE\_INVALID        | The stickerpack title is invalid                      |
|  400 | PEER\_ID\_INVALID           | The provided peer id is invalid                       |
|  400 | SHORTNAME\_OCCUPY\_FAILED   | An internal error occurred                            |
|  400 | STICKERS\_EMPTY             | No sticker provided                                   |
|  400 | STICKER\_EMOJI\_INVALID     | Sticker emoji invalid                                 |
|  400 | STICKER\_FILE\_INVALID      | Sticker file invalid                                  |
|  400 | STICKER\_PNG\_DIMENSIONS    | Sticker png dimensions invalid                        |
|  400 | STICKER\_PNG\_NOPNG         | One of the specified stickers is not a valid PNG file |
|  400 | USER\_ID\_INVALID           | The provided user ID is invalid                       |

## Can bots use this methd ?

### yes

## Related pages


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://painor.gitbook.io/gramjs/working-with-stickers/stickers.createstickerset.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.
