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

Authorization

string

Yes for the Bearer example

Bearer followed by a trusted administrator token for this environment. Do not also set an API Key.

id

string

Yes

Ticket ID in the path.

kind

string

Yes

bug, feature, or auto; the creation strategy.

title

string

Yes

Must be nonempty after trimming, with at most 256 Unicode code points.

body

string

Yes

After removing old feedback markers, trimming, and appending the current marker, must be nonempty with at most 65536 Unicode code points.

retry

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

code

integer

Numeric 0 on success.

data

object

A newly queued request or an existing creation result. HTTP status is 202; the status alone does not indicate a new request.

data.ticket_id

string

Associated ticket ID.

data.kind

string

bug, feature, or auto; the creation strategy, not necessarily the final GitHub Type.

data.status

string

pending, creating, created, or failed; independent of ticket status.

data.draft_title

string

Frozen request title.

data.draft_body

string

Frozen, normalized request body.

data.request_id

string

Identifier for this creation attempt. A retry may generate a new value.

data.requested_by

string

Administrator principal requesting creation.

data.attempt_count

integer

Number of corresponding asynchronous processing attempts.

data.last_attempt_at

string / null

Most recent attempt time; null if no attempt has occurred.

data.issue_number

integer / null

Issue number from the creation receipt; null before creation.

data.issue_url

string / null

Issue URL from the creation receipt; null before creation.

data.created_by

string

Requester principal recorded on successful creation; may be an empty string before completion.

data.issue_created_at

string / null

Time the creation receipt was received; null before completion.

data.last_error_code

string

Safe error code; may be an empty string when no error occurred.

data.created_at

string

Creation time in RFC 3339.

data.updated_at

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

code

string / integer

Varies by failure stage; the example uses an authentication-layer string.

msg

string

Authentication or service-layer failure text; service text is usually localized.

message

string

Text for a numeric parameter-parsing error code; distinct from msg.

data

null

Current service-layer responseEnvelope errors retain null; authentication examples may omit this field.

details

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.

Last updated on