Skip to main content
PUT
/
contexts
/
{context_id}
Update conversation context
curl --request PUT \
  --url https://apigcp.trynia.ai/v2/contexts/{context_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "summary": "<string>",
  "content": "<string>",
  "tags": [
    "<string>"
  ],
  "metadata": {},
  "nia_references": {
    "indexed_repositories": [
      "<string>"
    ],
    "indexed_documentation": [
      "<string>"
    ],
    "queried_repositories": [
      "<string>"
    ],
    "queried_documentation": [
      "<string>"
    ],
    "web_searches": [
      "<string>"
    ],
    "deep_research_queries": [
      "<string>"
    ]
  },
  "edited_files": [
    {
      "file_path": "<string>",
      "operation": "created",
      "lines_added": 123,
      "lines_removed": 123,
      "language": "<string>"
    }
  ]
}'
{
  "id": "<string>",
  "user_id": "<string>",
  "organization_id": "<string>",
  "title": "<string>",
  "summary": "<string>",
  "content": "<string>",
  "tags": [
    "<string>"
  ],
  "agent_source": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "metadata": {},
  "nia_references": {
    "indexed_repositories": [
      "<string>"
    ],
    "indexed_documentation": [
      "<string>"
    ],
    "queried_repositories": [
      "<string>"
    ],
    "queried_documentation": [
      "<string>"
    ],
    "web_searches": [
      "<string>"
    ],
    "deep_research_queries": [
      "<string>"
    ]
  },
  "edited_files": [
    {
      "file_path": "<string>",
      "operation": "created",
      "lines_added": 123,
      "lines_removed": 123,
      "language": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key must be provided in the Authorization header

Path Parameters

context_id
string
required

Unique context identifier

Body

application/json

Request to update an existing context (all fields optional)

title
string
Required string length: 1 - 200
summary
string
Required string length: 10 - 1000
content
string
Minimum length: 50
tags
string[]
metadata
object
nia_references
object

References to NIA resources used during the conversation

edited_files
object[]

Response

Context updated successfully

id
string

Unique identifier for the context

user_id
string

User who created the context

organization_id
string

Organization ID if context belongs to an organization

title
string

Context title

summary
string

Context summary

content
string

Full context content

tags
string[]
agent_source
string

Source agent (e.g., "cursor", "claude-code")

created_at
string<date-time>

When the context was created

updated_at
string<date-time>

When the context was last updated

metadata
object
nia_references
object

References to NIA resources used during the conversation

edited_files
object[]