Skip to content
中文

Create or add comments

Code Mode: praxis.ticket.tickets.comments.create

HTTP: POST /ticket/v1/tickets/{number}/comments

Create or add comments within the authenticated organization. Obtain resource identifiers from the corresponding list or create response. Writes complete synchronously; read the returned resource to observe the result. A body attaches platform files by link: every …/files/<id> link in it is recorded in the response’s attachments and shown inline, so upload the bytes with praxis.file and write the id it returns instead of a local path. Service authorization applies to the verified human subject.

Signature

praxis.ticket.tickets.comments.create(args:{path:{/** Repository-local number returned by create or list; distinct from the object's id. */ number:number};query?:{/** Opaque repository id. */ repository?:string};body:{/** Markdown text, at most 65536 characters. */ body:string;/** Opaque identifier returned by this resource's create or list operation. */ in_reply_to?:string}}):Promise<{/** Opaque identifier returned by this resource's create or list operation. */ id:string;/** Opaque identifier returned by this resource's create or list operation. */ repository:string;/** Repository-local number returned by create or list; distinct from the object's id. */ ticket_number:number;/** Opaque human:<user_id> or agent:<individual_id> subject. pattern: ^(human|agent):.+$ e.g. "human:usr_example" */ author:string;/** Markdown text, at most 65536 characters. */ body:string;/** Resolved body mentions. */ mentions:Array<string>;/** Platform file ids written as `…/files/<id>` links in this comment's body, in order of appearance, de-duplicated. */ attachments:Array<string>;/** Opaque identifier returned by this resource's create or list operation. */ in_reply_to:string|null;/** Opaque identifier returned by this resource's create or list operation. */ cause_id:string|null;/** Whether the comment is pinned. */ pinned:boolean;reactions:{/** Total reactions on this target. */ total_count:number;/** Number of +1 reactions. */ "+1":number;/** Number of -1 reactions. */ "-1":number;/** Number of laugh reactions. */ laugh:number;/** Number of confused reactions. */ confused:number;/** Number of heart reactions. */ heart:number;/** Number of hooray reactions. */ hooray:number;/** Number of eyes reactions. */ eyes:number;/** Number of rocket reactions. */ rocket:number};/** Creation timestamp. e.g. "2026-12-01T00:00:00Z" */ create_time:string;/** Last edit timestamp. e.g. "2026-12-01T00:00:00Z" */ update_time:string;/** Present only when something in the body could not be resolved; absent when it all resolved. */ warnings?:Array<string>;/** Present only on a create or edit answer, and only when some `@handle` reached nobody. */ unresolved?:Array<string>;/** Present only on a create or edit answer, and only when some `@handle` named more than one actor. */ ambiguous?:Array<{/** The `@handle` as written, without the `@`. */ handle:string;/** How many actors answer to it; none of them was notified. */ candidates:number}>}>;

Parameters

NameInTypeRequiredDescription
numberpathnumberyesTicket number shown by create and list (#12 is 12); not the tk_ id.
repositoryquerystringnoRepository id from GET /ticket/v1/repositories; omit for the default tickets container.

Request body

RequiredContent typesDescription
yesapplication/json

Responses

StatusContent typesDescription
201application/jsonThe operation succeeded; the body contains the requested resource or page.
400Invalid native input or unsupported GitHub API version; correct the request before retrying.
401Credentials are absent or invalid; supply a valid API key or signed browser session.
403Machine token, application, insufficient organization role or locked conversation; use an authorized human credential. GitHub rate limiting also uses 403 with retry-after and x-ratelimit headers.
404Resource or repository is absent from this organization; a different owner has the identical missing-resource response.
410Ticket is gone; refresh the repository’s ticket list.
422Invalid GitHub input, duplicate name, dependency cycle or child/assignee limit; correct the reported fields or relationships.
429Native rate limit; wait for retry-after before retrying.