Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions api/v1/projects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ curl -X POST https://top.gg/api/v1/projects/@me/announcements \
-H "Content-Type: application/json" \
-d '{
"title": "Version 2.0 Released!",
"content": "We just released version 2.0 with a bunch of new features and improvements."
"content": "We just released version 2.0 with a bunch of new features and improvements.",
"category": "new_feature"
}'
```

Expand All @@ -160,6 +161,10 @@ curl -X POST https://top.gg/api/v1/projects/@me/announcements \
The announcement body text. Must be between 10 and 2,000 characters.
</ParamField>

<ParamField body="category" type="string">
The category to publish the announcement under. One of `announcement`, `event`, or `new_feature`. Defaults to `announcement` when omitted.
</ParamField>
Comment on lines +164 to +166
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The category field is currently only documented as a request parameter. To ensure the documentation is complete and consistent, please also add it to the Response fields section (lines 170-180) and update the Example response (lines 184-190) to include this new field, as the API returns the category in the response object upon successful creation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the developer docs repo, it does not contain code my friend


### Response fields

<ResponseField name="title" type="string" required>
Expand Down Expand Up @@ -190,7 +195,7 @@ curl -X POST https://top.gg/api/v1/projects/@me/announcements \
|--------|-------------|
| `400` | Invalid project token |
| `404` | Project not found |
| `422` | Validation error (title or content length violations) |
| `422` | Validation error (title or content length violations, or unsupported category) |
| `429` | Rate limited - only one announcement every 4 hours |

---
Expand Down