Memes¶
A meme is an image, video, or audio asset saved as a favourite in the current account's collection. The routes here are user-only and operate on the caller's own collection. They require a user session token (Authorization: Bearer <token>); a valid Bot <token> credential is rejected with 403 ACCESS_DENIED (an invalid one with 401 UNAUTHORIZED).
The complete collection also arrives as favorite_memes in the Gateway Ready payload, using the same meme object shape.
Not supported on TEBHOS
TEBHOS exposes read, modify and delete routes for the meme collection only. There is no HTTP route that saves a new meme (neither from a URL nor from a message), no route that resolves GIF URLs, and Create message has no favorite_meme_id field. To send a GIF, use the GIF provider API and post its URL as message content.
Meme object¶
One media asset owned by one account. Only the name, alt text, and tags can change.
Structure¶
| Field | Type | Description |
|---|---|---|
| id | snowflake | The ID of the meme |
| user_id | snowflake | The ID of the owning account |
| name | string | The display name of the meme |
| alt_text | ?string | The accessibility description of the media, or null when none is set |
| tags | array[string] | The search tags stored on the meme |
| attachment_id | snowflake | The ID of the attachment holding the stored copy |
| filename | string | The filename of the stored copy |
| content_type | string | The MIME type of the stored copy |
| content_hash | ?string | The content hash of the stored bytes, or null when it is unavailable |
| size | integer | The stored size of the copy in bytes |
| width | ?integer | The width of the media in pixels, or null when not applicable or unknown |
| height | ?integer | The height of the media in pixels, or null when not applicable or unknown |
| duration | ?integer | The duration of the media in seconds, or null when not applicable or unknown |
| url | ?string | A relative path of the form /media/memes/{content_hash}, or null when content_hash is null |
The creation time is the timestamp embedded in id, as defined by Snowflakes.
Example¶
{
"id": "1501314428688998182",
"user_id": "1501314428688990000",
"name": "party_parrot.gif",
"alt_text": null,
"tags": ["parrot", "party"],
"attachment_id": "1501314428688998183",
"filename": "party_parrot.gif",
"content_type": "image/gif",
"content_hash": "9f2c1a0d7e5b",
"size": 40213,
"width": 320,
"height": 240,
"duration": null,
"url": "/media/memes/9f2c1a0d7e5b"
}
List memes¶
GET /users/@me/memes
Returns every meme object the current account owns, in descending meme ID order, so the most recently saved comes first.
Response¶
| Status | Body | Condition |
|---|---|---|
| 200 | array[meme object] | Collection was returned, possibly as an empty array |
| 401 | error response | Missing or non-user credential |
Rate limit¶
60 requests per 10 seconds for each authenticated user, on the favorite_meme:list bucket.
Get meme¶
GET /users/@me/memes/{meme_id}
Returns one meme object owned by the current account.
Path parameters¶
| Field | Type | Description |
|---|---|---|
| meme_id | snowflake | The ID of the meme |
Response¶
| Status | Body | Condition |
|---|---|---|
| 200 | meme object | Meme was returned |
| 400 | error response | meme_id is not a valid snowflake (BAD_REQUEST) |
| 404 | error response | Meme is unknown or belongs to another account (NOT_FOUND) |
Rate limit¶
100 requests per 10 seconds for each authenticated user, on the favorite_meme:get bucket.
Modify meme¶
PATCH /users/@me/memes/{meme_id}
Changes the name, alt text, or tags of one meme owned by the current account and returns the updated meme object. Emits a Favorite Meme Update Gateway event with the updated object to the caller's own sessions.
Path parameters¶
| Field | Type | Description |
|---|---|---|
| meme_id | snowflake | The ID of the meme |
JSON body¶
| Field | Type | Description |
|---|---|---|
| name? | string | The replacement display name. Leading and trailing whitespace is trimmed |
| alt_text? | string | The replacement accessibility description |
| tags? | array[string] | The replacement tags |
An omitted or null field leaves the stored value unchanged, so alt_text cannot be cleared with null; send an empty string instead.
Supplying tags overwrites the complete tag list
An empty array clears every tag. Omit the field, or send null, to leave the stored tags untouched.
Response¶
| Status | Body | Condition |
|---|---|---|
| 200 | meme object | Meme was updated |
| 400 | error response | meme_id is not a valid snowflake, or the body is not valid JSON |
| 404 | error response | Meme is unknown or belongs to another account (NOT_FOUND) |
Rate limit¶
30 requests per 10 seconds for each authenticated user, on the favorite_meme:update bucket.
Delete meme¶
DELETE /users/@me/memes/{meme_id}
Deletes one meme owned by the current account and returns 204 with an empty body. Emits a Favorite Meme Delete Gateway event carrying meme_id to the caller's own sessions.
An unknown meme, or one owned by another account, is a successful no-op and emits nothing.
Path parameters¶
| Field | Type | Description |
|---|---|---|
| meme_id | snowflake | The ID of the meme |
Response¶
| Status | Body | Condition |
|---|---|---|
| 204 | empty | Meme was deleted, or no owned meme existed |
| 400 | error response | meme_id is not a valid snowflake |
Rate limit¶
30 requests per 10 seconds for each authenticated user, on the favorite_meme:delete bucket.