Skip to main content
PATCH
/
products
/
{productId}
/
context
Update product context based on user feedback
curl --request PATCH \
  --url https://www.greenflash.ai/api/v1/products/{productId}/context \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "feedback": "Users on the enterprise plan should always be routed to a human agent for billing questions.",
  "source": "conversation 123e4567-e89b-12d3-a456-426614174000"
}
'
{
  "productId": "123e4567-e89b-12d3-a456-426614174000",
  "summary": "Added rule routing enterprise-plan billing questions to a human agent.",
  "updatedAt": "2026-04-26T18:30:00Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

productId
string<uuid>
required

The product ID whose context notes should be updated.

Body

application/json
feedback
string
required

The user-provided correction or context, in their words. Pass exactly what the user said (or a faithful summary of multiple turns) — do not pre-edit or generalize.

Required string length: 1 - 4000
source
string | null

Optional reference to what triggered this update (e.g. "conversation abc-123"). Pass null or omit if there is no specific source.

Maximum string length: 200

Response

Product context updated successfully

productId
string<uuid>
required

The product ID that was updated.

summary
string
required

Short human-readable summary of what changed in the notes.

updatedAt
string
required

When the notes were updated (ISO 8601).