---
title: "Create an AI response for an issue"
method: POST
path: "/issues/{id}/ai-response"
tags: ["issues"]
---

# Create an AI response for an issue

`POST /issues/{id}/ai-response`

Generates an AI response for the specified issue using the given agent.

**Rate limit:** 20 requests per minute

## Path parameters

- `id` string, required

## Request body

- CreateIssueAIResponseRequestBody
  - `ai_agent_id` string, required — The ID of the AI agent to use to create the AI response.
  - `post_as_internal_note` boolean — Whether to post the AI response as an internal note on the issue.

## Response `200`

- CreateIssueAIResponseResponseBody
  - `request_id` string — The request ID for tracking.
  - `response_html` string — The HTML content of the AI response.
  - `response_valid` boolean — Whether the AI was able to answer the question.

## Other responses

- `400` — The request was invalid or could not be completed.
- `404`
- `500` — An unexpected internal error occurred.

---

[API](https://skmtc.net/usepylon/apis/pylon-api.md) · [All operations](https://skmtc.net/usepylon/apis/pylon-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usepylon/pylon-api/versions/7b6ea6af992a/schema)
