Skip to main content
PATCH
TypeScript SDK
Send only the fields you want to change. Every body field is optional, but the request needs at least one, and an empty body returns a 400 validation_error. A field set to its current value usually changes nothing. The exception is status: sending "disabled" for an agent that’s already disabled, other than through the API, returns a 403 restricted_resource and rejects the whole request. Leave status out when you only want to change other fields. All the fields in one request save together, so either every change applies or none does. The response is the updated agent object, without instructions.

Which fields each agent and token can change

A personal access token acts as its user, so its user’s role on the agent decides which fields it can change. A connection needs the Edit selected agents capability and edit access to the agent. Sending a field the token can’t change returns a 403 restricted_resource. The exception is is_favorited: a connection that sends it gets a 400 validation_error, because only a personal access token can change it. For notion_ai, you can change name and model. name sets the token user’s name for their personal agent. Sending any other field returns a 400 validation_error. Only a personal access token can update notion_ai. To change a Custom Agent’s credit limit, use Update an agent credit limit. Sending credit_limit to this endpoint returns a 400 validation_error.

Set the model

Set model to {"mode": "auto"} to let Notion choose, or to {"mode": "pinned", "id": "<model-id>"} to use one model. The model ID has to be one the token’s user can use, or the request returns a 400 validation_error. Changing a Custom Agent’s model also updates its published version.

Enable or disable a Custom Agent

Set status to "disabled" to turn off a running agent, or "active" to turn it back on. You can re-enable an agent only if an editor disabled it, through the API or in agent settings. An agent paused for another reason, such as reaching its credit limit, returns a 403 restricted_resource. So does re-enabling an agent while the workspace doesn’t allow Custom Agents. This replaces Update agent status, which is deprecated.

Authorizations

Authorization
string
header
required

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

Headers

Notion-Version
enum<string>
required

The API version to use for this request. The latest version is 2026-03-11.

Available options:
2026-03-11

Path Parameters

agent_id
required

The agent ID (a UUID), or notion_ai for the personal agent. Endpoint-specific restrictions still apply.

Body

application/json
status
enum<string>

Enable or disable the agent. Re-enabling works only for an agent an editor disabled, through the API or in agent settings.

Available options:
active,
disabled
name
string

The agent's display name.

description
string

The custom agent's short description. Use an empty string to clear it.

is_favorited
boolean

Whether the personal-access-token owner has this agent in their favorites.

model
object

The model selection. Use auto to let Notion choose, or pinned with an available public model ID.

Response

object
string
required

Always agent

Allowed value: "agent"
id
required
agent_type
enum<string>
required

What kind of agent this is: "notion_ai" is the personal agent; "custom_agent" is a standalone agent you chat with; "autofill_custom_agent" fills a database property; "external" runs through an external provider.

Available options:
notion_ai,
custom_agent,
autofill_custom_agent,
external
name
string
required
description
string | null
required
instructions_page_id
string<uuid> | null
required
icon
Emoji · object
required
model
object
required

The model the agent runs on: auto (Notion selects) or a pinned model.

connections
object[]
required

Integrations the agent is connected to (Notion, Slack, Discord, MCP servers, and other connectors), each with an account and per-target permissions.

Maximum array length: 100
status
enum<string>
required

"active" when the agent can run; "disabled" when it is paused (see pause_reason); "deleted" when it has been removed.

Available options:
active,
disabled,
deleted
pause_reason
enum<string> | null
required

Why the agent is paused when status is "disabled" (e.g. "credit_limit", "disabled_from_workspace_settings"); null when active.

Available options:
run_limit,
credit_limit,
runaway_credit_usage,
workspace_credit_limit,
owner_allowance_limit,
failure_limit,
mark_session_failed_autopause,
disabled_from_workspace_settings,
disabled_from_workspace_settings_but_resumable,
disabled_from_api,
disabled_from_agent_settings,
disabled_due_to_no_members_with_access,
disabled_due_to_lack_of_editors,
disabled_by_notion,
internal_error,
needs_user_review,
tool_unavailable
created_by
object | null
required
version
object | null
required
agent_version
object | null
required
has_unpublished_changes
required

Whether the draft has edits not yet in the published version, or "hidden" when the caller lacks edit access to the agent.

last_run_time
required

ISO 8601 timestamp of the agent's most recent run, null if it has never run, or "hidden" when the caller lacks edit access to the agent.

Pattern: ^\d{4}-\d{2}-\d{2}T
last_run_at
required

ISO 8601 timestamp of the agent's most recent run, null if it has never run, or "hidden" when the caller lacks edit access to the agent.

Pattern: ^\d{4}-\d{2}-\d{2}T
credit_limit
required

The per-agent credit limit that applies to this agent, null when uncapped, or "hidden" when the caller lacks full access to the agent. This is the effective limit computed at runtime, folding in both the agent's own limit and any workspace-admin default.

Required range: x >= 0
triggers
object[]
required

The agent's configured triggers, each with a machine type, an enabled flag, and (for recurrence triggers) a structured schedule.

Maximum array length: 100
is_favorited
boolean | null
required

Whether this agent is in the caller's personal favorites, or null when the caller has no personal favorites scope.

created_time
string<date-time>

Date and time when this agent was created.

last_edited_time
string<date-time>

Date and time when this agent was last edited.

instructions
string | null

The agent's inline instructions when verbose=true, or null when its instructions are stored on a page.