monoesdocs
Menu

API reference

Org gallery

Uploaded agent-org definitions, voting, comments, banner images, and run outputs.

POST/api/community/orgscommunity:write

Upload an org definition (JSON matching the org schema).

Request

{ orgJson: string }, a JSON-encoded org definition, max 500 KB

Response

201 { id, name, goal, topology, roleCount, createdAt }

orgJson is validated against a Zod schema before insert. The request also needs a numeric Content-Length header under ~1 MB — a chunked-transfer client with no Content-Length is rejected outright, regardless of the actual body size.

PATCH/api/community/orgs/{id}community:write

Update an org's name, tagline, description, body, or banner image.

Request

{ name?, tagline?, description?, body?, bannerUrl? } (all optional, at least one required)

Response

{ id, ...updatedFields }

Requires ownership (or moderator/admin). Limits: name 1-100 chars, tagline ≤150, description ≤1000, body ≤20000. bannerUrl must start with /api/images/org/ or be null; empty strings on tagline/description/body are coerced to null.

DELETE/api/community/orgs/{id}community:write

Delete an org upload.

Response

{ id }
POST/api/community/orgs/{id}/votecommunity:write

Upvote, downvote, or clear your vote on an org.

Request

{ value: 1 | -1 | 0 }

Response

{ score: number, myVote: 1|-1|0 }
POST/api/community/orgs/{id}/commentscommunity:write

Post a comment on an org.

Request

{ body: string }

Response

201 { id, orgUploadId, authorId, authorUsername, body, createdAt }

body 1-1000 chars.

DELETE/api/community/orgs/{id}/comments/{commentId}community:write

Delete your own comment (or any comment, as a moderator/admin).

Response

{ id }
POST/api/community/orgs/{id}/imagescommunity:write

Upload an image (used for the org body and/or banner).

Request

multipart/form-data, field 'image': PNG/JPEG/WebP, max 2 MB

Response

201 { url }
POST/api/community/orgs/{id}/runscommunity:write

Upload a run's output files (Markdown and/or HTML).

Request

multipart/form-data: field 'label' (string, optional, ≤100 chars), field 'files' (up to 10 .md/.html files, 2 MB each)

Response

201 { id, label: string | null, createdAt, files: [{ id, filename, fileType, sizeBytes }] }

label is optional despite the field existing — a blank or missing label is stored as null.

DELETE/api/community/orgs/{id}/runs/{runId}community:write

Delete a run and its files.

Response

{ id }

Requires ownership of the run (or moderator/admin).

GET/api/community/org-run-files/{fileId}Public

Fetch a run output file's raw content.

Response

The raw file body, Content-Type text/markdown or text/html.

Unauthenticated: anyone with the file id can view it, same as the linked org.