cURL
curl -X PATCH https://reygrid.com/api/v1/agents/{AgentId} \
-H "Authorization: Bearer $REYGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"instructions": "Answer in a friendly tone and keep replies under 80 words."}'from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
client.update_agent(
"{AgentId}",
instructions="Answer in a friendly tone and keep replies under 80 words.",
)import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
await client.updateAgent("{AgentId}", {
instructions: "Answer in a friendly tone and keep replies under 80 words.",
});{
"success": true,
"agent": {
"id": {
"AgentId": null
},
"name": "Support",
"model": "gpt-4o-mini-2024-07-18",
"instructions": "Answer in a friendly tone and keep replies under 80 words.",
"usage": 119.5,
"createdAt": "2026-08-25T00:43:49.979Z"
}
}{
"success": false,
"error": {
"code": "INVALID_BODY",
"message": "Invalid body",
"list": {
"title": [
"Title too short"
]
}
}
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"list": [
{}
]
},
"output": {},
"usage": {
"credits": 123
}
}{
"success": false,
"error": {
"code": "SOURCE_NOT_FOUND",
"message": "This source does not exist"
}
}Agents
Update an agent
Updates the agent’s name, instructions or model. Send only the fields to change.
PATCH
/
agents
/
{agentId}
cURL
curl -X PATCH https://reygrid.com/api/v1/agents/{AgentId} \
-H "Authorization: Bearer $REYGRID_API_KEY" \
-H "Content-Type: application/json" \
-d '{"instructions": "Answer in a friendly tone and keep replies under 80 words."}'from reygrid import ReyGrid
client = ReyGrid(api_key="YOUR_API_KEY")
client.update_agent(
"{AgentId}",
instructions="Answer in a friendly tone and keep replies under 80 words.",
)import { ReyGrid } from "reygrid";
const client = new ReyGrid({ apiKey: "YOUR_API_KEY" });
await client.updateAgent("{AgentId}", {
instructions: "Answer in a friendly tone and keep replies under 80 words.",
});{
"success": true,
"agent": {
"id": {
"AgentId": null
},
"name": "Support",
"model": "gpt-4o-mini-2024-07-18",
"instructions": "Answer in a friendly tone and keep replies under 80 words.",
"usage": 119.5,
"createdAt": "2026-08-25T00:43:49.979Z"
}
}{
"success": false,
"error": {
"code": "INVALID_BODY",
"message": "Invalid body",
"list": {
"title": [
"Title too short"
]
}
}
}{
"error": "Unauthorized",
"code": "AUTH_REQUIRED"
}{
"success": true,
"error": {
"code": "<string>",
"message": "<string>",
"list": [
{}
]
},
"output": {},
"usage": {
"credits": 123
}
}{
"success": false,
"error": {
"code": "SOURCE_NOT_FOUND",
"message": "This source does not exist"
}
}Authorizations
ReyGrid API key sent as a Bearer token.
Path Parameters
The ID of the agent.
Body
application/json