---
# @generated by sylphx-gen. Do not edit.
title: "Upsert a chat sticker pack"
description: "`events.chat_sticker_packs.upsert` (POST /v1/{name}:upsert): Publishes the trusted backend's complete sticker pack catalog."
type: reference
product: queues
summary: "Publishes the trusted backend's complete sticker pack catalog."
updated: 2026-09-28
nav: false
---

Publishes the trusted backend's complete sticker pack catalog.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/chat_sticker_packs/chat-sticker-pack:upsert`
- **Scope** `events:chat:admin`
- **Effect** `write` — a successful call changes state.
- **Collection** [chat_sticker_packs](/docs/api/chat_sticker_packs)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Pack resource name. Required. |
| `display_name` | `string` | Display name. Required. |
| `assets` | `ChatStickerAsset[]` | Complete catalog, one to 256 distinct assets. All pack_ids must match name. Required. |

### ChatStickerAsset

| Field | Type | What it is |
| --- | --- | --- |
| `sticker` | `ChatSticker` | Immutable content identity and delivery location. Required. |
| `label` | `string` | Accessible human-readable asset label, at most 200 bytes. Required. |

### ChatSticker

| Field | Type | What it is |
| --- | --- | --- |
| `pack_id` | `string` | Catalog pack identifier; the complete Money feature key is at most 64 bytes. Required. |
| `sticker_id` | `string` | Identifier inside the pack. Required. |
| `content_uri` | `string` | Optional on send; if supplied must match the catalog. Output is authoritative. |
| `sha256` | `string` | Optional on send; exact lowercase SHA-256 from the catalog. |
| `mime_type` | `string` | Optional on send; exact catalog image MIME type. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | Resource name; last segment is the pack_id in the Money feature key. |
| `uid` | `string` | Stable identifier. Output only. |
| `meta` | `ResourceMeta` | Resource metadata. |
| `display_name` | `string` | Display name, at most 200 bytes. Output only. |
| `assets` | `ChatStickerAsset[]` | Catalog assets in sticker-id order. Output only. |
| `revision` | `int64` | Monotonic revision; serialized as a decimal string. Output only. |

### ResourceMeta

| Field | Type | What it is |
| --- | --- | --- |
| `generation` | `int64` | Increases by one on every change to `spec`. Output only. |
| `etag` | `string` | Strong ETag (AIP-154): changes on any change to spec, status, or metadata. Send it back as `If-Match` or `etag` to make Update and Delete conditional; a mismatch fails with ABORTED / 409 `ETAG_MISMATCH`. Output only. |
| `create_time` | `timestamp` | When the Resource was created. Output only. |
| `update_time` | `timestamp` | When the Resource last changed. Output only. |
| `delete_time` | `timestamp` | Set while the Resource is being deleted. Output only. |
| `labels` | `map<string, string>` | Caller-writable, indexed labels (AIP-122 label rules). |
| `annotations` | `map<string, string>` | Caller-writable, unindexed annotations. |
| `display_name` | `string` | Caller-writable human-readable name. |
| `creator` | `string` | The principal that created the Resource. Output only. |

### ChatStickerAsset

| Field | Type | What it is |
| --- | --- | --- |
| `sticker` | `ChatSticker` | Immutable content identity and delivery location. Required. |
| `label` | `string` | Accessible human-readable asset label, at most 200 bytes. Required. |

### ChatSticker

| Field | Type | What it is |
| --- | --- | --- |
| `pack_id` | `string` | Catalog pack identifier; the complete Money feature key is at most 64 bytes. Required. |
| `sticker_id` | `string` | Identifier inside the pack. Required. |
| `content_uri` | `string` | Optional on send; if supplied must match the catalog. Output is authoritative. |
| `sha256` | `string` | Optional on send; exact lowercase SHA-256 from the catalog. |
| `mime_type` | `string` | Optional on send; exact catalog image MIME type. |

## Errors

- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/envs/production/chat_sticker_packs/chat-sticker-pack:upsert" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"assets":[{"label":"…","sticker":{"pack_id":"…","sticker_id":"…"}}],"display_name":"…"}'
```

**TypeScript**

```ts
const response = await sylphx.events.chatStickerPacks.upsert({ assets: [{ label: '…', sticker: { packId: '…', stickerId: '…' } }], displayName: '…', name: 'orgs/acme/projects/shop/envs/production/chat_sticker_packs/chat-sticker-pack' })
```

**Rust**

```rust
let mut req = sylphx::events::UpsertChatStickerPackRequest::default();
req.assets = vec![Default::default()];
req.display_name = "…".to_string();
req.name = "orgs/acme/projects/shop/envs/production/chat_sticker_packs/chat-sticker-pack".to_string();
let response = sx.events().chat_sticker_packs().upsert(req).await?;
```

**CLI**

```bash
sylphx events chat-sticker-packs upsert orgs/acme/projects/shop/envs/production/chat_sticker_packs/chat-sticker-pack
```

**MCP**

```json
{ "method_id": "events.chat_sticker_packs.upsert", "args": {"assets":[{"label":"…","sticker":{"pack_id":"…","sticker_id":"…"}}],"display_name":"…","name":"orgs/acme/projects/shop/envs/production/chat_sticker_packs/chat-sticker-pack"} }
```
