---
id: suggestion-approve
title: "Approve a suggestion"
description: "Approve a pending suggestion. The owning agent will then execute the fix."
sidebar_label: "Approve a suggestion"
hide_title: true
hide_table_of_contents: true
api: eJzFWFlz4zYS/isovCSpIiX6mOwO37Qeb8WpZGfKRy5LJUNEU0SGBDg4ZCsq/vetBiiRlJT42N3aF5k0gT6//tDoDeVgMi1qK5SkKZ3UtVYrIIzUILmQS2LccgkGP4/IbQFEPUr8N1uCtORRlCWxBUgCT5A5C/hCcvE0ohFVNWiGG684TWknJ2VBCY2oZUtD03t6s/tIZxE1kDkt7Jqm9xu6AKZBT5wtaHo/a2YRrZlmFVjQxi8QaHfNbEEjKlkFNKUs82otVFecRtRkBVSMphtq1zV+N1YLuaRNRDV8cUIDp6nVDqK9aKC/QRYRFipy9QH9gidW1SXKefr1j7/9/f1kccEvc9pER20R/7EFXeQODDB3y5PTs60BM5RmaiUNGNR1miT454hPIQG8n1wa0UxJC9LiHlbXpch89sa/G9y4OXRCLX6HzNKI1hpzbUVQK/iho8f8clJ8ca9wL6KmdMvnZU+cVfESJKIPOLm7/iHOtQDJyzVBCUMdrubMQsxV9hl0LkqIF8xALCq2BNQZ8j/H/M9f6lnNNFbHK6BDjWXWmWPiQboKa6QtSBrRbfrCYyn8U85E6R80YFb8IzzVHlqzY0ZmTnsrg+ahdVtdTUQzDRjG+WL9Mt8DMdiCWdJu9ZwwRFovxW2txyZjUoKO/X5UrB4l6NfoVJqYtcFge+2em47QUqfb5zgOAOgpzpTMBQeZQU+7dNUC9IH2i91aYjKlgSzAPgJIkhAmOTkZKExG70+bPQnPgpn03onKvSdYb8oA9y6RG1fXSltDfmT6M1ePexG+8/75fR92ICcIcuIDQKwiGowqV0AufrqMT5PTb+OT07PzEQajAss4s0fLfmjpjywrhITYqrgKj2S7meRKewNCOpQeWLihGmplhFV6jeL1clytY1aL2IBeiQwPioVmMitoSnPxNM5W0FlJmyaizoCev9zU71zFZAxcWLYofbm2B8qeXZbpJdj5CrQJG0+TmJW1kHA2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d7Z9ApuuGpNIC1QdkD/n7HERBIn4an2V+rWLpX5uzPfYjDEY9TiO1yaCoVDr1oZX1Q4EUrpuDdLGG/6Q6pm3LVlZrwRvBl3Q7IgPgy7nC57zSWrxQh7tbpkFrkL20w/Btreqv0VIyC1P0fbBQkFbcdTvpT9Irxv+Yd/btuf73++9c2KkLnC7d2N6GSUjBLatTGTMPO48vzSRD4CFfP11w7EuhFj5/N+mjZdLf9XR5Kt2xae7LgumZC+BcSYbtok3fcHPjSi6f4sscsTfhW8m8cgOxSY8PSebjZ4wb7TZdPgv784wLvt/SyiK6YFwt6nkwuDz5ymOSvN/vSvH4Wvr1uO+oYcn0oedW3L+hI5f8VKh280op9hvT8mxRPtzeYczPDeYI3gtJk1ES2AcRz83G/aD5Msg9r2thyQO0J+V3OfPt7cYlKGSN9Ddr/7G9qz2YQVt+ozyKbZmWfxnfrT69+D7wiM
sidebar_class_name: "post api-method"
info_path: docs/api/action-items
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Approve a suggestion"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/action_item/{actionItemId}/suggestions/{id}/approve"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Approve a pending suggestion. The owning agent will then execute the fix.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"actionItemId","schema":{"type":"string"},"required":true,"description":"The action item ID.","example":"xYz789AbCdEf"},{"in":"path","name":"id","schema":{"type":"string"},"required":true,"description":"The suggestion ID.","example":"sUg123AbCdEf"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The approved suggestion.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique suggestion ID.","example":"sUg123AbCdEf"},"slug":{"type":"string","description":"Auto-generated URL-friendly slug.","example":"update-dockerfile-base-image"},"action_item_id":{"type":"string","description":"The parent action item ID.","example":"xYz789AbCdEf"},"status":{"type":"string","enum":["pending","approved","applied","failed","rejected","expired"],"description":"The current status.","example":"pending"},"created_by":{"type":"string","description":"The agent that created the suggestion.","example":"security-scanner-agent"},"owner":{"type":"string","description":"The agent or system that will execute the fix.","example":"image-updater-agent"},"confidence":{"type":"number","description":"Confidence score between 0 and 1.","example":0.92},"description":{"type":"string","description":"A description of the proposed fix. Supports Markdown.","example":"Update the Dockerfile base image to resolve CVE-2026-1234."},"metadata":{"type":"object","description":"Machine-to-machine metadata for the executor.","example":{"repository":"org/my-api-service","branch":"fix/cve-2026-1234"}},"user_metadata":{"type":"object","description":"Human-editable parameters.","example":{"target_version":"20-alpine3.19"}},"user_metadata_config":{"type":"object","description":"JSON Schema for rendering `user_metadata` in the UI."},"execution_result":{"type":"object","description":"Result of a suggestion execution.","properties":{"success":{"type":"boolean","description":"Whether the execution succeeded.","example":true},"message":{"type":"string","description":"A summary message.","example":"Base image updated successfully."},"details":{"type":"object","description":"Additional details, such as a link to the resulting PR.","example":{"pull_request":"https://github.com/org/my-api-service/pull/42"}}},"title":"ExecutionResult"},"executed_at":{"type":"string","format":"date","description":"Date when the suggestion was executed.","example":null},"expires_at":{"type":"string","format":"date","description":"Expiration date.","example":"2026-05-15"},"created_at":{"type":"string","format":"date-time","description":"Creation timestamp.","example":"2026-04-06T12:30:00.000Z"},"updated_at":{"type":"string","format":"date-time","description":"Last update timestamp.","example":"2026-04-06T12:30:00.000Z"}},"title":"Suggestion"}}}},"4XX":{"description":"Client error responses due to invalid input, missing parameters, or unauthorized access.\n\nRequest validation errors use a different shape:\n```json\n{\n  \"type\": \"ValidationError\",\n  \"errors\": [{ \"message\": \"body must have required property 'defer_until'\" }]\n}\n```\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","description":"Standard error response.","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code (e.g., 400, 401, 403, 404).","example":400},"code":{"type":"string","description":"Machine-readable error code.","example":"bad_request"},"error":{"type":"string","description":"Short description of the error type.","example":"Bad Request"},"message":{"type":"string","description":"Additional details about the error.","example":"The request was malformed or contained invalid parameters."}}},{"type":"object","description":"Request validation error response.","required":["type","errors"],"properties":{"type":{"type":"string","example":"ValidationError"},"errors":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string","example":"body must have required property 'until'"}}}}}}]}}}},"5XX":{"description":"Server error responses indicating an issue on the API side.","content":{"application/json":{"schema":{"type":"object","required":["statusCode","error","message"],"properties":{"statusCode":{"type":"integer","description":"HTTP status code representing the specific server error.","example":500},"code":{"type":"string","description":"A machine-readable error code that categorizes the server failure.","example":"internal_server_error"},"error":{"type":"string","description":"A brief, human-readable description of the error type.","example":"Internal Server Error"},"message":{"type":"string","description":"Additional details about the error.","example":"An unexpected error occurred on the server."}}}}}}}}
>
  
</StatusCodes>


      