Submit a request to create a ticket GitHub Issue¶
Queue a reviewed draft for external Issue creation. After receiving 202, read back the ticket’s GitHub status.
POST https://api.moi.matrixorigin.cn/v5/admin/feedback-tickets/{id}/github-issue
Before you call this API¶
Prepare a Genesis administrator Bearer token valid for the current environment. An ordinary personal access token, X-API-Key, or Workspace Owner status is insufficient. Session-authenticated writes also require CSRF protection. See AI Studio. Replace example IDs with real tickets you are authorized to view.
This triggers subsequent external creation; real verification requires separate, explicit external publication authorization. An existing created result is returned unchanged. pending/creating rejects duplicates; failed requires retry:true. Input validation and sensitive-content checks still run before an existing result is returned. The list’s availability flag depends only on configuration; the actual execution identity, bindings, and tools still require verification.
Request parameters¶
curl -X POST "https://api.moi.matrixorigin.cn/v5/admin/feedback-tickets/ticket-example/github-issue" \
-H "Authorization: Bearer $GENESIS_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
--data '{"kind":"bug","title":"示例问题","body":"已核对的问题描述。","retry":false}'
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes for the Bearer example |
Bearer followed by a trusted administrator token for this environment. Do not also set an API Key. |
|
string |
Yes |
Ticket ID in the path. |
|
string |
Yes |
bug, feature, or auto; the creation strategy. |
|
string |
Yes |
Must be nonempty after trimming, with at most 256 Unicode code points. |
|
string |
Yes |
After removing old feedback markers, trimming, and appending the current marker, must be nonempty with at most 65536 Unicode code points. |
|
boolean |
No |
Defaults to false. Only failed requests allow an explicit retry, which freezes the content again and generates a new request_id. |
Successful response¶
{
"code": 0,
"data": {
"ticket_id": "ticket-example",
"kind": "bug",
"status": "pending",
"draft_title": "示例问题",
"draft_body": "已核对的问题描述。\n\n<!-- matrixflow-feedback-ticket:ticket-example -->",
"request_id": "request-example",
"requested_by": "admin-example",
"attempt_count": 0,
"last_attempt_at": null,
"issue_number": null,
"issue_url": null,
"created_by": "",
"issue_created_at": null,
"last_error_code": "",
"created_at": "2026-11-12T04:00:00Z",
"updated_at": "2026-11-12T04:00:00Z"
}
}
Field |
Type |
Description |
|---|---|---|
|
integer |
Numeric 0 on success. |
|
object |
A newly queued request or an existing creation result. HTTP status is 202; the status alone does not indicate a new request. |
|
string |
Associated ticket ID. |
|
string |
bug, feature, or auto; the creation strategy, not necessarily the final GitHub Type. |
|
string |
pending, creating, created, or failed; independent of ticket status. |
|
string |
Frozen request title. |
|
string |
Frozen, normalized request body. |
|
string |
Identifier for this creation attempt. A retry may generate a new value. |
|
string |
Administrator principal requesting creation. |
|
integer |
Number of corresponding asynchronous processing attempts. |
|
string / null |
Most recent attempt time; null if no attempt has occurred. |
|
integer / null |
Issue number from the creation receipt; null before creation. |
|
string / null |
Issue URL from the creation receipt; null before creation. |
|
string |
Requester principal recorded on successful creation; may be an empty string before completion. |
|
string / null |
Time the creation receipt was received; null before completion. |
|
string |
Safe error code; may be an empty string when no error occurred. |
|
string |
Creation time in RFC 3339. |
|
string |
Update time in RFC 3339. |
See Shared objects for all public fields of nested tickets, users, messages, approval facts, and GitHub requests. Nullability and omission are documented separately; the old SDK fixture’s submitter_email is not a current field.
Error responses¶
{"code":"Unauthorized","msg":"Unauthorized"}
Field |
Type |
Description |
|---|---|---|
|
string / integer |
Varies by failure stage; the example uses an authentication-layer string. |
|
string |
Authentication or service-layer failure text; service text is usually localized. |
|
string |
Text for a numeric parameter-parsing error code; distinct from msg. |
|
null |
Current service-layer responseEnvelope errors retain null; authentication examples may omit this field. |
|
object |
Text-field 422 errors may include field/reason and other details; see the error descriptions. |
HTTP / code |
Conditions and handling |
|---|---|
401 / Unauthorized |
Rejected by authentication. Do not use an ordinary PAT or also supply X-API-Key. |
403 / ErrForbidden |
Trusted administrator eligibility was not obtained, or the current caller identity does not match it. |
404 / ErrFeedbackTicketNotFound |
The target ticket does not exist. Current service errors return code/msg/data:null. |
503 / ErrServiceUnavailable |
Classified identity, directory, or authorization dependency unavailability, or network timeout. |
500 / ErrServer |
Internal processing or localization failure. Read back after a write error to confirm the result. |
409 / ErrFeedbackGitHubIssueInProgress |
The request is still pending/creating. Query the original request_id rather than submitting again. |
409 / ErrFeedbackGitHubIssueRetryRequired |
The request failed and retry was not explicitly supplied. |
409 / ErrFeedbackGitHubIssueSensitiveContent |
Submitted content triggered sensitive-content detection. Modify and review it again manually. |
503 / ErrFeedbackGitHubIssueCreatorUnavailable |
No creation Workspace is configured for a new request. |
403 / ErrFeedbackGitHubIssueForbidden |
Queue preparation or execution identity was rejected. |
422 / ErrFieldRequired or ErrFieldTooLong |
The final title/body is empty or too long; not a generic draft 400. |
See Errors and recovery for all error families and stages.