PPanel Edge

tickets

由 openapi.json 自动生成的 15 个端点及其请求、响应和权限元数据。

此参考由已发布 API 契约生成。字段、请求头和权限要求如下。

下载完整 OpenAPI 文档 · SHA-256: ccaa20cec11fad96e369b88073ce3608a5b071ce55d6dc03fa31df7b0f08c525

标识符和数据结构与公开契约一致,说明直接给出调用规则。共享模型见 数据模型.

GET /api/v1/admin/tickets

GET /api/v1/admin/tickets

List tickets

{
  "parameters": [
    {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
        "enum": [
          "open",
          "awaiting_staff",
          "awaiting_user",
          "resolved",
          "closed"
        ],
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "page_size",
      "required": false,
      "schema": {
        "default": 20,
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "maxLength": 4096,
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "include_total",
      "required": false,
      "schema": {
        "default": "false",
        "enum": [
          "true",
          "false"
        ],
        "type": "string"
      }
    },
    {
      "description": "`me`, `unassigned` or a staff user id",
      "in": "query",
      "name": "assignee",
      "required": false,
      "schema": {
        "anyOf": [
          {
            "enum": [
              "me",
              "unassigned"
            ],
            "type": "string"
          },
          {
            "format": "uuid",
            "type": "string"
          }
        ],
        "description": "`me`, `unassigned` or a staff user id"
      }
    },
    {
      "description": "Ticket number (with or without `T-`), ticket id, or a customer as the admin user search reads it",
      "in": "query",
      "name": "q",
      "required": false,
      "schema": {
        "description": "Ticket number (with or without `T-`), ticket id, or a customer as the admin user search reads it",
        "maxLength": 256,
        "minLength": 1,
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "has_more": {
                "type": "boolean"
              },
              "items": {
                "items": {
                  "properties": {
                    "assignee_staff_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "available_actions": {
                      "items": {
                        "enum": [
                          "assign",
                          "reply",
                          "note",
                          "close",
                          "reopen",
                          "transition:open",
                          "transition:awaiting_staff",
                          "transition:awaiting_user",
                          "transition:resolved",
                          "transition:closed"
                        ],
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "category": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "customer": {
                      "properties": {
                        "email": {
                          "description": "Masked customer email",
                          "type": "string"
                        },
                        "public_id": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "public_id",
                        "email"
                      ],
                      "type": "object"
                    },
                    "first_responded_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "first_response_due_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "last_message_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "priority": {
                      "enum": [
                        "low",
                        "normal",
                        "high",
                        "urgent"
                      ],
                      "type": "string"
                    },
                    "related_order_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "related_subscription_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resolution_due_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resolved_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "staff_unread": {
                      "type": "boolean"
                    },
                    "status": {
                      "enum": [
                        "open",
                        "awaiting_staff",
                        "awaiting_user",
                        "resolved",
                        "closed"
                      ],
                      "type": "string"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "ticket_no": {
                      "type": "string"
                    },
                    "user_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "user_unread": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "id",
                    "ticket_no",
                    "user_id",
                    "subject",
                    "category",
                    "priority",
                    "status",
                    "assignee_staff_id",
                    "related_order_id",
                    "related_subscription_id",
                    "first_response_due_at",
                    "resolution_due_at",
                    "first_responded_at",
                    "resolved_at",
                    "last_message_at",
                    "user_unread",
                    "staff_unread",
                    "created_at",
                    "version",
                    "available_actions",
                    "customer"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "total": {
                "type": "number"
              }
            },
            "required": [
              "items",
              "next_cursor",
              "has_more"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    }
  },
  "summary": "List tickets",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/admin/tickets/{id}

GET /api/v1/admin/tickets/{id}

Ticket detail

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "customer": {
                "properties": {
                  "email": {
                    "description": "Masked customer email",
                    "type": "string"
                  },
                  "public_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "public_id",
                  "email"
                ],
                "type": "object"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions",
              "customer"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success",
      "headers": {
        "ETag": {
          "description": "Current resource version for If-Match.",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Ticket detail",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-concurrency": {
    "etag": true
  },
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/admin/tickets/{id}/assign

POST /api/v1/admin/tickets/{id}/assign

Assign a ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "description": "Resource ETag; missing 428, malformed 412, stale 409.",
      "in": "header",
      "name": "If-Match",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "assignee_staff_id": {
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            }
          },
          "required": [
            "assignee_staff_id"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "customer": {
                "properties": {
                  "email": {
                    "description": "Masked customer email",
                    "type": "string"
                  },
                  "public_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "public_id",
                  "email"
                ],
                "type": "object"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions",
              "customer"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success",
      "headers": {
        "ETag": {
          "description": "Current resource version for If-Match.",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Assign a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.assign",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-concurrency": {
    "etag": true,
    "ifMatch": true
  },
  "x-idempotency": "optional",
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/admin/tickets/{id}/messages

GET /api/v1/admin/tickets/{id}/messages

Ticket messages

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "before",
      "required": false,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 50,
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "items": {
                "items": {
                  "properties": {
                    "author_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "author_type": {
                      "enum": [
                        "user",
                        "staff",
                        "system"
                      ],
                      "type": "string"
                    },
                    "body_md": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "file_ids": {
                      "items": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "internal": {
                      "type": "boolean"
                    },
                    "ticket_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ticket_id",
                    "author_type",
                    "author_id",
                    "internal",
                    "body_md",
                    "file_ids",
                    "created_at"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "items"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    }
  },
  "summary": "Ticket messages",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/admin/tickets/{id}/messages

POST /api/v1/admin/tickets/{id}/messages

Reply to a ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "body_md": {
              "maxLength": 40000,
              "minLength": 1,
              "type": "string"
            },
            "file_ids": {
              "default": [],
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "maxItems": 10,
              "type": "array"
            }
          },
          "required": [
            "body_md"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Reply to a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.reply",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "optional",
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/admin/tickets/{id}/notes

POST /api/v1/admin/tickets/{id}/notes

Add an internal note

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "body_md": {
              "maxLength": 40000,
              "minLength": 1,
              "type": "string"
            },
            "file_ids": {
              "default": [],
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "maxItems": 10,
              "type": "array"
            }
          },
          "required": [
            "body_md"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Add an internal note",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.note",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "optional",
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/admin/tickets/{id}/transition

POST /api/v1/admin/tickets/{id}/transition

Transition a ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "description": "Resource ETag; missing 428, malformed 412, stale 409.",
      "in": "header",
      "name": "If-Match",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "reopen": {
              "default": false,
              "type": "boolean"
            },
            "status": {
              "enum": [
                "open",
                "awaiting_staff",
                "awaiting_user",
                "resolved",
                "closed"
              ],
              "type": "string"
            }
          },
          "required": [
            "status"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "customer": {
                "properties": {
                  "email": {
                    "description": "Masked customer email",
                    "type": "string"
                  },
                  "public_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "public_id",
                  "email"
                ],
                "type": "object"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions",
              "customer"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success",
      "headers": {
        "ETag": {
          "description": "Current resource version for If-Match.",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Transition a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.transition",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-concurrency": {
    "etag": true,
    "ifMatch": true
  },
  "x-idempotency": "optional",
  "x-permission": "support.ticket.handle",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/tickets

GET /api/v1/me/tickets

List tickets

{
  "parameters": [
    {
      "in": "query",
      "name": "status",
      "required": false,
      "schema": {
        "enum": [
          "open",
          "awaiting_staff",
          "awaiting_user",
          "resolved",
          "closed"
        ],
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "page_size",
      "required": false,
      "schema": {
        "default": 20,
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      }
    },
    {
      "in": "query",
      "name": "cursor",
      "required": false,
      "schema": {
        "maxLength": 4096,
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "include_total",
      "required": false,
      "schema": {
        "default": "false",
        "enum": [
          "true",
          "false"
        ],
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "has_more": {
                "type": "boolean"
              },
              "items": {
                "items": {
                  "properties": {
                    "assignee_staff_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "available_actions": {
                      "items": {
                        "enum": [
                          "assign",
                          "reply",
                          "note",
                          "close",
                          "reopen",
                          "transition:open",
                          "transition:awaiting_staff",
                          "transition:awaiting_user",
                          "transition:resolved",
                          "transition:closed"
                        ],
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "category": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "first_responded_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "first_response_due_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "last_message_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "priority": {
                      "enum": [
                        "low",
                        "normal",
                        "high",
                        "urgent"
                      ],
                      "type": "string"
                    },
                    "related_order_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "related_subscription_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resolution_due_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "resolved_at": {
                      "format": "date-time",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "staff_unread": {
                      "type": "boolean"
                    },
                    "status": {
                      "enum": [
                        "open",
                        "awaiting_staff",
                        "awaiting_user",
                        "resolved",
                        "closed"
                      ],
                      "type": "string"
                    },
                    "subject": {
                      "type": "string"
                    },
                    "ticket_no": {
                      "type": "string"
                    },
                    "user_id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "user_unread": {
                      "type": "boolean"
                    },
                    "version": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "id",
                    "ticket_no",
                    "user_id",
                    "subject",
                    "category",
                    "priority",
                    "status",
                    "assignee_staff_id",
                    "related_order_id",
                    "related_subscription_id",
                    "first_response_due_at",
                    "resolution_due_at",
                    "first_responded_at",
                    "resolved_at",
                    "last_message_at",
                    "user_unread",
                    "staff_unread",
                    "created_at",
                    "version",
                    "available_actions"
                  ],
                  "type": "object"
                },
                "type": "array"
              },
              "next_cursor": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "total": {
                "type": "number"
              }
            },
            "required": [
              "items",
              "next_cursor",
              "has_more"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    }
  },
  "summary": "List tickets",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/me/tickets

POST /api/v1/me/tickets

Create a ticket

{
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "body_md": {
              "maxLength": 40000,
              "minLength": 1,
              "type": "string"
            },
            "category": {
              "maxLength": 80,
              "minLength": 1,
              "type": "string"
            },
            "file_ids": {
              "default": [],
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "maxItems": 10,
              "type": "array"
            },
            "related_order_id": {
              "default": null,
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "related_subscription_id": {
              "default": null,
              "format": "uuid",
              "type": [
                "string",
                "null"
              ]
            },
            "subject": {
              "maxLength": 200,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "body_md",
            "subject",
            "category"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Create a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.create",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-capability": "me.ticket.create",
  "x-idempotency": "required",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/tickets/{id}

GET /api/v1/me/tickets/{id}

Ticket detail

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success",
      "headers": {
        "ETag": {
          "description": "Current resource version for If-Match.",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Ticket detail",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-concurrency": {
    "etag": true
  },
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/tickets/{id}/attachments/{fileId}/content

GET /api/v1/me/tickets/{id}/attachments/{fileId}/content

Download a public reply attachment from your ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "path",
      "name": "fileId",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/gzip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/json": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/pdf": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.android.package-archive": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.appimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.debian.binary-package": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/vnd.microsoft.portable-executable": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-7z-compressed": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-apple-diskimage": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-msi": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-rpm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/x-xar": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "application/zip": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/avif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/gif": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/jpeg": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/png": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/svg+xml": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/webp": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "image/x-icon": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/csv": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "text/plain": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/mp4": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        },
        "video/webm": {
          "schema": {
            "format": "binary",
            "type": "string"
          }
        }
      },
      "description": "Private attachment"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    }
  },
  "summary": "Download a public reply attachment from your ticket",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-rate-limit": "support.tickets",
  "effectiveSecurity": []
}

POST /api/v1/me/tickets/{id}/close

POST /api/v1/me/tickets/{id}/close

close a ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "close a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.close",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "optional",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

GET /api/v1/me/tickets/{id}/messages

GET /api/v1/me/tickets/{id}/messages

Ticket messages

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "before",
      "required": false,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    },
    {
      "in": "query",
      "name": "limit",
      "required": false,
      "schema": {
        "default": 50,
        "maximum": 100,
        "minimum": 1,
        "type": "integer"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "items": {
                "items": {
                  "properties": {
                    "author_id": {
                      "format": "uuid",
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "author_type": {
                      "enum": [
                        "user",
                        "staff",
                        "system"
                      ],
                      "type": "string"
                    },
                    "body_md": {
                      "type": "string"
                    },
                    "created_at": {
                      "format": "date-time",
                      "type": "string"
                    },
                    "file_ids": {
                      "items": {
                        "format": "uuid",
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "id": {
                      "format": "uuid",
                      "type": "string"
                    },
                    "internal": {
                      "type": "boolean"
                    },
                    "ticket_id": {
                      "format": "uuid",
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "ticket_id",
                    "author_type",
                    "author_id",
                    "internal",
                    "body_md",
                    "file_ids",
                    "created_at"
                  ],
                  "type": "object"
                },
                "type": "array"
              }
            },
            "required": [
              "items"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    }
  },
  "summary": "Ticket messages",
  "tags": [
    "tickets"
  ],
  "x-body": "none",
  "x-body-limit": 0,
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/me/tickets/{id}/messages

POST /api/v1/me/tickets/{id}/messages

Reply to a ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "additionalProperties": false,
          "properties": {
            "body_md": {
              "maxLength": 40000,
              "minLength": 1,
              "type": "string"
            },
            "file_ids": {
              "default": [],
              "items": {
                "format": "uuid",
                "type": "string"
              },
              "maxItems": 10,
              "type": "array"
            }
          },
          "required": [
            "body_md"
          ],
          "type": "object"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "id": {
                "format": "uuid",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "Reply to a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.reply",
  "x-body": "json",
  "x-body-limit": 65536,
  "x-idempotency": "optional",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}

POST /api/v1/me/tickets/{id}/reopen

POST /api/v1/me/tickets/{id}/reopen

reopen a ticket

{
  "parameters": [
    {
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "format": "uuid",
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "schema": {
            "properties": {
              "assignee_staff_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "available_actions": {
                "items": {
                  "enum": [
                    "assign",
                    "reply",
                    "note",
                    "close",
                    "reopen",
                    "transition:open",
                    "transition:awaiting_staff",
                    "transition:awaiting_user",
                    "transition:resolved",
                    "transition:closed"
                  ],
                  "type": "string"
                },
                "type": "array"
              },
              "category": {
                "type": "string"
              },
              "created_at": {
                "format": "date-time",
                "type": "string"
              },
              "first_responded_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "first_response_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "format": "uuid",
                "type": "string"
              },
              "last_message_at": {
                "format": "date-time",
                "type": "string"
              },
              "priority": {
                "enum": [
                  "low",
                  "normal",
                  "high",
                  "urgent"
                ],
                "type": "string"
              },
              "related_order_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "related_subscription_id": {
                "format": "uuid",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolution_due_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "resolved_at": {
                "format": "date-time",
                "type": [
                  "string",
                  "null"
                ]
              },
              "staff_unread": {
                "type": "boolean"
              },
              "status": {
                "enum": [
                  "open",
                  "awaiting_staff",
                  "awaiting_user",
                  "resolved",
                  "closed"
                ],
                "type": "string"
              },
              "subject": {
                "type": "string"
              },
              "ticket_no": {
                "type": "string"
              },
              "user_id": {
                "format": "uuid",
                "type": "string"
              },
              "user_unread": {
                "type": "boolean"
              },
              "version": {
                "type": "integer"
              }
            },
            "required": [
              "id",
              "ticket_no",
              "user_id",
              "subject",
              "category",
              "priority",
              "status",
              "assignee_staff_id",
              "related_order_id",
              "related_subscription_id",
              "first_response_due_at",
              "resolution_due_at",
              "first_responded_at",
              "resolved_at",
              "last_message_at",
              "user_unread",
              "staff_unread",
              "created_at",
              "version",
              "available_actions"
            ],
            "type": "object"
          }
        }
      },
      "description": "Success"
    },
    "404": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Not found"
    },
    "409": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid transition or stale version"
    },
    "422": {
      "content": {
        "application/problem+json": {
          "schema": {
            "properties": {
              "code": {
                "type": "string"
              },
              "request_id": {
                "type": "string"
              },
              "status": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type",
              "title",
              "status",
              "code",
              "request_id"
            ],
            "type": "object"
          }
        }
      },
      "description": "Invalid ticket input"
    }
  },
  "summary": "reopen a ticket",
  "tags": [
    "tickets"
  ],
  "x-audit": "support.ticket.reopen",
  "x-body": "none",
  "x-body-limit": 0,
  "x-idempotency": "optional",
  "x-rate-limit": "support.tickets",
  "x-reauth": false,
  "effectiveSecurity": []
}