Notion: Sessions schemas
11 Notion schemas with complete fields and constraints.
← Sessions operations · All schemas
Query session events — request body — body / filter / property: created at
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
property | string | Required within parent | One of: created_at |
timestamp | object | Required within parent | Additional keys: not allowed |
timestamp.after | string | Optional | Format: date-time |
timestamp.before | string | Optional | Format: date-time |
timestamp.equals | string | Optional | Format: date-time |
timestamp.on_or_after | string | Optional | Format: date-time |
timestamp.on_or_before | string | Optional | Format: date-time |
Query session events — request body — body / filter / property: type
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
event_type | object | Required within parent | Additional keys: not allowed |
event_type.equals | string | Optional | One of: user.message, agent.message, agent.thinking, agent.tool_use, agent.tool_result, session.status |
event_type.in | array | Optional | |
event_type.in[] | string | Each item | One of: user.message, agent.message, agent.thinking, agent.tool_use, agent.tool_result, session.status |
property | string | Required within parent | One of: type |
Query session events — request body — body filter or or item and
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
and | array | Required within parent | |
and[] | JSON | Each item | |
and[] (oneOf 1) | object | Alternative | Additional keys: not allowed |
and[] (oneOf 1).property | string | Required within parent | One of: id |
and[] (oneOf 1).string | object | Required within parent | Additional keys: not allowed |
and[] (oneOf 1).string.equals | string | Required within parent | |
and[] (oneOf 2) | Model | Alternative | Expand Query session events — request body — body / filter / property: type |
and[] (oneOf 3) | object | Alternative | Additional keys: not allowed |
and[] (oneOf 3).number | object | Required within parent | Additional keys: not allowed |
and[] (oneOf 3).number.greater_than | number | Optional | |
and[] (oneOf 3).number.greater_than_or_equal_to | number | Optional | |
and[] (oneOf 3).number.less_than | number | Optional | |
and[] (oneOf 3).number.less_than_or_equal_to | number | Optional | |
and[] (oneOf 3).property | string | Required within parent | One of: sequence |
and[] (oneOf 4) | Model | Alternative | Expand Query session events — request body — body / filter / property: created at |
and[] (oneOf 5) | Model | Alternative | Expand Query session events — request body — body filter or or item or or item and |
and[] (oneOf 6) | Model | Alternative | Expand Query session events — request body — body filter or or item or or item or |
Referenced models: Query session events — request body — body filter or or item or or item and, Query session events — request body — body filter or or item or or item or, Query session events — request body — body / filter / property: created at, Query session events — request body — body / filter / property: type
Query session events — request body — body filter or or item or
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
or | array | Required within parent | |
or[] | JSON | Each item | |
or[] (oneOf 1) | object | Alternative | Additional keys: not allowed |
or[] (oneOf 1).property | string | Required within parent | One of: id |
or[] (oneOf 1).string | object | Required within parent | Additional keys: not allowed |
or[] (oneOf 1).string.equals | string | Required within parent | |
or[] (oneOf 2) | Model | Alternative | Expand Query session events — request body — body / filter / property: type |
or[] (oneOf 3) | object | Alternative | Additional keys: not allowed |
or[] (oneOf 3).number | object | Required within parent | Additional keys: not allowed |
or[] (oneOf 3).number.greater_than | number | Optional | |
or[] (oneOf 3).number.greater_than_or_equal_to | number | Optional | |
or[] (oneOf 3).number.less_than | number | Optional | |
or[] (oneOf 3).number.less_than_or_equal_to | number | Optional | |
or[] (oneOf 3).property | string | Required within parent | One of: sequence |
or[] (oneOf 4) | Model | Alternative | Expand Query session events — request body — body / filter / property: created at |
or[] (oneOf 5) | Model | Alternative | Expand Query session events — request body — body filter or or item or or item and |
or[] (oneOf 6) | Model | Alternative | Expand Query session events — request body — body filter or or item or or item or |
Referenced models: Query session events — request body — body filter or or item or or item and, Query session events — request body — body filter or or item or or item or, Query session events — request body — body / filter / property: created at, Query session events — request body — body / filter / property: type
Query session events — request body — body filter or or item or or item and
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
and | array | Required within parent | |
and[] | JSON | Each item | |
and[] (oneOf 1) | object | Alternative | Additional keys: not allowed |
and[] (oneOf 1).property | string | Required within parent | One of: id |
and[] (oneOf 1).string | object | Required within parent | Additional keys: not allowed |
and[] (oneOf 1).string.equals | string | Required within parent | |
and[] (oneOf 2) | Model | Alternative | Expand Query session events — request body — body / filter / property: type |
and[] (oneOf 3) | object | Alternative | Additional keys: not allowed |
and[] (oneOf 3).number | object | Required within parent | Additional keys: not allowed |
and[] (oneOf 3).number.greater_than | number | Optional | |
and[] (oneOf 3).number.greater_than_or_equal_to | number | Optional | |
and[] (oneOf 3).number.less_than | number | Optional | |
and[] (oneOf 3).number.less_than_or_equal_to | number | Optional | |
and[] (oneOf 3).property | string | Required within parent | One of: sequence |
and[] (oneOf 4) | Model | Alternative | Expand Query session events — request body — body / filter / property: created at |
Referenced models: Query session events — request body — body / filter / property: created at, Query session events — request body — body / filter / property: type
Query session events — request body — body filter or or item or or item or
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
or | array | Required within parent | |
or[] | JSON | Each item | |
or[] (oneOf 1) | object | Alternative | Additional keys: not allowed |
or[] (oneOf 1).property | string | Required within parent | One of: id |
or[] (oneOf 1).string | object | Required within parent | Additional keys: not allowed |
or[] (oneOf 1).string.equals | string | Required within parent | |
or[] (oneOf 2) | Model | Alternative | Expand Query session events — request body — body / filter / property: type |
or[] (oneOf 3) | object | Alternative | Additional keys: not allowed |
or[] (oneOf 3).number | object | Required within parent | Additional keys: not allowed |
or[] (oneOf 3).number.greater_than | number | Optional | |
or[] (oneOf 3).number.greater_than_or_equal_to | number | Optional | |
or[] (oneOf 3).number.less_than | number | Optional | |
or[] (oneOf 3).number.less_than_or_equal_to | number | Optional | |
or[] (oneOf 3).property | string | Required within parent | One of: sequence |
or[] (oneOf 4) | Model | Alternative | Expand Query session events — request body — body / filter / property: created at |
Referenced models: Query session events — request body — body / filter / property: created at, Query session events — request body — body / filter / property: type
Query sessions — request body — body / filter / property: agent id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
property | string | Required within parent | Filter sessions by agent_id. One of: agent_id |
string | object | Required within parent | An exact string comparison. Additional keys: not allowed |
string.equals | string | Required within parent | Return sessions with this exact value. |
Query sessions — request body — body / filter / property: created at, updated at
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
property | string | Required within parent | The session timestamp to compare. One of: created_at, updated_at |
timestamp | object | Required within parent | A timestamp range. Additional keys: not allowed |
timestamp.after | string | Optional | Return sessions after this time. Format: date-time |
timestamp.before | string | Optional | Return sessions before this time. Format: date-time |
timestamp.on_or_after | string | Optional | Return sessions at or after this time. Format: date-time |
timestamp.on_or_before | string | Optional | Return sessions at or before this time. Format: date-time |
Query sessions — request body — body / filter / property: id
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
property | string | Required within parent | Filter sessions by id. One of: id |
string | object | Required within parent | An exact string comparison. Additional keys: not allowed |
string.equals | string | Required within parent | Return sessions with this exact value. |
Query sessions — request body — body / filter / property: status
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
property | string | Required within parent | Filter sessions by status. One of: status |
status | object | Required within parent | A session status comparison. Additional keys: not allowed |
status.equals | string | Optional | Return sessions with this status. One of: queued, in_progress, requires_action, completed, failed, canceled, terminated |
status.in | array | Optional | Return sessions with any of these statuses. Maximum items: 7 |
status.in[] | string | Each item | One of: queued, in_progress, requires_action, completed, failed, canceled, terminated |
Query sessions — request body — body filter or or item
Referenced models: Query sessions — request body — body / filter / property: agent id, Query sessions — request body — body / filter / property: id, Query sessions — request body — body / filter / property: status, Query sessions — request body — body / filter / property: created at, updated at