Custom emoji management

Upload a custom emoji

POST /workspaces/{wid}/emojis/upload

Requires authentication.

Upload a custom emoji image for the workspace. Accepts PNG, GIF, or WebP. The emoji name must be unique within the workspace and use only lowercase letters, numbers, and underscores.

Parameters

Name In Type Description
wid path string -

Request body

Content type: multipart/form-data

Field Type Required Description
file file yes -
name string yes -

Responses

200 Emoji uploaded

{
  "emoji": {
    "id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
    "workspace_id": "01JQ3KMP2RQHYJ5ZV8NMWCX4ET",
    "name": "general",
    "created_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
    "content_type": "application/pdf",
    "size_bytes": 1048576,
    "url": "/files/01JQ3KMT6B/download?sig=abc",
    "created_at": "2025-01-15T09:30:00Z"
  }
}

400 Bad request

{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid request parameters"
  }
}

401 Unauthorized

{
  "error": {
    "code": "NOT_AUTHENTICATED",
    "message": "Not authenticated"
  }
}

403 Forbidden

{
  "error": {
    "code": "PERMISSION_DENIED",
    "message": "You do not have permission to perform this action"
  }
}

List custom emojis for a workspace

POST /workspaces/{wid}/emojis/list

Requires authentication.

List all custom emojis available in the workspace. Returns emoji names and their image URLs.

Parameters

Name In Type Description
wid path string -

Responses

200 List of custom emojis

{
  "emojis": [
    {
      "id": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
      "workspace_id": "01JQ3KMP2RQHYJ5ZV8NMWCX4ET",
      "name": "general",
      "created_by": "01JQ3KMN7XFGY4P6WBR2SZTA9V",
      "content_type": "application/pdf",
      "size_bytes": 1048576,
      "url": "/files/01JQ3KMT6B/download?sig=abc",
      "created_at": "2025-01-15T09:30:00Z"
    }
  ]
}

401 Unauthorized

{
  "error": {
    "code": "NOT_AUTHENTICATED",
    "message": "Not authenticated"
  }
}

403 Forbidden

{
  "error": {
    "code": "PERMISSION_DENIED",
    "message": "You do not have permission to perform this action"
  }
}

Delete a custom emoji

POST /emojis/{id}/delete

Requires authentication.

Delete a custom emoji from the workspace. Only the emoji uploader or a workspace admin/owner can delete custom emojis.

Parameters

Name In Type Description
id path string -

Responses

200 Emoji deleted

{
  "success": true
}

401 Unauthorized

{
  "error": {
    "code": "NOT_AUTHENTICATED",
    "message": "Not authenticated"
  }
}

403 Forbidden

{
  "error": {
    "code": "PERMISSION_DENIED",
    "message": "You do not have permission to perform this action"
  }
}

404 Not found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found"
  }
}