archastro.platform.v1.resources.teams
1# Copyright (c) 2026 ArchAstro Inc. Licensed under the MIT License. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 7f84db90b859 4 5from __future__ import annotations 6 7import builtins 8from datetime import datetime 9from typing import Any, Literal, Required, TypedDict 10 11from pydantic import BaseModel, Field 12 13from ...runtime.http_client import HttpClient, SyncHttpClient 14from ...types.common import CustomObject 15from ...types.tasks import Task, TaskEnsureResult 16from ...types.teams import Team, TeamDeleteImpactResponse, TeamInvite, TeamMembership 17from ...types.threads import Thread 18 19 20class TeamCustomObjectCreateInput(TypedDict): 21 "Create a team custom object" 22 23 fields: dict[str, Any] 24 "Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`." 25 type: str 26 "Schema type identifier (`lookup_key`) that defines the object's fields and validation rules." 27 28 29class MemberCreateInput(TypedDict, total=False): 30 "Add a member to a team" 31 32 agent: str | None 33 "Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`." 34 role: str | None 35 'Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.' 36 user: str | None 37 "User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`." 38 39 40class MemberUpdateInput(TypedDict): 41 "Update a team member's role" 42 43 role: str 44 'New role to assign. One of `"owner"`, `"admin"`, or `"member"`.' 45 46 47class TeamTaskCreateInputTask(TypedDict, total=False): 48 description: str | None 49 "Optional long-form description or notes for the task. Supports plain text." 50 due_date: datetime | None 51 "Date and time by which the task should be completed (ISO 8601). Omit to create the task without a due date." 52 epic: str | None 53 "Optional free-form grouping label." 54 id: str | None 55 "Optional caller-generated task public ID (`tsk_...`). Persist it before creating a task when creation must survive a lost response. An existing ID returns 409 without modifying the task; read the task by ID to reconcile. Omit for a server-generated ID." 56 links: dict[str, Any] | None 57 "Arbitrary key-value map of named URLs or references associated with the task (e.g. external ticket links)." 58 metadata: dict[str, Any] | None 59 "Arbitrary key-value map for storing application-specific data alongside the task. Omit to create the task with no metadata." 60 name: Required[str] 61 "Human-readable title for the task." 62 owner_agent: str | None 63 "ID of the agent to assign as owner (`agi_...`). Mutually exclusive with `owner_user`; omit to leave the task unassigned." 64 owner_user: str | None 65 "ID of the user to assign as owner (`usr_...`). Mutually exclusive with `owner_agent`; omit to leave the task unassigned." 66 parent: str | None 67 "Create this task as a subtask of an existing top-level task (`tsk_...`). Subtasks nest exactly one level." 68 priority: int | None 69 "Priority level from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when omitted." 70 project_id: str | None 71 "Optional project ID (`prj_...`). Pass null to clear it." 72 source_id: str | None 73 "Source object identity (for example `ArchAstro/firstlanding`)." 74 source_scope: str | None 75 "Container of the work this task is about (for example `github.com`). Must be supplied with `source_type` and `source_id`." 76 source_type: str | None 77 "Kind of source object (for example `repository`)." 78 status: str | None 79 'Initial status for the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`. Defaults to `"open"` when omitted.' 80 tags: list[str] | None 81 "Labels for grouping and filtering (max 20, each up to 40 characters). Stored canonically: lowercase, trimmed, de-duplicated." 82 target_binary: str | None 83 "Binary that must run this work, as a lowercase identifier of 1-64 characters (letters, digits, `.`, `_`, `-`; for example `my-cli`). Must be supplied with `target_version`." 84 target_version: str | None 85 "Minimum semantic version of `target_binary` that can run this work (`MAJOR.MINOR.PATCH` with optional prerelease and build, no leading `v`). Must be supplied with `target_binary`." 86 thread: str | None 87 "Bind the task to a thread (`thr_...`) owned by the same team or user as the task. A bound task appears in that thread's task scope, exactly like a task filed from inside the conversation. Omit for a task not tied to a conversation." 88 89 90class TeamTaskCreateInput(TypedDict, total=False): 91 "Create a task for an owner" 92 93 agent: str | None 94 "Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner." 95 org: str | None 96 "Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team." 97 task: Required[TeamTaskCreateInputTask] 98 "Attributes for the task to create. `name` is required; all other fields are optional." 99 user: str | None 100 "User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call." 101 102 103class TeamTaskBySourceInput(TypedDict, total=False): 104 "Find or create a task by source" 105 106 agent: str | None 107 "Explicit acting agent for privileged callers." 108 description: str | None 109 "Initial task description." 110 epic: str | None 111 "Initial epic grouping." 112 name: Required[str] 113 "Initial task name." 114 org: str | None 115 "Explicit organization for privileged callers." 116 source_id: Required[str] 117 "Source identity, for example owner/repo#123." 118 source_scope: Required[str] 119 "Source scope, for example github." 120 source_type: Required[str] 121 "Source type, for example pull_request." 122 status: str | None 123 "Initial task status." 124 user: str | None 125 "User owner, or explicit acting user on a team route." 126 127 128class TeamThreadCreateInputThreadMembersItem(TypedDict): 129 id: str 130 "Public user (`usr_...`) or agent (`agt_...`) ID matching `type`." 131 type: Literal["user", "agent"] 132 "Member kind. Use `user` for a user ID or `agent` for an agent ID." 133 134 135class TeamThreadCreateInputThreadProfilePicture(TypedDict, total=False): 136 data: str | None 137 "Base64-encoded image bytes." 138 filename: str | None 139 "Original filename of the uploaded image, used for display and content-type inference." 140 mime_type: str | None 141 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.' 142 143 144class TeamThreadCreateInputThreadSettings(TypedDict, total=False): 145 agent_enabled: bool | None 146 "Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting." 147 148 149class TeamThreadCreateInputThread(TypedDict, total=False): 150 create_legacy_agent: bool | None 151 "When `true`, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model." 152 description: str | None 153 "Optional longer description of the thread's purpose. `null` if not provided." 154 is_unlisted: bool | None 155 "When `true`, the thread is hidden from the default thread list and accessible only by direct link or ID." 156 key: str | None 157 "Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization." 158 kind: Literal["personal", "feed"] | None 159 "Optional behavioral subtype. `personal` is accepted only for a user-owned thread and limits membership to that user and agents currently owned by them. `feed` is accepted for any owner and renders the thread as a post feed: message lists return top-level posts with their newest replies inline, and agent responses attach to the root post. Mirror kinds remain server-derived and cannot be selected by callers." 160 members: list[TeamThreadCreateInputThreadMembersItem] | None 161 "Users and agents to add atomically when the thread is created. Each target must pass the same authorization rules as a post-creation member add. Slack mirror threads reject non-empty caller-supplied rosters because their membership is sync-owned." 162 metadata: dict[str, Any] | None 163 "Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers." 164 muted: bool | None 165 "When `true`, push and in-app notifications for this thread are suppressed for the creating user." 166 org_id: str | None 167 "ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted." 168 profile_picture: TeamThreadCreateInputThreadProfilePicture | None 169 "Optional profile image for the thread, provided as a base64-encoded payload." 170 settings: TeamThreadCreateInputThreadSettings | None 171 "Configuration overrides for the thread, such as AI model selection and context window settings." 172 slug: str | None 173 "Optional URL-safe identifier. Derived from the title when omitted and unique within the thread owner." 174 title: str | None 175 "Display name for the thread. `null` if omitted, which causes the thread to be untitled." 176 visibility: Literal["team", "restricted", "private", "org"] | None 177 "Thread visibility. A team-owned thread with members must explicitly use `restricted` or `private`. User- and agent-owned threads with members default to `private` and reject every other value. `org` is only valid on an organization-owned thread with no team, user, or agent owner." 178 179 180class TeamThreadCreateInput(TypedDict, total=False): 181 "Create a thread for a team" 182 183 skip_welcome_message: bool | None 184 "When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`." 185 thread: Required[TeamThreadCreateInputThread] 186 "Attributes for the new thread. See ThreadCreateParams for available fields." 187 188 189class TeamCreateInputAclAddItem(TypedDict, total=False): 190 actions: Required[list[str]] 191 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 192 principal: str | None 193 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 194 principal_type: Required[str] 195 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 196 197 198class TeamCreateInputAclGrantsItem(TypedDict, total=False): 199 actions: Required[list[str]] 200 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 201 principal: str | None 202 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 203 principal_type: Required[str] 204 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 205 206 207class TeamCreateInputAclRemoveItem(TypedDict, total=False): 208 principal: str | None 209 'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.' 210 principal_type: Required[str] 211 'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 212 213 214class TeamCreateInputAcl(TypedDict, total=False): 215 add: list[TeamCreateInputAclAddItem] | None 216 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 217 grants: list[TeamCreateInputAclGrantsItem] | None 218 "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`." 219 remove: list[TeamCreateInputAclRemoveItem] | None 220 "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`." 221 222 223class TeamCreateInput(TypedDict, total=False): 224 "Create a team" 225 226 acl: TeamCreateInputAcl | None 227 "Access control configuration for the team. Controls who can discover and join the team." 228 description: str | None 229 "Optional human-readable description of the team's purpose." 230 idempotency_key: str | None 231 "Optional retry key. Replays in the same app, organization, and sandbox return the original team." 232 metadata: dict[str, Any] | None 233 "Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings." 234 name: Required[str] 235 "Display name for the team." 236 org: str | None 237 "Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation." 238 239 240class TeamJoinByCodeInput(TypedDict, total=False): 241 "Join a team with an invite code" 242 243 agent: str | None 244 "Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session." 245 invite_code: str | None 246 "12-character invite code alias for `join_code` accepted for backwards compatibility." 247 join_code: str | None 248 "12-character invite code that identifies the team. Mutually usable with `invite_code`." 249 user: str | None 250 "User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied." 251 252 253class TeamUpdateInputAclAddItem(TypedDict, total=False): 254 actions: Required[list[str]] 255 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 256 principal: str | None 257 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 258 principal_type: Required[str] 259 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 260 261 262class TeamUpdateInputAclGrantsItem(TypedDict, total=False): 263 actions: Required[list[str]] 264 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 265 principal: str | None 266 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 267 principal_type: Required[str] 268 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 269 270 271class TeamUpdateInputAclRemoveItem(TypedDict, total=False): 272 principal: str | None 273 'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.' 274 principal_type: Required[str] 275 'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 276 277 278class TeamUpdateInputAcl(TypedDict, total=False): 279 add: list[TeamUpdateInputAclAddItem] | None 280 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 281 grants: list[TeamUpdateInputAclGrantsItem] | None 282 "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`." 283 remove: list[TeamUpdateInputAclRemoveItem] | None 284 "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`." 285 286 287class TeamUpdateInputProfilePicture(TypedDict, total=False): 288 data: str | None 289 "Base64-encoded binary image data." 290 filename: str | None 291 "Original filename of the image, used for storage metadata." 292 mime_type: str | None 293 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.' 294 295 296class TeamUpdateInput(TypedDict, total=False): 297 "Update a team" 298 299 acl: TeamUpdateInputAcl | None 300 "New access control configuration for the team. Replaces the existing ACL." 301 description: str | None 302 "New human-readable description of the team's purpose." 303 metadata: dict[str, Any] | None 304 "Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely." 305 name: str | None 306 "New display name for the team." 307 profile_picture: TeamUpdateInputProfilePicture | None 308 "New profile picture for the team. Provide this object to upload and replace the current picture." 309 310 311class TeamJoinInput(TypedDict, total=False): 312 "Join a team" 313 314 agent: str | None 315 "Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team." 316 email: str | None 317 "Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role." 318 user: str | None 319 "User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role." 320 321 322class TeamCustomObjectListResponseDataItemAclAddItem(BaseModel): 323 actions: list[str] = Field( 324 ..., 325 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 326 ) 327 principal: str | None = Field( 328 default=None, 329 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 330 ) 331 principal_type: str = Field( 332 ..., 333 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 334 ) 335 336 337class TeamCustomObjectListResponseDataItemAclGrantsItem(BaseModel): 338 actions: list[str] = Field( 339 ..., 340 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 341 ) 342 principal: str | None = Field( 343 default=None, 344 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 345 ) 346 principal_type: str = Field( 347 ..., 348 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 349 ) 350 351 352class TeamCustomObjectListResponseDataItemAclRemoveItem(BaseModel): 353 principal: str | None = Field( 354 default=None, 355 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 356 ) 357 principal_type: str = Field( 358 ..., 359 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 360 ) 361 362 363class TeamCustomObjectListResponseDataItemAcl(BaseModel): 364 add: list[TeamCustomObjectListResponseDataItemAclAddItem] | None = Field( 365 default=None, 366 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 367 ) 368 grants: list[TeamCustomObjectListResponseDataItemAclGrantsItem] | None = Field( 369 default=None, 370 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 371 ) 372 remove: list[TeamCustomObjectListResponseDataItemAclRemoveItem] | None = Field( 373 default=None, 374 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 375 ) 376 377 378class TeamCustomObjectListResponseDataItem(BaseModel): 379 acl: TeamCustomObjectListResponseDataItemAcl | None = Field( 380 default=None, 381 description="Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; `null` for everyone else.", 382 ) 383 agent: str | None = Field( 384 default=None, 385 description="ID of the agent that owns this object (`agt_...`). `null` for other ownership types.", 386 ) 387 created_at: datetime | None = Field( 388 default=None, description="When the custom object was created (ISO 8601)." 389 ) 390 expires_at: datetime | None = Field( 391 default=None, description="Absolute expiry time (RFC 3339). Null when no expiry is set." 392 ) 393 fields: dict[str, Any] | None = Field( 394 default=None, 395 description="Map of field names to their current values as defined by the object's schema type.", 396 ) 397 id: str = Field(..., description="Unique identifier for the custom object (`cobj_...`).") 398 org: str | None = Field( 399 default=None, description="ID of the organization this object belongs to (`org_...`)." 400 ) 401 row_key: str | None = Field( 402 default=None, 403 description="An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set.", 404 ) 405 sandbox: str | None = Field( 406 default=None, 407 description="ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects.", 408 ) 409 schema_type: str | None = Field( 410 default=None, 411 description="The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set.", 412 ) 413 team: str | None = Field( 414 default=None, 415 description="ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped.", 416 ) 417 updated_at: datetime | None = Field( 418 default=None, 419 description="When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation.", 420 ) 421 user: str | None = Field( 422 default=None, 423 description="ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped.", 424 ) 425 version: int | None = Field( 426 default=None, 427 description="Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.", 428 ) 429 430 431class TeamCustomObjectListResponse(BaseModel): 432 """ 433 Successful response 434 """ 435 436 data: list[TeamCustomObjectListResponseDataItem] = Field( 437 ..., description="Array of custom object records for the current page." 438 ) 439 meta: dict[str, Any] | None = Field( 440 default=None, description="Pagination metadata for the response." 441 ) 442 443 444class MemberListResponseDataItemAgentAclAddItem(BaseModel): 445 actions: list[str] = Field( 446 ..., 447 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 448 ) 449 principal: str | None = Field( 450 default=None, 451 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 452 ) 453 principal_type: str = Field( 454 ..., 455 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 456 ) 457 458 459class MemberListResponseDataItemAgentAclGrantsItem(BaseModel): 460 actions: list[str] = Field( 461 ..., 462 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 463 ) 464 principal: str | None = Field( 465 default=None, 466 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 467 ) 468 principal_type: str = Field( 469 ..., 470 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 471 ) 472 473 474class MemberListResponseDataItemAgentAclRemoveItem(BaseModel): 475 principal: str | None = Field( 476 default=None, 477 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 478 ) 479 principal_type: str = Field( 480 ..., 481 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 482 ) 483 484 485class MemberListResponseDataItemAgentAcl(BaseModel): 486 add: list[MemberListResponseDataItemAgentAclAddItem] | None = Field( 487 default=None, 488 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 489 ) 490 grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = Field( 491 default=None, 492 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 493 ) 494 remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = Field( 495 default=None, 496 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 497 ) 498 499 500class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo(BaseModel): 501 file: str | None = Field( 502 default=None, 503 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 504 ) 505 height: int | None = Field( 506 default=None, description="Height of the image in pixels. `null` if not known." 507 ) 508 media: str | None = Field( 509 default=None, 510 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 511 ) 512 mime_type: str | None = Field( 513 default=None, 514 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 515 ) 516 refresh_url: str | None = Field( 517 default=None, 518 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 519 ) 520 url: str | None = Field( 521 default=None, 522 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 523 ) 524 width: int | None = Field( 525 default=None, description="Width of the image in pixels. `null` if not known." 526 ) 527 528 529class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 530 BaseModel 531): 532 description: str | None = Field( 533 default=None, 534 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 535 ) 536 name: str = Field( 537 ..., 538 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 539 ) 540 required: bool = Field( 541 ..., 542 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 543 ) 544 type: str = Field( 545 ..., 546 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 547 ) 548 549 550class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills( 551 BaseModel 552): 553 participants: dict[str, Any] | None = Field( 554 default=None, 555 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 556 ) 557 payload: dict[str, Any] | None = Field( 558 default=None, 559 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 560 ) 561 562 563class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract( 564 BaseModel 565): 566 input_schema: dict[str, Any] | None = Field( 567 default=None, 568 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 569 ) 570 participants: ( 571 list[ 572 MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem 573 ] 574 | None 575 ) = Field( 576 default=None, 577 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 578 ) 579 prefills: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 580 ..., 581 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 582 ) 583 584 585class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails(BaseModel): 586 automation_type: str | None = Field( 587 default=None, 588 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 589 ) 590 invoke_contract: ( 591 MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract 592 | None 593 ) = Field( 594 default=None, 595 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 596 ) 597 type: Literal["automation"] = Field( 598 default="automation", 599 description="Template-details discriminator. Always `automation` for this variant.", 600 ) 601 602 603class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem(BaseModel): 604 description: str | None = Field( 605 default=None, 606 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 607 ) 608 details: ( 609 MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails | None 610 ) = Field( 611 default=None, 612 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 613 ) 614 display_name: str | None = Field( 615 default=None, 616 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 617 ) 618 id: str | None = Field( 619 default=None, 620 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 621 ) 622 kind: str = Field( 623 ..., 624 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 625 ) 626 lookup_key: str | None = Field( 627 default=None, 628 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 629 ) 630 name: str | None = Field( 631 default=None, 632 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 633 ) 634 readme_url: str | None = Field( 635 default=None, 636 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 637 ) 638 virtual_path: str | None = Field( 639 default=None, 640 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 641 ) 642 643 644class MemberListResponseDataItemAgentSourceSolutionCurrentSolution(BaseModel): 645 category_keys: list[str] | None = Field( 646 default=None, 647 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 648 ) 649 created_at: str | None = Field( 650 default=None, description="When the Solution config was first imported (ISO 8601)." 651 ) 652 description: str | None = Field( 653 default=None, 654 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 655 ) 656 events: dict[str, Any] | None = Field( 657 default=None, 658 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 659 ) 660 id: str = Field(..., description="Solution config ID (`cfg_...`).") 661 image_url: str | None = Field( 662 default=None, 663 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 664 ) 665 installed_config_ids: list[str] = Field( 666 ..., 667 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 668 ) 669 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 670 latest_solution: str | None = Field( 671 default=None, 672 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 673 ) 674 latest_version: str | None = Field( 675 default=None, 676 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 677 ) 678 lookup_key: str | None = Field( 679 default=None, 680 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 681 ) 682 metadata: dict[str, Any] | None = Field( 683 default=None, 684 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 685 ) 686 name: str | None = Field( 687 default=None, 688 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 689 ) 690 org: str | None = Field( 691 default=None, 692 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 693 ) 694 org_logo: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo | None = Field( 695 default=None, 696 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 697 ) 698 org_name: str | None = Field( 699 default=None, 700 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 701 ) 702 org_slug: str | None = Field( 703 default=None, 704 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 705 ) 706 owners: list[str] = Field( 707 ..., 708 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 709 ) 710 readme_url: str | None = Field( 711 default=None, 712 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 713 ) 714 screenshot_urls: list[str] | None = Field( 715 default=None, 716 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 717 ) 718 solution_id: str | None = Field( 719 default=None, 720 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 721 ) 722 solution_version: str | None = Field( 723 default=None, 724 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 725 ) 726 tag_keys: list[str] | None = Field( 727 default=None, 728 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 729 ) 730 template_kind: str | None = Field( 731 default=None, 732 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 733 ) 734 templates: list[MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem] = ( 735 Field( 736 ..., 737 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 738 ) 739 ) 740 updated_at: str | None = Field( 741 default=None, description="When the Solution config was last modified (ISO 8601)." 742 ) 743 upgrade_available: bool = Field( 744 ..., 745 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 746 ) 747 virtual_path: str | None = Field( 748 default=None, 749 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 750 ) 751 752 753class MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo(BaseModel): 754 file: str | None = Field( 755 default=None, 756 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 757 ) 758 height: int | None = Field( 759 default=None, description="Height of the image in pixels. `null` if not known." 760 ) 761 media: str | None = Field( 762 default=None, 763 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 764 ) 765 mime_type: str | None = Field( 766 default=None, 767 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 768 ) 769 refresh_url: str | None = Field( 770 default=None, 771 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 772 ) 773 url: str | None = Field( 774 default=None, 775 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 776 ) 777 width: int | None = Field( 778 default=None, description="Width of the image in pixels. `null` if not known." 779 ) 780 781 782class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 783 BaseModel 784): 785 description: str | None = Field( 786 default=None, 787 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 788 ) 789 name: str = Field( 790 ..., 791 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 792 ) 793 required: bool = Field( 794 ..., 795 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 796 ) 797 type: str = Field( 798 ..., 799 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 800 ) 801 802 803class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills( 804 BaseModel 805): 806 participants: dict[str, Any] | None = Field( 807 default=None, 808 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 809 ) 810 payload: dict[str, Any] | None = Field( 811 default=None, 812 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 813 ) 814 815 816class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract( 817 BaseModel 818): 819 input_schema: dict[str, Any] | None = Field( 820 default=None, 821 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 822 ) 823 participants: ( 824 list[ 825 MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem 826 ] 827 | None 828 ) = Field( 829 default=None, 830 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 831 ) 832 prefills: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 833 ..., 834 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 835 ) 836 837 838class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails(BaseModel): 839 automation_type: str | None = Field( 840 default=None, 841 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 842 ) 843 invoke_contract: ( 844 MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract 845 | None 846 ) = Field( 847 default=None, 848 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 849 ) 850 type: Literal["automation"] = Field( 851 default="automation", 852 description="Template-details discriminator. Always `automation` for this variant.", 853 ) 854 855 856class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(BaseModel): 857 description: str | None = Field( 858 default=None, 859 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 860 ) 861 details: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails | None = ( 862 Field( 863 default=None, 864 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 865 ) 866 ) 867 display_name: str | None = Field( 868 default=None, 869 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 870 ) 871 id: str | None = Field( 872 default=None, 873 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 874 ) 875 kind: str = Field( 876 ..., 877 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 878 ) 879 lookup_key: str | None = Field( 880 default=None, 881 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 882 ) 883 name: str | None = Field( 884 default=None, 885 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 886 ) 887 readme_url: str | None = Field( 888 default=None, 889 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 890 ) 891 virtual_path: str | None = Field( 892 default=None, 893 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 894 ) 895 896 897class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel): 898 category_keys: list[str] | None = Field( 899 default=None, 900 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 901 ) 902 created_at: str | None = Field( 903 default=None, description="When the Solution config was first imported (ISO 8601)." 904 ) 905 description: str | None = Field( 906 default=None, 907 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 908 ) 909 events: dict[str, Any] | None = Field( 910 default=None, 911 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 912 ) 913 id: str = Field(..., description="Solution config ID (`cfg_...`).") 914 image_url: str | None = Field( 915 default=None, 916 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 917 ) 918 installed_config_ids: list[str] = Field( 919 ..., 920 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 921 ) 922 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 923 latest_solution: str | None = Field( 924 default=None, 925 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 926 ) 927 latest_version: str | None = Field( 928 default=None, 929 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 930 ) 931 lookup_key: str | None = Field( 932 default=None, 933 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 934 ) 935 metadata: dict[str, Any] | None = Field( 936 default=None, 937 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 938 ) 939 name: str | None = Field( 940 default=None, 941 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 942 ) 943 org: str | None = Field( 944 default=None, 945 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 946 ) 947 org_logo: MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo | None = Field( 948 default=None, 949 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 950 ) 951 org_name: str | None = Field( 952 default=None, 953 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 954 ) 955 org_slug: str | None = Field( 956 default=None, 957 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 958 ) 959 owners: list[str] = Field( 960 ..., 961 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 962 ) 963 readme_url: str | None = Field( 964 default=None, 965 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 966 ) 967 screenshot_urls: list[str] | None = Field( 968 default=None, 969 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 970 ) 971 solution_id: str | None = Field( 972 default=None, 973 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 974 ) 975 solution_version: str | None = Field( 976 default=None, 977 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 978 ) 979 tag_keys: list[str] | None = Field( 980 default=None, 981 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 982 ) 983 template_kind: str | None = Field( 984 default=None, 985 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 986 ) 987 templates: list[MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem] = Field( 988 ..., 989 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 990 ) 991 updated_at: str | None = Field( 992 default=None, description="When the Solution config was last modified (ISO 8601)." 993 ) 994 upgrade_available: bool = Field( 995 ..., 996 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 997 ) 998 virtual_path: str | None = Field( 999 default=None, 1000 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 1001 ) 1002 1003 1004class MemberListResponseDataItemAgentSourceSolutionTemplate(BaseModel): 1005 created_at: datetime | None = Field( 1006 default=None, description="When this template config was created (ISO 8601)." 1007 ) 1008 description: str | None = Field( 1009 default=None, 1010 description="Description of the template from the config body. `null` if the current version has no `description` field.", 1011 ) 1012 display_name: str | None = Field( 1013 default=None, 1014 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 1015 ) 1016 id: str = Field(..., description="Template config ID (`cfg_...`).") 1017 kind: str = Field( 1018 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 1019 ) 1020 lookup_key: str | None = Field( 1021 default=None, 1022 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 1023 ) 1024 name: str | None = Field( 1025 default=None, 1026 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 1027 ) 1028 updated_at: datetime | None = Field( 1029 default=None, description="When this template config was last modified (ISO 8601)." 1030 ) 1031 virtual_path: str | None = Field( 1032 default=None, 1033 description="Virtual filesystem path for this template config. `null` if not set.", 1034 ) 1035 1036 1037class MemberListResponseDataItemAgentSourceSolution(BaseModel): 1038 current_solution: MemberListResponseDataItemAgentSourceSolutionCurrentSolution | None = Field( 1039 default=None, 1040 description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.", 1041 ) 1042 solution: MemberListResponseDataItemAgentSourceSolutionSolution = Field( 1043 ..., 1044 description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.", 1045 ) 1046 template: MemberListResponseDataItemAgentSourceSolutionTemplate = Field( 1047 ..., 1048 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 1049 ) 1050 1051 1052class MemberListResponseDataItemAgent(BaseModel): 1053 acl: MemberListResponseDataItemAgentAcl | None = Field( 1054 default=None, 1055 description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.", 1056 ) 1057 app: str | None = Field( 1058 default=None, description="ID of the application that owns this agent (`dap_...`)." 1059 ) 1060 created_at: str | None = Field( 1061 default=None, description="When the agent was created (ISO 8601)." 1062 ) 1063 default_model: str | None = Field( 1064 default=None, 1065 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 1066 ) 1067 description: str | None = Field( 1068 default=None, 1069 description="Human-readable description of what the agent does. `null` if not set.", 1070 ) 1071 email: str | None = Field( 1072 default=None, 1073 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 1074 ) 1075 id: str = Field(..., description="Agent ID (`agi_...`).") 1076 identity: str | None = Field( 1077 default=None, 1078 description="System-level identity prompt that shapes the agent's persona and behavior.", 1079 ) 1080 last_applied_template_config: str | None = Field( 1081 default=None, 1082 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 1083 ) 1084 lookup_key: str | None = Field( 1085 default=None, 1086 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 1087 ) 1088 metadata: dict[str, Any] | None = Field( 1089 default=None, 1090 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 1091 ) 1092 name: str | None = Field( 1093 default=None, description="Human-readable display name for the agent. `null` if not set." 1094 ) 1095 org: str | None = Field( 1096 default=None, 1097 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 1098 ) 1099 org_name: str | None = Field( 1100 default=None, 1101 description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.", 1102 ) 1103 originator: str | None = Field( 1104 default=None, 1105 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 1106 ) 1107 phone_number: str | None = Field( 1108 default=None, 1109 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 1110 ) 1111 sandbox: str | None = Field( 1112 default=None, 1113 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 1114 ) 1115 source_solution: MemberListResponseDataItemAgentSourceSolution | None = Field( 1116 default=None, 1117 description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.", 1118 ) 1119 team: str | None = Field( 1120 default=None, 1121 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 1122 ) 1123 template_upgrade_available: bool | None = Field( 1124 default=None, 1125 description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).", 1126 ) 1127 updated_at: str | None = Field( 1128 default=None, description="When the agent was last modified (ISO 8601)." 1129 ) 1130 user: str | None = Field( 1131 default=None, 1132 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 1133 ) 1134 1135 1136class MemberListResponseDataItemProfilePicture(BaseModel): 1137 file: str | None = Field( 1138 default=None, 1139 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1140 ) 1141 height: int | None = Field( 1142 default=None, description="Height of the image in pixels. `null` if not known." 1143 ) 1144 media: str | None = Field( 1145 default=None, 1146 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1147 ) 1148 mime_type: str | None = Field( 1149 default=None, 1150 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1151 ) 1152 refresh_url: str | None = Field( 1153 default=None, 1154 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1155 ) 1156 url: str | None = Field( 1157 default=None, 1158 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1159 ) 1160 width: int | None = Field( 1161 default=None, description="Width of the image in pixels. `null` if not known." 1162 ) 1163 1164 1165class MemberListResponseDataItemUser(BaseModel): 1166 alias: str | None = Field( 1167 default=None, description="Short handle or alias for the user. `null` if not set." 1168 ) 1169 app: str | None = Field( 1170 default=None, 1171 description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.", 1172 ) 1173 app_name: str | None = Field( 1174 default=None, 1175 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 1176 ) 1177 created_by_agent_user: str | None = Field( 1178 default=None, 1179 description="Agent user that created this account (`usr_...`). `null` unless an agent created it.", 1180 ) 1181 created_by_developer: str | None = Field( 1182 default=None, 1183 description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.", 1184 ) 1185 created_by_org: str | None = Field( 1186 default=None, 1187 description="Org of the principal that created this user (`org_...`). `null` on legacy rows.", 1188 ) 1189 created_by_team: str | None = Field( 1190 default=None, 1191 description="Team that created this user (`tem_...`). `null` unless created as a team.", 1192 ) 1193 created_by_user: str | None = Field( 1194 default=None, 1195 description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.", 1196 ) 1197 email: str | None = Field(default=None, description="Email address of the user.") 1198 id: str = Field(..., description="User ID (`usr_...`).") 1199 is_system_user: bool | None = Field( 1200 default=None, 1201 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 1202 ) 1203 metadata: dict[str, Any] | None = Field( 1204 default=None, 1205 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 1206 ) 1207 name: str | None = Field( 1208 default=None, 1209 description="Full display name of the user. `null` if the user has not set a name.", 1210 ) 1211 org: str | None = Field( 1212 default=None, 1213 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 1214 ) 1215 org_name: str | None = Field( 1216 default=None, 1217 description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 1218 ) 1219 org_role: str | None = Field( 1220 default=None, 1221 description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.', 1222 ) 1223 org_slug: str | None = Field( 1224 default=None, 1225 description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 1226 ) 1227 sandbox: str | None = Field( 1228 default=None, 1229 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 1230 ) 1231 sandbox_name: str | None = Field( 1232 default=None, 1233 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 1234 ) 1235 1236 1237class MemberListResponseDataItem(BaseModel): 1238 agent: MemberListResponseDataItemAgent | None = Field( 1239 default=None, 1240 description="The agent associated with this membership, as an expanded agent object. `null` when the member is a user, the type is unknown, or the association is not preloaded.", 1241 ) 1242 created_at: datetime | None = Field( 1243 default=None, description="When this membership record was created (ISO 8601)." 1244 ) 1245 id: str = Field(..., description="Team membership ID (`tmb_...`).") 1246 joined_at: datetime | None = Field( 1247 default=None, description="When the principal joined the team (ISO 8601)." 1248 ) 1249 metadata: dict[str, Any] | None = Field( 1250 default=None, 1251 description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.", 1252 ) 1253 name: str | None = Field( 1254 default=None, 1255 description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.", 1256 ) 1257 profile_picture: MemberListResponseDataItemProfilePicture | None = Field( 1258 default=None, 1259 description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.", 1260 ) 1261 role: str | None = Field( 1262 default=None, 1263 description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.', 1264 ) 1265 team: dict[str, Any] | None = Field( 1266 default=None, 1267 description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.", 1268 ) 1269 type: str | None = Field( 1270 default=None, 1271 description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.', 1272 ) 1273 updated_at: datetime | None = Field( 1274 default=None, description="When this membership record was last updated (ISO 8601)." 1275 ) 1276 user: MemberListResponseDataItemUser | None = Field( 1277 default=None, 1278 description="The user associated with this membership, as an expanded user object. `null` when the member is an agent, the type is unknown, or the association is not preloaded.", 1279 ) 1280 1281 1282class MemberListResponse(BaseModel): 1283 """ 1284 Successful response 1285 """ 1286 1287 data: list[MemberListResponseDataItem] = Field( 1288 ..., description="Array of team membership objects, including both user and agent members." 1289 ) 1290 1291 1292class TeamTaskListResponseDataItemCreatedByActorProfilePicture(BaseModel): 1293 file: str | None = Field( 1294 default=None, 1295 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1296 ) 1297 height: int | None = Field( 1298 default=None, description="Height of the image in pixels. `null` if not known." 1299 ) 1300 media: str | None = Field( 1301 default=None, 1302 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1303 ) 1304 mime_type: str | None = Field( 1305 default=None, 1306 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1307 ) 1308 refresh_url: str | None = Field( 1309 default=None, 1310 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1311 ) 1312 url: str | None = Field( 1313 default=None, 1314 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1315 ) 1316 width: int | None = Field( 1317 default=None, description="Width of the image in pixels. `null` if not known." 1318 ) 1319 1320 1321class TeamTaskListResponseDataItemCreatedByActor(BaseModel): 1322 alias: str | None = Field( 1323 default=None, 1324 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1325 ) 1326 id: str | None = Field( 1327 default=None, 1328 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1329 ) 1330 name: str | None = Field( 1331 default=None, 1332 description="Display name of the actor shown in the UI. `null` if no name is set.", 1333 ) 1334 profile_picture: TeamTaskListResponseDataItemCreatedByActorProfilePicture | None = Field( 1335 default=None, 1336 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1337 ) 1338 1339 1340class TeamTaskListResponseDataItemCurrentLease(BaseModel): 1341 expires_at: datetime = Field( 1342 ..., description="Server-calculated lease expiry in ISO 8601 format." 1343 ) 1344 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 1345 session_name: str = Field( 1346 ..., description="Display name supplied by the coding session that holds the lease." 1347 ) 1348 1349 1350class TeamTaskListResponseDataItemOwnerActorProfilePicture(BaseModel): 1351 file: str | None = Field( 1352 default=None, 1353 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1354 ) 1355 height: int | None = Field( 1356 default=None, description="Height of the image in pixels. `null` if not known." 1357 ) 1358 media: str | None = Field( 1359 default=None, 1360 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1361 ) 1362 mime_type: str | None = Field( 1363 default=None, 1364 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1365 ) 1366 refresh_url: str | None = Field( 1367 default=None, 1368 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1369 ) 1370 url: str | None = Field( 1371 default=None, 1372 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1373 ) 1374 width: int | None = Field( 1375 default=None, description="Width of the image in pixels. `null` if not known." 1376 ) 1377 1378 1379class TeamTaskListResponseDataItemOwnerActor(BaseModel): 1380 alias: str | None = Field( 1381 default=None, 1382 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1383 ) 1384 id: str | None = Field( 1385 default=None, 1386 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1387 ) 1388 name: str | None = Field( 1389 default=None, 1390 description="Display name of the actor shown in the UI. `null` if no name is set.", 1391 ) 1392 profile_picture: TeamTaskListResponseDataItemOwnerActorProfilePicture | None = Field( 1393 default=None, 1394 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1395 ) 1396 1397 1398class TeamTaskListResponseDataItem(BaseModel): 1399 agent: str | None = Field( 1400 default=None, 1401 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 1402 ) 1403 aggregate_version: int | None = Field( 1404 default=None, 1405 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 1406 ) 1407 blocked_by_count: int | None = Field( 1408 default=None, 1409 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 1410 ) 1411 closed_at: datetime | None = Field( 1412 default=None, 1413 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 1414 ) 1415 comments_count: int | None = Field( 1416 default=None, description="Total number of comments posted on this task." 1417 ) 1418 created_at: datetime | None = Field( 1419 default=None, description="When the task was created (ISO 8601)." 1420 ) 1421 created_by_actor: TeamTaskListResponseDataItemCreatedByActor | None = Field( 1422 default=None, 1423 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 1424 ) 1425 created_by_agent: str | None = Field( 1426 default=None, 1427 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 1428 ) 1429 created_by_user: str | None = Field( 1430 default=None, 1431 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 1432 ) 1433 current_lease: TeamTaskListResponseDataItemCurrentLease | None = Field( 1434 default=None, 1435 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 1436 ) 1437 description: str | None = Field( 1438 default=None, 1439 description="Long-form description or notes for the task. `null` if no description has been provided.", 1440 ) 1441 due_date: datetime | None = Field( 1442 default=None, 1443 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 1444 ) 1445 epic: str | None = Field( 1446 default=None, 1447 description="Free-form grouping label. `null` when the task is not in an epic.", 1448 ) 1449 id: str = Field(..., description="Task ID (`tsk_...`).") 1450 is_blocked: bool | None = Field( 1451 default=None, 1452 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 1453 ) 1454 is_stalled: bool | None = Field( 1455 default=None, 1456 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 1457 ) 1458 links: dict[str, Any] | None = Field( 1459 default=None, 1460 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 1461 ) 1462 metadata: dict[str, Any] | None = Field( 1463 default=None, 1464 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 1465 ) 1466 name: str = Field(..., description="Human-readable title of the task.") 1467 org: str | None = Field( 1468 default=None, 1469 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 1470 ) 1471 owner_actor: TeamTaskListResponseDataItemOwnerActor | None = Field( 1472 default=None, 1473 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 1474 ) 1475 owner_agent: str | None = Field( 1476 default=None, 1477 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 1478 ) 1479 owner_user: str | None = Field( 1480 default=None, 1481 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 1482 ) 1483 parent: str | None = Field( 1484 default=None, 1485 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 1486 ) 1487 priority: int | None = Field( 1488 default=None, 1489 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 1490 ) 1491 project_id: str | None = Field( 1492 default=None, 1493 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 1494 ) 1495 sandbox: str | None = Field( 1496 default=None, 1497 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 1498 ) 1499 source_id: str | None = Field( 1500 default=None, 1501 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 1502 ) 1503 source_scope: str | None = Field( 1504 default=None, 1505 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 1506 ) 1507 source_type: str | None = Field( 1508 default=None, 1509 description="Kind of source object (for example `repository`). `null` when the task has no source.", 1510 ) 1511 stalled_since: datetime | None = Field( 1512 default=None, 1513 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 1514 ) 1515 status: str = Field( 1516 ..., 1517 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 1518 ) 1519 subtasks_count: int | None = Field( 1520 default=None, 1521 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 1522 ) 1523 tags: list[str] | None = Field( 1524 default=None, 1525 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 1526 ) 1527 target_binary: str | None = Field( 1528 default=None, 1529 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 1530 ) 1531 target_version: str | None = Field( 1532 default=None, 1533 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 1534 ) 1535 team: str | None = Field( 1536 default=None, 1537 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 1538 ) 1539 thread: str | None = Field( 1540 default=None, 1541 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 1542 ) 1543 updated_at: datetime | None = Field( 1544 default=None, description="When the task was last modified (ISO 8601)." 1545 ) 1546 user: str | None = Field( 1547 default=None, 1548 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 1549 ) 1550 1551 1552class TeamTaskListResponse(BaseModel): 1553 """ 1554 Successful response 1555 """ 1556 1557 after_cursor: str | None = None 1558 before_cursor: str | None = None 1559 data: list[TeamTaskListResponseDataItem] = Field( 1560 ..., description="Array of task objects matching the requested filters." 1561 ) 1562 has_more: bool 1563 1564 1565class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture(BaseModel): 1566 file: str | None = Field( 1567 default=None, 1568 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1569 ) 1570 height: int | None = Field( 1571 default=None, description="Height of the image in pixels. `null` if not known." 1572 ) 1573 media: str | None = Field( 1574 default=None, 1575 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1576 ) 1577 mime_type: str | None = Field( 1578 default=None, 1579 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1580 ) 1581 refresh_url: str | None = Field( 1582 default=None, 1583 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1584 ) 1585 url: str | None = Field( 1586 default=None, 1587 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1588 ) 1589 width: int | None = Field( 1590 default=None, description="Width of the image in pixels. `null` if not known." 1591 ) 1592 1593 1594class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor(BaseModel): 1595 alias: str | None = Field( 1596 default=None, 1597 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1598 ) 1599 id: str | None = Field( 1600 default=None, 1601 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1602 ) 1603 name: str | None = Field( 1604 default=None, 1605 description="Display name of the actor shown in the UI. `null` if no name is set.", 1606 ) 1607 profile_picture: ( 1608 TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture | None 1609 ) = Field( 1610 default=None, 1611 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1612 ) 1613 1614 1615class TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease(BaseModel): 1616 expires_at: datetime = Field( 1617 ..., description="Server-calculated lease expiry in ISO 8601 format." 1618 ) 1619 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 1620 session_name: str = Field( 1621 ..., description="Display name supplied by the coding session that holds the lease." 1622 ) 1623 1624 1625class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture(BaseModel): 1626 file: str | None = Field( 1627 default=None, 1628 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1629 ) 1630 height: int | None = Field( 1631 default=None, description="Height of the image in pixels. `null` if not known." 1632 ) 1633 media: str | None = Field( 1634 default=None, 1635 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1636 ) 1637 mime_type: str | None = Field( 1638 default=None, 1639 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1640 ) 1641 refresh_url: str | None = Field( 1642 default=None, 1643 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1644 ) 1645 url: str | None = Field( 1646 default=None, 1647 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1648 ) 1649 width: int | None = Field( 1650 default=None, description="Width of the image in pixels. `null` if not known." 1651 ) 1652 1653 1654class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor(BaseModel): 1655 alias: str | None = Field( 1656 default=None, 1657 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1658 ) 1659 id: str | None = Field( 1660 default=None, 1661 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1662 ) 1663 name: str | None = Field( 1664 default=None, 1665 description="Display name of the actor shown in the UI. `null` if no name is set.", 1666 ) 1667 profile_picture: ( 1668 TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture | None 1669 ) = Field( 1670 default=None, 1671 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1672 ) 1673 1674 1675class TeamTaskBlockerCyclesResponseDataItemTasksItem(BaseModel): 1676 agent: str | None = Field( 1677 default=None, 1678 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 1679 ) 1680 aggregate_version: int | None = Field( 1681 default=None, 1682 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 1683 ) 1684 blocked_by_count: int | None = Field( 1685 default=None, 1686 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 1687 ) 1688 closed_at: datetime | None = Field( 1689 default=None, 1690 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 1691 ) 1692 comments_count: int | None = Field( 1693 default=None, description="Total number of comments posted on this task." 1694 ) 1695 created_at: datetime | None = Field( 1696 default=None, description="When the task was created (ISO 8601)." 1697 ) 1698 created_by_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor | None = Field( 1699 default=None, 1700 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 1701 ) 1702 created_by_agent: str | None = Field( 1703 default=None, 1704 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 1705 ) 1706 created_by_user: str | None = Field( 1707 default=None, 1708 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 1709 ) 1710 current_lease: TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease | None = Field( 1711 default=None, 1712 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 1713 ) 1714 description: str | None = Field( 1715 default=None, 1716 description="Long-form description or notes for the task. `null` if no description has been provided.", 1717 ) 1718 due_date: datetime | None = Field( 1719 default=None, 1720 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 1721 ) 1722 epic: str | None = Field( 1723 default=None, 1724 description="Free-form grouping label. `null` when the task is not in an epic.", 1725 ) 1726 id: str = Field(..., description="Task ID (`tsk_...`).") 1727 is_blocked: bool | None = Field( 1728 default=None, 1729 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 1730 ) 1731 is_stalled: bool | None = Field( 1732 default=None, 1733 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 1734 ) 1735 links: dict[str, Any] | None = Field( 1736 default=None, 1737 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 1738 ) 1739 metadata: dict[str, Any] | None = Field( 1740 default=None, 1741 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 1742 ) 1743 name: str = Field(..., description="Human-readable title of the task.") 1744 org: str | None = Field( 1745 default=None, 1746 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 1747 ) 1748 owner_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor | None = Field( 1749 default=None, 1750 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 1751 ) 1752 owner_agent: str | None = Field( 1753 default=None, 1754 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 1755 ) 1756 owner_user: str | None = Field( 1757 default=None, 1758 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 1759 ) 1760 parent: str | None = Field( 1761 default=None, 1762 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 1763 ) 1764 priority: int | None = Field( 1765 default=None, 1766 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 1767 ) 1768 project_id: str | None = Field( 1769 default=None, 1770 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 1771 ) 1772 sandbox: str | None = Field( 1773 default=None, 1774 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 1775 ) 1776 source_id: str | None = Field( 1777 default=None, 1778 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 1779 ) 1780 source_scope: str | None = Field( 1781 default=None, 1782 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 1783 ) 1784 source_type: str | None = Field( 1785 default=None, 1786 description="Kind of source object (for example `repository`). `null` when the task has no source.", 1787 ) 1788 stalled_since: datetime | None = Field( 1789 default=None, 1790 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 1791 ) 1792 status: str = Field( 1793 ..., 1794 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 1795 ) 1796 subtasks_count: int | None = Field( 1797 default=None, 1798 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 1799 ) 1800 tags: list[str] | None = Field( 1801 default=None, 1802 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 1803 ) 1804 target_binary: str | None = Field( 1805 default=None, 1806 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 1807 ) 1808 target_version: str | None = Field( 1809 default=None, 1810 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 1811 ) 1812 team: str | None = Field( 1813 default=None, 1814 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 1815 ) 1816 thread: str | None = Field( 1817 default=None, 1818 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 1819 ) 1820 updated_at: datetime | None = Field( 1821 default=None, description="When the task was last modified (ISO 8601)." 1822 ) 1823 user: str | None = Field( 1824 default=None, 1825 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 1826 ) 1827 1828 1829class TeamTaskBlockerCyclesResponseDataItem(BaseModel): 1830 tasks: list[TeamTaskBlockerCyclesResponseDataItemTasksItem] = Field( 1831 ..., description="Every unfinished task in this cyclic blocker component." 1832 ) 1833 1834 1835class TeamTaskBlockerCyclesResponse(BaseModel): 1836 """ 1837 Successful response 1838 """ 1839 1840 after_cursor: str | None = None 1841 before_cursor: str | None = None 1842 data: list[TeamTaskBlockerCyclesResponseDataItem] 1843 has_more: bool 1844 1845 1846class TeamTaskMetricsResponse(BaseModel): 1847 """ 1848 Successful response 1849 """ 1850 1851 completed: int 1852 created: int 1853 days: int 1854 end_at: datetime 1855 open: int 1856 series: list[dict[str, Any]] = Field( 1857 ..., 1858 description="Zero-filled UTC-day buckets with `date`, end-of-day `open`, `created`, and `completed`.", 1859 ) 1860 start_at: datetime 1861 1862 1863class TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture(BaseModel): 1864 file: str | None = Field( 1865 default=None, 1866 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1867 ) 1868 height: int | None = Field( 1869 default=None, description="Height of the image in pixels. `null` if not known." 1870 ) 1871 media: str | None = Field( 1872 default=None, 1873 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1874 ) 1875 mime_type: str | None = Field( 1876 default=None, 1877 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1878 ) 1879 refresh_url: str | None = Field( 1880 default=None, 1881 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1882 ) 1883 url: str | None = Field( 1884 default=None, 1885 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1886 ) 1887 width: int | None = Field( 1888 default=None, description="Width of the image in pixels. `null` if not known." 1889 ) 1890 1891 1892class TeamTaskReadyResponseDataItemTaskCreatedByActor(BaseModel): 1893 alias: str | None = Field( 1894 default=None, 1895 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1896 ) 1897 id: str | None = Field( 1898 default=None, 1899 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1900 ) 1901 name: str | None = Field( 1902 default=None, 1903 description="Display name of the actor shown in the UI. `null` if no name is set.", 1904 ) 1905 profile_picture: TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture | None = Field( 1906 default=None, 1907 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1908 ) 1909 1910 1911class TeamTaskReadyResponseDataItemTaskCurrentLease(BaseModel): 1912 expires_at: datetime = Field( 1913 ..., description="Server-calculated lease expiry in ISO 8601 format." 1914 ) 1915 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 1916 session_name: str = Field( 1917 ..., description="Display name supplied by the coding session that holds the lease." 1918 ) 1919 1920 1921class TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture(BaseModel): 1922 file: str | None = Field( 1923 default=None, 1924 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1925 ) 1926 height: int | None = Field( 1927 default=None, description="Height of the image in pixels. `null` if not known." 1928 ) 1929 media: str | None = Field( 1930 default=None, 1931 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1932 ) 1933 mime_type: str | None = Field( 1934 default=None, 1935 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1936 ) 1937 refresh_url: str | None = Field( 1938 default=None, 1939 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1940 ) 1941 url: str | None = Field( 1942 default=None, 1943 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1944 ) 1945 width: int | None = Field( 1946 default=None, description="Width of the image in pixels. `null` if not known." 1947 ) 1948 1949 1950class TeamTaskReadyResponseDataItemTaskOwnerActor(BaseModel): 1951 alias: str | None = Field( 1952 default=None, 1953 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1954 ) 1955 id: str | None = Field( 1956 default=None, 1957 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1958 ) 1959 name: str | None = Field( 1960 default=None, 1961 description="Display name of the actor shown in the UI. `null` if no name is set.", 1962 ) 1963 profile_picture: TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture | None = Field( 1964 default=None, 1965 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1966 ) 1967 1968 1969class TeamTaskReadyResponseDataItemTask(BaseModel): 1970 agent: str | None = Field( 1971 default=None, 1972 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 1973 ) 1974 aggregate_version: int | None = Field( 1975 default=None, 1976 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 1977 ) 1978 blocked_by_count: int | None = Field( 1979 default=None, 1980 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 1981 ) 1982 closed_at: datetime | None = Field( 1983 default=None, 1984 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 1985 ) 1986 comments_count: int | None = Field( 1987 default=None, description="Total number of comments posted on this task." 1988 ) 1989 created_at: datetime | None = Field( 1990 default=None, description="When the task was created (ISO 8601)." 1991 ) 1992 created_by_actor: TeamTaskReadyResponseDataItemTaskCreatedByActor | None = Field( 1993 default=None, 1994 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 1995 ) 1996 created_by_agent: str | None = Field( 1997 default=None, 1998 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 1999 ) 2000 created_by_user: str | None = Field( 2001 default=None, 2002 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 2003 ) 2004 current_lease: TeamTaskReadyResponseDataItemTaskCurrentLease | None = Field( 2005 default=None, 2006 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 2007 ) 2008 description: str | None = Field( 2009 default=None, 2010 description="Long-form description or notes for the task. `null` if no description has been provided.", 2011 ) 2012 due_date: datetime | None = Field( 2013 default=None, 2014 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 2015 ) 2016 epic: str | None = Field( 2017 default=None, 2018 description="Free-form grouping label. `null` when the task is not in an epic.", 2019 ) 2020 id: str = Field(..., description="Task ID (`tsk_...`).") 2021 is_blocked: bool | None = Field( 2022 default=None, 2023 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 2024 ) 2025 is_stalled: bool | None = Field( 2026 default=None, 2027 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 2028 ) 2029 links: dict[str, Any] | None = Field( 2030 default=None, 2031 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 2032 ) 2033 metadata: dict[str, Any] | None = Field( 2034 default=None, 2035 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 2036 ) 2037 name: str = Field(..., description="Human-readable title of the task.") 2038 org: str | None = Field( 2039 default=None, 2040 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 2041 ) 2042 owner_actor: TeamTaskReadyResponseDataItemTaskOwnerActor | None = Field( 2043 default=None, 2044 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 2045 ) 2046 owner_agent: str | None = Field( 2047 default=None, 2048 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 2049 ) 2050 owner_user: str | None = Field( 2051 default=None, 2052 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 2053 ) 2054 parent: str | None = Field( 2055 default=None, 2056 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 2057 ) 2058 priority: int | None = Field( 2059 default=None, 2060 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 2061 ) 2062 project_id: str | None = Field( 2063 default=None, 2064 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 2065 ) 2066 sandbox: str | None = Field( 2067 default=None, 2068 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 2069 ) 2070 source_id: str | None = Field( 2071 default=None, 2072 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 2073 ) 2074 source_scope: str | None = Field( 2075 default=None, 2076 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 2077 ) 2078 source_type: str | None = Field( 2079 default=None, 2080 description="Kind of source object (for example `repository`). `null` when the task has no source.", 2081 ) 2082 stalled_since: datetime | None = Field( 2083 default=None, 2084 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 2085 ) 2086 status: str = Field( 2087 ..., 2088 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 2089 ) 2090 subtasks_count: int | None = Field( 2091 default=None, 2092 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 2093 ) 2094 tags: list[str] | None = Field( 2095 default=None, 2096 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 2097 ) 2098 target_binary: str | None = Field( 2099 default=None, 2100 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 2101 ) 2102 target_version: str | None = Field( 2103 default=None, 2104 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 2105 ) 2106 team: str | None = Field( 2107 default=None, 2108 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 2109 ) 2110 thread: str | None = Field( 2111 default=None, 2112 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 2113 ) 2114 updated_at: datetime | None = Field( 2115 default=None, description="When the task was last modified (ISO 8601)." 2116 ) 2117 user: str | None = Field( 2118 default=None, 2119 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 2120 ) 2121 2122 2123class TeamTaskReadyResponseDataItem(BaseModel): 2124 readiness: Literal["ready", "blocked", "leased"] = Field( 2125 ..., description="One of `ready`, `blocked`, or `leased`." 2126 ) 2127 reason: Literal["open_blockers", "active_lease"] | None = Field( 2128 default=None, 2129 description="Stable exclusion reason: `open_blockers` or `active_lease`; omitted when ready.", 2130 ) 2131 task: TeamTaskReadyResponseDataItemTask = Field( 2132 ..., description="The task evaluated for readiness." 2133 ) 2134 2135 2136class TeamTaskReadyResponse(BaseModel): 2137 """ 2138 Successful response 2139 """ 2140 2141 after_cursor: str | None = None 2142 authoritative: bool = Field( 2143 ..., 2144 description="Always false because projections can lag writes and a later claim can race this read.", 2145 ) 2146 before_cursor: str | None = None 2147 data: list[TeamTaskReadyResponseDataItem] 2148 has_more: bool 2149 2150 2151class TeamTaskSearchResponseDataItemCreatedByActorProfilePicture(BaseModel): 2152 file: str | None = Field( 2153 default=None, 2154 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2155 ) 2156 height: int | None = Field( 2157 default=None, description="Height of the image in pixels. `null` if not known." 2158 ) 2159 media: str | None = Field( 2160 default=None, 2161 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2162 ) 2163 mime_type: str | None = Field( 2164 default=None, 2165 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2166 ) 2167 refresh_url: str | None = Field( 2168 default=None, 2169 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2170 ) 2171 url: str | None = Field( 2172 default=None, 2173 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2174 ) 2175 width: int | None = Field( 2176 default=None, description="Width of the image in pixels. `null` if not known." 2177 ) 2178 2179 2180class TeamTaskSearchResponseDataItemCreatedByActor(BaseModel): 2181 alias: str | None = Field( 2182 default=None, 2183 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 2184 ) 2185 id: str | None = Field( 2186 default=None, 2187 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 2188 ) 2189 name: str | None = Field( 2190 default=None, 2191 description="Display name of the actor shown in the UI. `null` if no name is set.", 2192 ) 2193 profile_picture: TeamTaskSearchResponseDataItemCreatedByActorProfilePicture | None = Field( 2194 default=None, 2195 description="Profile picture for the actor. `null` if the actor has no profile picture.", 2196 ) 2197 2198 2199class TeamTaskSearchResponseDataItemCurrentLease(BaseModel): 2200 expires_at: datetime = Field( 2201 ..., description="Server-calculated lease expiry in ISO 8601 format." 2202 ) 2203 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 2204 session_name: str = Field( 2205 ..., description="Display name supplied by the coding session that holds the lease." 2206 ) 2207 2208 2209class TeamTaskSearchResponseDataItemOwnerActorProfilePicture(BaseModel): 2210 file: str | None = Field( 2211 default=None, 2212 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2213 ) 2214 height: int | None = Field( 2215 default=None, description="Height of the image in pixels. `null` if not known." 2216 ) 2217 media: str | None = Field( 2218 default=None, 2219 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2220 ) 2221 mime_type: str | None = Field( 2222 default=None, 2223 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2224 ) 2225 refresh_url: str | None = Field( 2226 default=None, 2227 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2228 ) 2229 url: str | None = Field( 2230 default=None, 2231 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2232 ) 2233 width: int | None = Field( 2234 default=None, description="Width of the image in pixels. `null` if not known." 2235 ) 2236 2237 2238class TeamTaskSearchResponseDataItemOwnerActor(BaseModel): 2239 alias: str | None = Field( 2240 default=None, 2241 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 2242 ) 2243 id: str | None = Field( 2244 default=None, 2245 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 2246 ) 2247 name: str | None = Field( 2248 default=None, 2249 description="Display name of the actor shown in the UI. `null` if no name is set.", 2250 ) 2251 profile_picture: TeamTaskSearchResponseDataItemOwnerActorProfilePicture | None = Field( 2252 default=None, 2253 description="Profile picture for the actor. `null` if the actor has no profile picture.", 2254 ) 2255 2256 2257class TeamTaskSearchResponseDataItem(BaseModel): 2258 agent: str | None = Field( 2259 default=None, 2260 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 2261 ) 2262 aggregate_version: int | None = Field( 2263 default=None, 2264 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 2265 ) 2266 blocked_by_count: int | None = Field( 2267 default=None, 2268 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 2269 ) 2270 closed_at: datetime | None = Field( 2271 default=None, 2272 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 2273 ) 2274 comments_count: int | None = Field( 2275 default=None, description="Total number of comments posted on this task." 2276 ) 2277 created_at: datetime | None = Field( 2278 default=None, description="When the task was created (ISO 8601)." 2279 ) 2280 created_by_actor: TeamTaskSearchResponseDataItemCreatedByActor | None = Field( 2281 default=None, 2282 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 2283 ) 2284 created_by_agent: str | None = Field( 2285 default=None, 2286 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 2287 ) 2288 created_by_user: str | None = Field( 2289 default=None, 2290 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 2291 ) 2292 current_lease: TeamTaskSearchResponseDataItemCurrentLease | None = Field( 2293 default=None, 2294 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 2295 ) 2296 description: str | None = Field( 2297 default=None, 2298 description="Long-form description or notes for the task. `null` if no description has been provided.", 2299 ) 2300 due_date: datetime | None = Field( 2301 default=None, 2302 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 2303 ) 2304 epic: str | None = Field( 2305 default=None, 2306 description="Free-form grouping label. `null` when the task is not in an epic.", 2307 ) 2308 id: str = Field(..., description="Task ID (`tsk_...`).") 2309 is_blocked: bool | None = Field( 2310 default=None, 2311 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 2312 ) 2313 is_stalled: bool | None = Field( 2314 default=None, 2315 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 2316 ) 2317 links: dict[str, Any] | None = Field( 2318 default=None, 2319 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 2320 ) 2321 metadata: dict[str, Any] | None = Field( 2322 default=None, 2323 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 2324 ) 2325 name: str = Field(..., description="Human-readable title of the task.") 2326 org: str | None = Field( 2327 default=None, 2328 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 2329 ) 2330 owner_actor: TeamTaskSearchResponseDataItemOwnerActor | None = Field( 2331 default=None, 2332 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 2333 ) 2334 owner_agent: str | None = Field( 2335 default=None, 2336 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 2337 ) 2338 owner_user: str | None = Field( 2339 default=None, 2340 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 2341 ) 2342 parent: str | None = Field( 2343 default=None, 2344 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 2345 ) 2346 priority: int | None = Field( 2347 default=None, 2348 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 2349 ) 2350 project_id: str | None = Field( 2351 default=None, 2352 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 2353 ) 2354 sandbox: str | None = Field( 2355 default=None, 2356 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 2357 ) 2358 source_id: str | None = Field( 2359 default=None, 2360 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 2361 ) 2362 source_scope: str | None = Field( 2363 default=None, 2364 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 2365 ) 2366 source_type: str | None = Field( 2367 default=None, 2368 description="Kind of source object (for example `repository`). `null` when the task has no source.", 2369 ) 2370 stalled_since: datetime | None = Field( 2371 default=None, 2372 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 2373 ) 2374 status: str = Field( 2375 ..., 2376 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 2377 ) 2378 subtasks_count: int | None = Field( 2379 default=None, 2380 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 2381 ) 2382 tags: list[str] | None = Field( 2383 default=None, 2384 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 2385 ) 2386 target_binary: str | None = Field( 2387 default=None, 2388 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 2389 ) 2390 target_version: str | None = Field( 2391 default=None, 2392 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 2393 ) 2394 team: str | None = Field( 2395 default=None, 2396 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 2397 ) 2398 thread: str | None = Field( 2399 default=None, 2400 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 2401 ) 2402 updated_at: datetime | None = Field( 2403 default=None, description="When the task was last modified (ISO 8601)." 2404 ) 2405 user: str | None = Field( 2406 default=None, 2407 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 2408 ) 2409 2410 2411class TeamTaskSearchResponse(BaseModel): 2412 """ 2413 Successful response 2414 """ 2415 2416 after_cursor: str | None = None 2417 before_cursor: str | None = None 2418 data: list[TeamTaskSearchResponseDataItem] = Field( 2419 ..., description="Array of task objects matching the query and filters." 2420 ) 2421 has_more: bool 2422 query: str 2423 2424 2425class TeamThreadListResponseDataItemParentMessageAclAddItem(BaseModel): 2426 actions: list[str] = Field( 2427 ..., 2428 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2429 ) 2430 principal: str | None = Field( 2431 default=None, 2432 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2433 ) 2434 principal_type: str = Field( 2435 ..., 2436 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2437 ) 2438 2439 2440class TeamThreadListResponseDataItemParentMessageAclGrantsItem(BaseModel): 2441 actions: list[str] = Field( 2442 ..., 2443 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2444 ) 2445 principal: str | None = Field( 2446 default=None, 2447 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2448 ) 2449 principal_type: str = Field( 2450 ..., 2451 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2452 ) 2453 2454 2455class TeamThreadListResponseDataItemParentMessageAclRemoveItem(BaseModel): 2456 principal: str | None = Field( 2457 default=None, 2458 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 2459 ) 2460 principal_type: str = Field( 2461 ..., 2462 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2463 ) 2464 2465 2466class TeamThreadListResponseDataItemParentMessageAcl(BaseModel): 2467 add: list[TeamThreadListResponseDataItemParentMessageAclAddItem] | None = Field( 2468 default=None, 2469 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 2470 ) 2471 grants: list[TeamThreadListResponseDataItemParentMessageAclGrantsItem] | None = Field( 2472 default=None, 2473 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 2474 ) 2475 remove: list[TeamThreadListResponseDataItemParentMessageAclRemoveItem] | None = Field( 2476 default=None, 2477 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 2478 ) 2479 2480 2481class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(BaseModel): 2482 file: str | None = Field( 2483 default=None, 2484 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2485 ) 2486 height: int | None = Field( 2487 default=None, description="Height of the image in pixels. `null` if not known." 2488 ) 2489 media: str | None = Field( 2490 default=None, 2491 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2492 ) 2493 mime_type: str | None = Field( 2494 default=None, 2495 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2496 ) 2497 refresh_url: str | None = Field( 2498 default=None, 2499 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2500 ) 2501 url: str | None = Field( 2502 default=None, 2503 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2504 ) 2505 width: int | None = Field( 2506 default=None, description="Width of the image in pixels. `null` if not known." 2507 ) 2508 2509 2510class TeamThreadListResponseDataItemParentMessageActorsItem(BaseModel): 2511 alias: str | None = Field( 2512 default=None, 2513 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 2514 ) 2515 id: str | None = Field( 2516 default=None, 2517 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 2518 ) 2519 name: str | None = Field( 2520 default=None, 2521 description="Display name of the actor shown in the UI. `null` if no name is set.", 2522 ) 2523 profile_picture: TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture | None = ( 2524 Field( 2525 default=None, 2526 description="Profile picture for the actor. `null` if the actor has no profile picture.", 2527 ) 2528 ) 2529 2530 2531class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(BaseModel): 2532 file: str | None = Field( 2533 default=None, 2534 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2535 ) 2536 height: int | None = Field( 2537 default=None, description="Height of the image in pixels. `null` if not known." 2538 ) 2539 media: str | None = Field( 2540 default=None, 2541 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2542 ) 2543 mime_type: str | None = Field( 2544 default=None, 2545 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2546 ) 2547 refresh_url: str | None = Field( 2548 default=None, 2549 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2550 ) 2551 url: str | None = Field( 2552 default=None, 2553 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2554 ) 2555 width: int | None = Field( 2556 default=None, description="Width of the image in pixels. `null` if not known." 2557 ) 2558 2559 2560class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(BaseModel): 2561 file: str | None = Field( 2562 default=None, 2563 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2564 ) 2565 height: int | None = Field( 2566 default=None, description="Height of the image in pixels. `null` if not known." 2567 ) 2568 media: str | None = Field( 2569 default=None, 2570 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2571 ) 2572 mime_type: str | None = Field( 2573 default=None, 2574 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2575 ) 2576 refresh_url: str | None = Field( 2577 default=None, 2578 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2579 ) 2580 url: str | None = Field( 2581 default=None, 2582 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2583 ) 2584 width: int | None = Field( 2585 default=None, description="Width of the image in pixels. `null` if not known." 2586 ) 2587 2588 2589class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(BaseModel): 2590 byte_size: int | None = Field(default=None, description="Size of the stored bytes.") 2591 content_type: str | None = Field( 2592 default=None, 2593 description='MIME type of this variant\'s file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded.', 2594 ) 2595 created_at: datetime | None = Field( 2596 default=None, description="When this variant was created (ISO 8601)." 2597 ) 2598 duration_ms: int | None = Field( 2599 default=None, 2600 description="Client-declared video duration in milliseconds; not server-probed.", 2601 ) 2602 file: str | None = Field( 2603 default=None, 2604 description="ID of the underlying storage file that backs this variant (`fil_...`).", 2605 ) 2606 filename: str | None = Field( 2607 default=None, 2608 description="Original filename of the uploaded file for this variant. `null` if the file is not loaded.", 2609 ) 2610 height: int | None = Field( 2611 default=None, description="Height of this variant in pixels. `null` if not recorded." 2612 ) 2613 id: str = Field(..., description="Media variant ID (`mvr_...`).") 2614 image_source: ( 2615 TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource | None 2616 ) = Field( 2617 default=None, 2618 description="Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types.", 2619 ) 2620 sha256: str | None = Field(default=None, description="Lowercase SHA-256 of the stored bytes.") 2621 updated_at: datetime | None = Field( 2622 default=None, description="When this variant was last updated (ISO 8601)." 2623 ) 2624 url: str | None = Field( 2625 default=None, 2626 description="Signed download URL for this variant, resolved at request time. `null` if the file is unavailable.", 2627 ) 2628 url_expires_at: datetime | None = Field( 2629 default=None, description="Expiry of this variant's playable URL." 2630 ) 2631 variant_key: str | None = Field( 2632 default=None, 2633 description='Identifier for this variant\'s processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview).', 2634 ) 2635 width: int | None = Field( 2636 default=None, description="Width of this variant in pixels. `null` if not recorded." 2637 ) 2638 2639 2640class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): 2641 content_type: str | None = Field( 2642 default=None, 2643 description='MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 2644 ) 2645 description: str | None = Field( 2646 default=None, 2647 description="Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types.", 2648 ) 2649 filename: str | None = Field( 2650 default=None, 2651 description='Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 2652 ) 2653 height: int | None = Field( 2654 default=None, 2655 description="Height in pixels of the media item. Present on `media` type only. `null` otherwise.", 2656 ) 2657 id: str = Field(..., description="Unique identifier for this attachment within the message.") 2658 image_height: int | None = Field( 2659 default=None, 2660 description="Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 2661 ) 2662 image_source: TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource | None = ( 2663 Field( 2664 default=None, 2665 description="Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise.", 2666 ) 2667 ) 2668 image_url: str | None = Field( 2669 default=None, 2670 description="URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise.", 2671 ) 2672 image_width: int | None = Field( 2673 default=None, 2674 description="Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 2675 ) 2676 key: str | None = Field( 2677 default=None, 2678 description='For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types.', 2679 ) 2680 media_type: str | None = Field( 2681 default=None, 2682 description='The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise.', 2683 ) 2684 name: str | None = Field( 2685 default=None, 2686 description="Display name of the media item. Present on `media` type only. `null` otherwise.", 2687 ) 2688 object: dict[str, Any] | None = Field( 2689 default=None, 2690 description="The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. For `structured_data` type, contains the inline `data` and the `schema_url` or `schema_config` naming its JSON Schema. Omitted on other types.", 2691 ) 2692 title: str | None = Field( 2693 default=None, 2694 description="Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types.", 2695 ) 2696 type: str = Field( 2697 ..., 2698 description='The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, `"chart"`, or `"structured_data"`. Determines which additional fields are present.', 2699 ) 2700 url: str | None = Field( 2701 default=None, 2702 description="URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types.", 2703 ) 2704 variants: ( 2705 list[TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem] | None 2706 ) = Field( 2707 default=None, 2708 description="Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise.", 2709 ) 2710 version: int | None = Field( 2711 default=None, 2712 description="Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise.", 2713 ) 2714 width: int | None = Field( 2715 default=None, 2716 description="Width in pixels of the media item. Present on `media` type only. `null` otherwise.", 2717 ) 2718 2719 2720class TeamThreadListResponseDataItemParentMessageContextItem(BaseModel): 2721 attributes: dict[str, Any] | None = Field( 2722 default=None, 2723 description="Scalar key-value fields describing the context, such as route, repository, or pull-request number.", 2724 ) 2725 content: str | None = Field( 2726 default=None, 2727 description="Optional context body. The model receives it as escaped XML data, not a system instruction.", 2728 ) 2729 title: str | None = Field( 2730 default=None, description="Optional human-readable label for this context block." 2731 ) 2732 type: str = Field( 2733 ..., 2734 description="Stable context kind. Must start with a lowercase letter and contain only lowercase letters, numbers, dots, dashes, or underscores.", 2735 ) 2736 2737 2738class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel): 2739 payload: dict[str, Any] | None = Field( 2740 default=None, 2741 description='Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `" "`).', 2742 ) 2743 type: str = Field( 2744 ..., 2745 description='Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions.', 2746 ) 2747 user: str | None = Field( 2748 default=None, description="Public ID of the user who added the reaction (`usr_...`)." 2749 ) 2750 2751 2752class TeamThreadListResponseDataItemParentMessage(BaseModel): 2753 acl: TeamThreadListResponseDataItemParentMessageAcl | None = Field( 2754 default=None, 2755 description="Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else.", 2756 ) 2757 actors: list[TeamThreadListResponseDataItemParentMessageActorsItem] | None = Field( 2758 default=None, 2759 description="Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.", 2760 ) 2761 agent: str | None = Field( 2762 default=None, 2763 description="ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users.", 2764 ) 2765 agent_mode: Literal["cli", "embedded"] | None = Field( 2766 default=None, 2767 description="Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path.", 2768 ) 2769 attachments: list[TeamThreadListResponseDataItemParentMessageAttachmentsItem] | None = Field( 2770 default=None, 2771 description="Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.", 2772 ) 2773 branched_thread: str | None = Field( 2774 default=None, 2775 description="ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread.", 2776 ) 2777 content: str | None = Field( 2778 default=None, 2779 description="Text content of the message. `null` for messages that contain only attachments.", 2780 ) 2781 context: list[TeamThreadListResponseDataItemParentMessageContextItem] | None = Field( 2782 default=None, 2783 description="Immutable structured context captured when the message was posted. Each entry has `type`, optional `title` and `content`, and scalar `attributes`. Always present; defaults to an empty array. Context is delivered to agents as escaped XML data, not as system instructions.", 2784 ) 2785 created_at: str | None = Field( 2786 default=None, description="When the message was posted (ISO 8601)." 2787 ) 2788 has_replies: bool | None = Field( 2789 default=None, 2790 description="Whether this message has at least one reply. Only present when explicitly requested or computed by the server.", 2791 ) 2792 id: str = Field(..., description="Message ID (`msg_...`).") 2793 idempotency_key: str | None = Field( 2794 default=None, 2795 description="Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one.", 2796 ) 2797 is_deleted: bool | None = Field( 2798 default=None, 2799 description="Whether this message is a deletion tombstone. `true` only on the `message_updated` broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always `false` for live messages.", 2800 ) 2801 legacy_agent: str | None = Field( 2802 default=None, 2803 description="Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users.", 2804 ) 2805 metadata: dict[str, Any] | None = Field( 2806 default=None, 2807 description="Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.", 2808 ) 2809 org: str | None = Field( 2810 default=None, description="ID of the organization that owns this message (`org_...`)." 2811 ) 2812 reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = Field( 2813 default=None, 2814 description="Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.", 2815 ) 2816 rendering_mode: str | None = Field( 2817 default=None, 2818 description='Display hint for how the message should be rendered. One of `"reply"`, `"direct"`, or `"inline"`. `null` for user-authored messages, which are always rendered as standard replies.', 2819 ) 2820 replies: list[dict[str, Any]] | None = Field( 2821 default=None, 2822 description="Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.", 2823 ) 2824 replies_after_cursor: str | None = Field( 2825 default=None, 2826 description="Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.", 2827 ) 2828 replies_before_cursor: str | None = Field( 2829 default=None, 2830 description="Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.", 2831 ) 2832 reply_count: int | None = Field( 2833 default=None, 2834 description="Total number of direct replies to this message. Only present when explicitly requested or computed by the server.", 2835 ) 2836 reply_to: dict[str, Any] | None = Field( 2837 default=None, 2838 description="The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded.", 2839 ) 2840 root_message_id: str | None = Field( 2841 default=None, 2842 description="ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.", 2843 ) 2844 sandbox: str | None = Field( 2845 default=None, 2846 description="ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages.", 2847 ) 2848 team: str | None = Field( 2849 default=None, 2850 description="ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped.", 2851 ) 2852 thread: str | None = Field( 2853 default=None, description="ID of the thread this message belongs to (`thr_...`)." 2854 ) 2855 type: str | None = Field( 2856 default=None, 2857 description="Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset.", 2858 ) 2859 user: str | dict[str, Any] | None = Field( 2860 default=None, 2861 description="The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents.", 2862 ) 2863 visibility: Literal["default", "private"] | None = Field( 2864 default=None, 2865 description="Message-level visibility. `default` is visible to anyone who can see the parent thread. `private` is restricted to the sender and explicit ACL `read` grantees.", 2866 ) 2867 2868 2869class TeamThreadListResponseDataItemParticipantsItem(BaseModel): 2870 alias: str | None = Field( 2871 default=None, description="Short handle or alias for the user. `null` if not set." 2872 ) 2873 app: str | None = Field( 2874 default=None, 2875 description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.", 2876 ) 2877 app_name: str | None = Field( 2878 default=None, 2879 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 2880 ) 2881 created_by_agent_user: str | None = Field( 2882 default=None, 2883 description="Agent user that created this account (`usr_...`). `null` unless an agent created it.", 2884 ) 2885 created_by_developer: str | None = Field( 2886 default=None, 2887 description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.", 2888 ) 2889 created_by_org: str | None = Field( 2890 default=None, 2891 description="Org of the principal that created this user (`org_...`). `null` on legacy rows.", 2892 ) 2893 created_by_team: str | None = Field( 2894 default=None, 2895 description="Team that created this user (`tem_...`). `null` unless created as a team.", 2896 ) 2897 created_by_user: str | None = Field( 2898 default=None, 2899 description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.", 2900 ) 2901 email: str | None = Field(default=None, description="Email address of the user.") 2902 id: str = Field(..., description="User ID (`usr_...`).") 2903 is_system_user: bool | None = Field( 2904 default=None, 2905 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 2906 ) 2907 metadata: dict[str, Any] | None = Field( 2908 default=None, 2909 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 2910 ) 2911 name: str | None = Field( 2912 default=None, 2913 description="Full display name of the user. `null` if the user has not set a name.", 2914 ) 2915 org: str | None = Field( 2916 default=None, 2917 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 2918 ) 2919 org_name: str | None = Field( 2920 default=None, 2921 description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 2922 ) 2923 org_role: str | None = Field( 2924 default=None, 2925 description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.', 2926 ) 2927 org_slug: str | None = Field( 2928 default=None, 2929 description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 2930 ) 2931 sandbox: str | None = Field( 2932 default=None, 2933 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 2934 ) 2935 sandbox_name: str | None = Field( 2936 default=None, 2937 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 2938 ) 2939 2940 2941class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(BaseModel): 2942 actions: list[str] = Field( 2943 ..., 2944 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2945 ) 2946 principal: str | None = Field( 2947 default=None, 2948 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2949 ) 2950 principal_type: str = Field( 2951 ..., 2952 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2953 ) 2954 2955 2956class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(BaseModel): 2957 actions: list[str] = Field( 2958 ..., 2959 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2960 ) 2961 principal: str | None = Field( 2962 default=None, 2963 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2964 ) 2965 principal_type: str = Field( 2966 ..., 2967 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2968 ) 2969 2970 2971class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(BaseModel): 2972 principal: str | None = Field( 2973 default=None, 2974 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 2975 ) 2976 principal_type: str = Field( 2977 ..., 2978 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2979 ) 2980 2981 2982class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(BaseModel): 2983 add: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem] | None = Field( 2984 default=None, 2985 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 2986 ) 2987 grants: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem] | None = Field( 2988 default=None, 2989 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 2990 ) 2991 remove: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem] | None = Field( 2992 default=None, 2993 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 2994 ) 2995 2996 2997class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo( 2998 BaseModel 2999): 3000 file: str | None = Field( 3001 default=None, 3002 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 3003 ) 3004 height: int | None = Field( 3005 default=None, description="Height of the image in pixels. `null` if not known." 3006 ) 3007 media: str | None = Field( 3008 default=None, 3009 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 3010 ) 3011 mime_type: str | None = Field( 3012 default=None, 3013 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 3014 ) 3015 refresh_url: str | None = Field( 3016 default=None, 3017 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 3018 ) 3019 url: str | None = Field( 3020 default=None, 3021 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 3022 ) 3023 width: int | None = Field( 3024 default=None, description="Width of the image in pixels. `null` if not known." 3025 ) 3026 3027 3028class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 3029 BaseModel 3030): 3031 description: str | None = Field( 3032 default=None, 3033 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 3034 ) 3035 name: str = Field( 3036 ..., 3037 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 3038 ) 3039 required: bool = Field( 3040 ..., 3041 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 3042 ) 3043 type: str = Field( 3044 ..., 3045 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 3046 ) 3047 3048 3049class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills( 3050 BaseModel 3051): 3052 participants: dict[str, Any] | None = Field( 3053 default=None, 3054 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 3055 ) 3056 payload: dict[str, Any] | None = Field( 3057 default=None, 3058 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 3059 ) 3060 3061 3062class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract( 3063 BaseModel 3064): 3065 input_schema: dict[str, Any] | None = Field( 3066 default=None, 3067 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 3068 ) 3069 participants: ( 3070 list[ 3071 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem 3072 ] 3073 | None 3074 ) = Field( 3075 default=None, 3076 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 3077 ) 3078 prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 3079 ..., 3080 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 3081 ) 3082 3083 3084class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails( 3085 BaseModel 3086): 3087 automation_type: str | None = Field( 3088 default=None, 3089 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 3090 ) 3091 invoke_contract: ( 3092 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract 3093 | None 3094 ) = Field( 3095 default=None, 3096 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 3097 ) 3098 type: Literal["automation"] = Field( 3099 default="automation", 3100 description="Template-details discriminator. Always `automation` for this variant.", 3101 ) 3102 3103 3104class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem( 3105 BaseModel 3106): 3107 description: str | None = Field( 3108 default=None, 3109 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 3110 ) 3111 details: ( 3112 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails 3113 | None 3114 ) = Field( 3115 default=None, 3116 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 3117 ) 3118 display_name: str | None = Field( 3119 default=None, 3120 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 3121 ) 3122 id: str | None = Field( 3123 default=None, 3124 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 3125 ) 3126 kind: str = Field( 3127 ..., 3128 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 3129 ) 3130 lookup_key: str | None = Field( 3131 default=None, 3132 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 3133 ) 3134 name: str | None = Field( 3135 default=None, 3136 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 3137 ) 3138 readme_url: str | None = Field( 3139 default=None, 3140 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3141 ) 3142 virtual_path: str | None = Field( 3143 default=None, 3144 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 3145 ) 3146 3147 3148class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution(BaseModel): 3149 category_keys: list[str] | None = Field( 3150 default=None, 3151 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 3152 ) 3153 created_at: str | None = Field( 3154 default=None, description="When the Solution config was first imported (ISO 8601)." 3155 ) 3156 description: str | None = Field( 3157 default=None, 3158 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 3159 ) 3160 events: dict[str, Any] | None = Field( 3161 default=None, 3162 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 3163 ) 3164 id: str = Field(..., description="Solution config ID (`cfg_...`).") 3165 image_url: str | None = Field( 3166 default=None, 3167 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 3168 ) 3169 installed_config_ids: list[str] = Field( 3170 ..., 3171 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 3172 ) 3173 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 3174 latest_solution: str | None = Field( 3175 default=None, 3176 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 3177 ) 3178 latest_version: str | None = Field( 3179 default=None, 3180 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 3181 ) 3182 lookup_key: str | None = Field( 3183 default=None, 3184 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 3185 ) 3186 metadata: dict[str, Any] | None = Field( 3187 default=None, 3188 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 3189 ) 3190 name: str | None = Field( 3191 default=None, 3192 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 3193 ) 3194 org: str | None = Field( 3195 default=None, 3196 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 3197 ) 3198 org_logo: ( 3199 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo 3200 | None 3201 ) = Field( 3202 default=None, 3203 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 3204 ) 3205 org_name: str | None = Field( 3206 default=None, 3207 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 3208 ) 3209 org_slug: str | None = Field( 3210 default=None, 3211 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 3212 ) 3213 owners: list[str] = Field( 3214 ..., 3215 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 3216 ) 3217 readme_url: str | None = Field( 3218 default=None, 3219 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3220 ) 3221 screenshot_urls: list[str] | None = Field( 3222 default=None, 3223 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 3224 ) 3225 solution_id: str | None = Field( 3226 default=None, 3227 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 3228 ) 3229 solution_version: str | None = Field( 3230 default=None, 3231 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 3232 ) 3233 tag_keys: list[str] | None = Field( 3234 default=None, 3235 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 3236 ) 3237 template_kind: str | None = Field( 3238 default=None, 3239 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 3240 ) 3241 templates: list[ 3242 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem 3243 ] = Field( 3244 ..., 3245 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 3246 ) 3247 updated_at: str | None = Field( 3248 default=None, description="When the Solution config was last modified (ISO 8601)." 3249 ) 3250 upgrade_available: bool = Field( 3251 ..., 3252 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 3253 ) 3254 virtual_path: str | None = Field( 3255 default=None, 3256 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 3257 ) 3258 3259 3260class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo(BaseModel): 3261 file: str | None = Field( 3262 default=None, 3263 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 3264 ) 3265 height: int | None = Field( 3266 default=None, description="Height of the image in pixels. `null` if not known." 3267 ) 3268 media: str | None = Field( 3269 default=None, 3270 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 3271 ) 3272 mime_type: str | None = Field( 3273 default=None, 3274 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 3275 ) 3276 refresh_url: str | None = Field( 3277 default=None, 3278 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 3279 ) 3280 url: str | None = Field( 3281 default=None, 3282 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 3283 ) 3284 width: int | None = Field( 3285 default=None, description="Width of the image in pixels. `null` if not known." 3286 ) 3287 3288 3289class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 3290 BaseModel 3291): 3292 description: str | None = Field( 3293 default=None, 3294 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 3295 ) 3296 name: str = Field( 3297 ..., 3298 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 3299 ) 3300 required: bool = Field( 3301 ..., 3302 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 3303 ) 3304 type: str = Field( 3305 ..., 3306 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 3307 ) 3308 3309 3310class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills( 3311 BaseModel 3312): 3313 participants: dict[str, Any] | None = Field( 3314 default=None, 3315 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 3316 ) 3317 payload: dict[str, Any] | None = Field( 3318 default=None, 3319 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 3320 ) 3321 3322 3323class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract( 3324 BaseModel 3325): 3326 input_schema: dict[str, Any] | None = Field( 3327 default=None, 3328 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 3329 ) 3330 participants: ( 3331 list[ 3332 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem 3333 ] 3334 | None 3335 ) = Field( 3336 default=None, 3337 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 3338 ) 3339 prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 3340 ..., 3341 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 3342 ) 3343 3344 3345class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails( 3346 BaseModel 3347): 3348 automation_type: str | None = Field( 3349 default=None, 3350 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 3351 ) 3352 invoke_contract: ( 3353 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract 3354 | None 3355 ) = Field( 3356 default=None, 3357 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 3358 ) 3359 type: Literal["automation"] = Field( 3360 default="automation", 3361 description="Template-details discriminator. Always `automation` for this variant.", 3362 ) 3363 3364 3365class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem( 3366 BaseModel 3367): 3368 description: str | None = Field( 3369 default=None, 3370 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 3371 ) 3372 details: ( 3373 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails 3374 | None 3375 ) = Field( 3376 default=None, 3377 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 3378 ) 3379 display_name: str | None = Field( 3380 default=None, 3381 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 3382 ) 3383 id: str | None = Field( 3384 default=None, 3385 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 3386 ) 3387 kind: str = Field( 3388 ..., 3389 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 3390 ) 3391 lookup_key: str | None = Field( 3392 default=None, 3393 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 3394 ) 3395 name: str | None = Field( 3396 default=None, 3397 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 3398 ) 3399 readme_url: str | None = Field( 3400 default=None, 3401 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3402 ) 3403 virtual_path: str | None = Field( 3404 default=None, 3405 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 3406 ) 3407 3408 3409class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(BaseModel): 3410 category_keys: list[str] | None = Field( 3411 default=None, 3412 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 3413 ) 3414 created_at: str | None = Field( 3415 default=None, description="When the Solution config was first imported (ISO 8601)." 3416 ) 3417 description: str | None = Field( 3418 default=None, 3419 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 3420 ) 3421 events: dict[str, Any] | None = Field( 3422 default=None, 3423 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 3424 ) 3425 id: str = Field(..., description="Solution config ID (`cfg_...`).") 3426 image_url: str | None = Field( 3427 default=None, 3428 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 3429 ) 3430 installed_config_ids: list[str] = Field( 3431 ..., 3432 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 3433 ) 3434 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 3435 latest_solution: str | None = Field( 3436 default=None, 3437 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 3438 ) 3439 latest_version: str | None = Field( 3440 default=None, 3441 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 3442 ) 3443 lookup_key: str | None = Field( 3444 default=None, 3445 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 3446 ) 3447 metadata: dict[str, Any] | None = Field( 3448 default=None, 3449 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 3450 ) 3451 name: str | None = Field( 3452 default=None, 3453 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 3454 ) 3455 org: str | None = Field( 3456 default=None, 3457 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 3458 ) 3459 org_logo: ( 3460 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo | None 3461 ) = Field( 3462 default=None, 3463 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 3464 ) 3465 org_name: str | None = Field( 3466 default=None, 3467 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 3468 ) 3469 org_slug: str | None = Field( 3470 default=None, 3471 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 3472 ) 3473 owners: list[str] = Field( 3474 ..., 3475 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 3476 ) 3477 readme_url: str | None = Field( 3478 default=None, 3479 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3480 ) 3481 screenshot_urls: list[str] | None = Field( 3482 default=None, 3483 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 3484 ) 3485 solution_id: str | None = Field( 3486 default=None, 3487 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 3488 ) 3489 solution_version: str | None = Field( 3490 default=None, 3491 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 3492 ) 3493 tag_keys: list[str] | None = Field( 3494 default=None, 3495 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 3496 ) 3497 template_kind: str | None = Field( 3498 default=None, 3499 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 3500 ) 3501 templates: list[ 3502 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem 3503 ] = Field( 3504 ..., 3505 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 3506 ) 3507 updated_at: str | None = Field( 3508 default=None, description="When the Solution config was last modified (ISO 8601)." 3509 ) 3510 upgrade_available: bool = Field( 3511 ..., 3512 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 3513 ) 3514 virtual_path: str | None = Field( 3515 default=None, 3516 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 3517 ) 3518 3519 3520class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(BaseModel): 3521 created_at: datetime | None = Field( 3522 default=None, description="When this template config was created (ISO 8601)." 3523 ) 3524 description: str | None = Field( 3525 default=None, 3526 description="Description of the template from the config body. `null` if the current version has no `description` field.", 3527 ) 3528 display_name: str | None = Field( 3529 default=None, 3530 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 3531 ) 3532 id: str = Field(..., description="Template config ID (`cfg_...`).") 3533 kind: str = Field( 3534 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 3535 ) 3536 lookup_key: str | None = Field( 3537 default=None, 3538 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 3539 ) 3540 name: str | None = Field( 3541 default=None, 3542 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 3543 ) 3544 updated_at: datetime | None = Field( 3545 default=None, description="When this template config was last modified (ISO 8601)." 3546 ) 3547 virtual_path: str | None = Field( 3548 default=None, 3549 description="Virtual filesystem path for this template config. `null` if not set.", 3550 ) 3551 3552 3553class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(BaseModel): 3554 current_solution: ( 3555 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution | None 3556 ) = Field( 3557 default=None, 3558 description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.", 3559 ) 3560 solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution = Field( 3561 ..., 3562 description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.", 3563 ) 3564 template: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate = Field( 3565 ..., 3566 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 3567 ) 3568 3569 3570class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel): 3571 acl: TeamThreadListResponseDataItemParticipatingAgentsItemAcl | None = Field( 3572 default=None, 3573 description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.", 3574 ) 3575 app: str | None = Field( 3576 default=None, description="ID of the application that owns this agent (`dap_...`)." 3577 ) 3578 created_at: str | None = Field( 3579 default=None, description="When the agent was created (ISO 8601)." 3580 ) 3581 default_model: str | None = Field( 3582 default=None, 3583 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 3584 ) 3585 description: str | None = Field( 3586 default=None, 3587 description="Human-readable description of what the agent does. `null` if not set.", 3588 ) 3589 email: str | None = Field( 3590 default=None, 3591 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 3592 ) 3593 id: str = Field(..., description="Agent ID (`agi_...`).") 3594 identity: str | None = Field( 3595 default=None, 3596 description="System-level identity prompt that shapes the agent's persona and behavior.", 3597 ) 3598 last_applied_template_config: str | None = Field( 3599 default=None, 3600 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 3601 ) 3602 lookup_key: str | None = Field( 3603 default=None, 3604 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 3605 ) 3606 metadata: dict[str, Any] | None = Field( 3607 default=None, 3608 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 3609 ) 3610 name: str | None = Field( 3611 default=None, description="Human-readable display name for the agent. `null` if not set." 3612 ) 3613 org: str | None = Field( 3614 default=None, 3615 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 3616 ) 3617 org_name: str | None = Field( 3618 default=None, 3619 description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.", 3620 ) 3621 originator: str | None = Field( 3622 default=None, 3623 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 3624 ) 3625 phone_number: str | None = Field( 3626 default=None, 3627 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 3628 ) 3629 sandbox: str | None = Field( 3630 default=None, 3631 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 3632 ) 3633 source_solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution | None = ( 3634 Field( 3635 default=None, 3636 description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.", 3637 ) 3638 ) 3639 team: str | None = Field( 3640 default=None, 3641 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 3642 ) 3643 template_upgrade_available: bool | None = Field( 3644 default=None, 3645 description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).", 3646 ) 3647 updated_at: str | None = Field( 3648 default=None, description="When the agent was last modified (ISO 8601)." 3649 ) 3650 user: str | None = Field( 3651 default=None, 3652 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 3653 ) 3654 3655 3656class TeamThreadListResponseDataItemSettings(BaseModel): 3657 agent_enabled: bool | None = Field( 3658 default=None, 3659 description="Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting.", 3660 ) 3661 3662 3663class TeamThreadListResponseDataItem(BaseModel): 3664 agent_user: str | None = Field( 3665 default=None, 3666 description="ID of the agent that owns this thread (`agt_...`). `null` for user-owned or team-owned threads.", 3667 ) 3668 created_at: str | None = Field( 3669 default=None, description="When the thread was created (ISO 8601)." 3670 ) 3671 creator: str | dict[str, Any] | None = Field( 3672 default=None, 3673 description="User who created this thread. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if the creator is unknown.", 3674 ) 3675 description: str | None = Field( 3676 default=None, 3677 description="Optional description or purpose statement for the thread. `null` if not set.", 3678 ) 3679 id: str = Field(..., description="Thread ID (`thr_...`).") 3680 is_channel: bool | None = Field( 3681 default=None, 3682 description="Whether this thread operates as a channel a multi-member broadcast-style conversation.", 3683 ) 3684 is_default: bool | None = Field( 3685 default=None, 3686 description="Whether this is the default thread for its owner. Each user or team has at most one default thread.", 3687 ) 3688 is_transient: bool | None = Field( 3689 default=None, 3690 description="Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.", 3691 ) 3692 is_unlisted: bool | None = Field( 3693 default=None, 3694 description="Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.", 3695 ) 3696 key: str | None = Field( 3697 default=None, 3698 description="Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. `null` if not set.", 3699 ) 3700 kind: str | None = Field( 3701 default=None, 3702 description='Thread subtype: `"standard"` for ordinary threads, `"personal"` for a user-and-owned-agents roster, `"feed"` for a post feed with inline replies, `"slack_mirror"` for the membership-strict mirror of a Slack channel, or `"slashwork_mirror"` for the membership-strict mirror of a Slashwork group. `personal` and `feed` are explicit creation options; mirror kinds are server-derived.', 3703 ) 3704 last_activity: str | None = Field( 3705 default=None, 3706 description="When the most recent message was posted in this thread, falling back to the thread's creation time if it has no messages. Always populated on thread list endpoints (which order by it, after default threads); `null` on endpoints that don't compute activity enrichment.", 3707 ) 3708 last_message_preview: str | None = Field( 3709 default=None, 3710 description="Single-line snippet of the most recent message's text content (first non-empty line, truncated to 140 characters). Populated on thread list endpoints alongside `last_activity`; `null` when the thread has no messages, the latest message has no text content (e.g. attachment-only), or the endpoint doesn't compute activity enrichment.", 3711 ) 3712 last_message_sender: str | None = Field( 3713 default=None, 3714 description="Display name of the sender of the most recent message the same message `last_message_preview` snippets. Populated on thread list endpoints; `null` when the thread has no messages or the endpoint doesn't compute activity enrichment.", 3715 ) 3716 metadata: dict[str, Any] | None = Field( 3717 default=None, 3718 description="Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set.", 3719 ) 3720 muted: bool | None = Field( 3721 default=None, 3722 description="Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery.", 3723 ) 3724 org: str | None = Field( 3725 default=None, 3726 description="ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context.", 3727 ) 3728 parent_message: TeamThreadListResponseDataItemParentMessage | None = Field( 3729 default=None, 3730 description="The message that spawned this thread as a sub-thread. `null` for top-level threads.", 3731 ) 3732 participant: list[str] | None = Field( 3733 default=None, 3734 description="Array of participant user IDs (`usr_...`) who are members of this thread.", 3735 ) 3736 participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = Field( 3737 default=None, 3738 description="Expanded participant user objects for each member of this thread. Populated only when the association is loaded.", 3739 ) 3740 participating_actor: list[str] | None = Field( 3741 default=None, 3742 description="Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.", 3743 ) 3744 participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = ( 3745 Field( 3746 default=None, 3747 description="Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.", 3748 ) 3749 ) 3750 role: str | None = Field( 3751 default=None, 3752 description='The authenticated user\'s membership role in this thread, e.g. `"owner"`, `"member"`, or `"viewer"`. `null` if the user is not a member.', 3753 ) 3754 sandbox: str | None = Field( 3755 default=None, 3756 description="ID of the developer sandbox this thread is scoped to (`dsb_...`). `null` for production threads.", 3757 ) 3758 settings: TeamThreadListResponseDataItemSettings | None = Field( 3759 default=None, 3760 description="Per-thread configuration settings controlling AI agent behavior for this thread.", 3761 ) 3762 slug: str | None = Field( 3763 default=None, 3764 description="URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned.", 3765 ) 3766 sub_threads: list[dict[str, Any]] | None = Field( 3767 default=None, 3768 description="Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.", 3769 ) 3770 tags: list[str] | None = Field( 3771 default=None, 3772 description='Status tags on the thread (e.g. `"blocked"`, `"needs-review"`). Edited by any thread participant via the `/threads/:thread/tags` endpoints and filterable on the thread list endpoints. Empty array if none set.', 3773 ) 3774 team: str | None = Field( 3775 default=None, 3776 description="ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads.", 3777 ) 3778 title: str | None = Field( 3779 default=None, 3780 description="Human-readable name of the thread. `null` if no title has been set.", 3781 ) 3782 ttl: str | None = Field( 3783 default=None, 3784 description="Offset-free expiry timestamp after which the thread may be automatically cleaned up. `null` if the thread does not expire.", 3785 ) 3786 unread_count: int | None = Field( 3787 default=None, 3788 description="Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.", 3789 ) 3790 updated_at: str | None = Field( 3791 default=None, description="When the thread was last modified (ISO 8601)." 3792 ) 3793 user: str | None = Field( 3794 default=None, 3795 description="ID of the user who owns this thread (`usr_...`). `null` for team-owned or agent-owned threads.", 3796 ) 3797 visibility: Literal["team", "restricted", "private", "org"] = Field( 3798 ..., 3799 description="Who can read the thread: `team` for every owning-team member, `restricted` for team-readable threads with an explicit roster, `private` for roster-only access, or `org` for every member of the owning organization.", 3800 ) 3801 3802 3803class TeamThreadListResponse(BaseModel): 3804 """ 3805 Successful response 3806 """ 3807 3808 data: list[TeamThreadListResponseDataItem] = Field( 3809 ..., description="Array of thread objects belonging to the team." 3810 ) 3811 3812 3813class TeamThreadMetricsResponse(BaseModel): 3814 """ 3815 Successful response 3816 """ 3817 3818 days: int 3819 end_at: datetime 3820 opened: int 3821 start_at: datetime 3822 3823 3824class TeamListResponseDataItemAclAddItem(BaseModel): 3825 actions: list[str] = Field( 3826 ..., 3827 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3828 ) 3829 principal: str | None = Field( 3830 default=None, 3831 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3832 ) 3833 principal_type: str = Field( 3834 ..., 3835 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3836 ) 3837 3838 3839class TeamListResponseDataItemAclGrantsItem(BaseModel): 3840 actions: list[str] = Field( 3841 ..., 3842 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3843 ) 3844 principal: str | None = Field( 3845 default=None, 3846 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3847 ) 3848 principal_type: str = Field( 3849 ..., 3850 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3851 ) 3852 3853 3854class TeamListResponseDataItemAclRemoveItem(BaseModel): 3855 principal: str | None = Field( 3856 default=None, 3857 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 3858 ) 3859 principal_type: str = Field( 3860 ..., 3861 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3862 ) 3863 3864 3865class TeamListResponseDataItemAcl(BaseModel): 3866 add: list[TeamListResponseDataItemAclAddItem] | None = Field( 3867 default=None, 3868 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 3869 ) 3870 grants: list[TeamListResponseDataItemAclGrantsItem] | None = Field( 3871 default=None, 3872 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 3873 ) 3874 remove: list[TeamListResponseDataItemAclRemoveItem] | None = Field( 3875 default=None, 3876 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 3877 ) 3878 3879 3880class TeamListResponseDataItem(BaseModel): 3881 acl: TeamListResponseDataItemAcl | None = Field( 3882 default=None, 3883 description="Access control list governing visibility and join permissions for this team. `null` when no ACL restrictions are applied and the team inherits default access rules.", 3884 ) 3885 app: str | None = Field( 3886 default=None, 3887 description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.", 3888 ) 3889 badges: dict[str, Any] | None = Field( 3890 default=None, 3891 description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.", 3892 ) 3893 created_at: datetime | None = Field( 3894 default=None, description="When this team was created (ISO 8601)." 3895 ) 3896 description: str | None = Field( 3897 default=None, 3898 description="Human-readable description of the team's purpose. `null` if not set.", 3899 ) 3900 id: str = Field(..., description="Team ID (`tem_...`).") 3901 membership_status: str | None = Field( 3902 default=None, 3903 description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.', 3904 ) 3905 metadata: dict[str, Any] | None = Field( 3906 default=None, 3907 description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.", 3908 ) 3909 name: str | None = Field(default=None, description="Display name of the team.") 3910 org: str | None = Field( 3911 default=None, 3912 description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.", 3913 ) 3914 sandbox: str | None = Field( 3915 default=None, 3916 description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.", 3917 ) 3918 slug: str | None = Field( 3919 default=None, 3920 description="URL-safe slug for the team, derived from the team name. `null` if not set.", 3921 ) 3922 updated_at: datetime | None = Field( 3923 default=None, description="When this team was last updated (ISO 8601)." 3924 ) 3925 3926 3927class TeamListResponse(BaseModel): 3928 """ 3929 Successful response 3930 """ 3931 3932 data: list[TeamListResponseDataItem] = Field( 3933 ..., description="Array of team objects for the current page." 3934 ) 3935 has_next: bool = Field(..., description="`true` if there is a subsequent page of results.") 3936 has_prev: bool = Field(..., description="`true` if there is a preceding page of results.") 3937 page: int = Field(..., description="The current page number.") 3938 page_size: int = Field(..., description="The number of results per page.") 3939 total_entries: int = Field( 3940 ..., description="Total number of teams matching the query across all pages." 3941 ) 3942 total_pages: int = Field( 3943 ..., description="Total number of pages given the current `page_size`." 3944 ) 3945 3946 3947class TeamArtifactsResponseDataItemAclAddItem(BaseModel): 3948 actions: list[str] = Field( 3949 ..., 3950 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3951 ) 3952 principal: str | None = Field( 3953 default=None, 3954 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3955 ) 3956 principal_type: str = Field( 3957 ..., 3958 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3959 ) 3960 3961 3962class TeamArtifactsResponseDataItemAclGrantsItem(BaseModel): 3963 actions: list[str] = Field( 3964 ..., 3965 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3966 ) 3967 principal: str | None = Field( 3968 default=None, 3969 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3970 ) 3971 principal_type: str = Field( 3972 ..., 3973 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3974 ) 3975 3976 3977class TeamArtifactsResponseDataItemAclRemoveItem(BaseModel): 3978 principal: str | None = Field( 3979 default=None, 3980 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 3981 ) 3982 principal_type: str = Field( 3983 ..., 3984 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3985 ) 3986 3987 3988class TeamArtifactsResponseDataItemAcl(BaseModel): 3989 add: list[TeamArtifactsResponseDataItemAclAddItem] | None = Field( 3990 default=None, 3991 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 3992 ) 3993 grants: list[TeamArtifactsResponseDataItemAclGrantsItem] | None = Field( 3994 default=None, 3995 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 3996 ) 3997 remove: list[TeamArtifactsResponseDataItemAclRemoveItem] | None = Field( 3998 default=None, 3999 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 4000 ) 4001 4002 4003class TeamArtifactsResponseDataItemImageSource(BaseModel): 4004 file: str | None = Field( 4005 default=None, 4006 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 4007 ) 4008 height: int | None = Field( 4009 default=None, description="Height of the image in pixels. `null` if not known." 4010 ) 4011 media: str | None = Field( 4012 default=None, 4013 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 4014 ) 4015 mime_type: str | None = Field( 4016 default=None, 4017 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 4018 ) 4019 refresh_url: str | None = Field( 4020 default=None, 4021 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 4022 ) 4023 url: str | None = Field( 4024 default=None, 4025 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 4026 ) 4027 width: int | None = Field( 4028 default=None, description="Width of the image in pixels. `null` if not known." 4029 ) 4030 4031 4032class TeamArtifactsResponseDataItem(BaseModel): 4033 acl: TeamArtifactsResponseDataItemAcl | None = Field( 4034 default=None, 4035 description="Access control list for the artifact. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions` (`read`, `write`). `null` when the artifact has no grants or the viewer is not its owner.", 4036 ) 4037 agent: str | None = Field( 4038 default=None, 4039 description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.", 4040 ) 4041 content_type: str | None = Field( 4042 default=None, 4043 description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.', 4044 ) 4045 created_at: datetime | None = Field( 4046 default=None, description="When the artifact was first created (ISO 8601)." 4047 ) 4048 current_version: str | None = Field( 4049 default=None, 4050 description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.", 4051 ) 4052 description: str | None = Field( 4053 default=None, 4054 description="Optional longer description of the artifact's contents or purpose. `null` if not set.", 4055 ) 4056 file: str | None = Field( 4057 default=None, 4058 description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.", 4059 ) 4060 file_name: str | None = Field( 4061 default=None, 4062 description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.', 4063 ) 4064 file_url: str | None = Field( 4065 default=None, 4066 description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.", 4067 ) 4068 group_key: str | None = Field( 4069 default=None, 4070 description="Optional nonunique, case-sensitive grouping key, limited to 1024 UTF-8 bytes. Null when unset; belongs to the artifact, not a content version.", 4071 ) 4072 id: str = Field(..., description="Artifact ID (`art_...`).") 4073 image_source: TeamArtifactsResponseDataItemImageSource | None = Field( 4074 default=None, 4075 description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.', 4076 ) 4077 name: str | None = Field( 4078 default=None, 4079 description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.', 4080 ) 4081 org: str | None = Field( 4082 default=None, description="ID of the organization this artifact belongs to (`org_...`)." 4083 ) 4084 sandbox: str | None = Field( 4085 default=None, 4086 description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.", 4087 ) 4088 system: bool | None = Field( 4089 default=None, 4090 description="True when the artifact has no user, team, or agent owner. An organization may own a system artifact.", 4091 ) 4092 team: str | None = Field( 4093 default=None, 4094 description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.", 4095 ) 4096 thread: str | None = Field( 4097 default=None, 4098 description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.", 4099 ) 4100 updated_at: datetime | None = Field( 4101 default=None, description="When the artifact record was last modified (ISO 8601)." 4102 ) 4103 user: str | None = Field( 4104 default=None, 4105 description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.", 4106 ) 4107 version: int | None = Field( 4108 default=None, 4109 description="Current version number of the artifact. Increments each time a new version is published.", 4110 ) 4111 4112 4113class TeamArtifactsResponse(BaseModel): 4114 """ 4115 Successful response 4116 """ 4117 4118 data: list[TeamArtifactsResponseDataItem] = Field( 4119 ..., description="Array of artifact objects belonging to the team." 4120 ) 4121 4122 4123class TeamInvitesResponse(BaseModel): 4124 """ 4125 Successful response 4126 """ 4127 4128 code: str = Field( 4129 ..., 4130 description="Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.", 4131 ) 4132 4133 4134class TeamTaskAssigneesResponseDataItemActorProfilePicture(BaseModel): 4135 file: str | None = Field( 4136 default=None, 4137 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 4138 ) 4139 height: int | None = Field( 4140 default=None, description="Height of the image in pixels. `null` if not known." 4141 ) 4142 media: str | None = Field( 4143 default=None, 4144 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 4145 ) 4146 mime_type: str | None = Field( 4147 default=None, 4148 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 4149 ) 4150 refresh_url: str | None = Field( 4151 default=None, 4152 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 4153 ) 4154 url: str | None = Field( 4155 default=None, 4156 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 4157 ) 4158 width: int | None = Field( 4159 default=None, description="Width of the image in pixels. `null` if not known." 4160 ) 4161 4162 4163class TeamTaskAssigneesResponseDataItemActor(BaseModel): 4164 alias: str | None = Field( 4165 default=None, 4166 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 4167 ) 4168 id: str | None = Field( 4169 default=None, 4170 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 4171 ) 4172 name: str | None = Field( 4173 default=None, 4174 description="Display name of the actor shown in the UI. `null` if no name is set.", 4175 ) 4176 profile_picture: TeamTaskAssigneesResponseDataItemActorProfilePicture | None = Field( 4177 default=None, 4178 description="Profile picture for the actor. `null` if the actor has no profile picture.", 4179 ) 4180 4181 4182class TeamTaskAssigneesResponseDataItem(BaseModel): 4183 actor: TeamTaskAssigneesResponseDataItemActor = Field( 4184 ..., description="Resolved display details for the assignable principal." 4185 ) 4186 id: str = Field(..., description="User (`usr_...`) or agent (`agi_...`) ID.") 4187 type: Literal["user", "agent"] = Field(..., description="Principal type: `user` or `agent`.") 4188 4189 4190class TeamTaskAssigneesResponse(BaseModel): 4191 """ 4192 Successful response 4193 """ 4194 4195 data: list[TeamTaskAssigneesResponseDataItem] = Field( 4196 ..., description="Users and agents that can be assigned to tasks owned by the team." 4197 ) 4198 4199 4200class TeamTaskEpicsResponseDataItemNextReadyItem(BaseModel): 4201 id: str 4202 name: str 4203 priority: int 4204 status: str 4205 4206 4207class TeamTaskEpicsResponseDataItemRootBlockersItem(BaseModel): 4208 downstream_count: int 4209 id: str 4210 name: str 4211 priority: int 4212 status: str 4213 4214 4215class TeamTaskEpicsResponseDataItem(BaseModel): 4216 blocked_count: int 4217 counts: dict[str, Any] = Field( 4218 ..., description="Task counts keyed by status, including closed tasks." 4219 ) 4220 epic: str 4221 next_ready: list[TeamTaskEpicsResponseDataItemNextReadyItem] 4222 root_blockers: list[TeamTaskEpicsResponseDataItemRootBlockersItem] 4223 root_blockers_partial: bool = Field( 4224 ..., description="True when root ranking used a truncated in-epic graph." 4225 ) 4226 top_open_priority: int | None = None 4227 updated_at: datetime 4228 4229 4230class TeamTaskEpicsResponse(BaseModel): 4231 """ 4232 Successful response 4233 """ 4234 4235 after_cursor: str | None = None 4236 before_cursor: str | None = None 4237 data: list[TeamTaskEpicsResponseDataItem] 4238 has_more: bool 4239 no_epic_open_count: int 4240 4241 4242class AsyncTeamCustomObjectResource: 4243 def __init__(self, http: HttpClient): 4244 self._http = http 4245 4246 async def list( 4247 self, 4248 team: str, 4249 type: str, 4250 *, 4251 limit: int | None = None, 4252 offset: int | None = None, 4253 row_key: str | None = None, 4254 sort_key: str | None = None, 4255 query: str | None = None, 4256 ) -> TeamCustomObjectListResponse: 4257 """ 4258 List a team's custom objects 4259 Returns a paginated list of custom objects owned by the specified team, 4260 filtered to a single schema type. Results are ordered by creation time 4261 descending unless `query` is provided, in which case they are ordered by 4262 full-text relevance score descending. 4263 Use `limit` and `offset` for page-based pagination. Use `row_key` or 4264 `sort_key` to narrow results to objects matching those index values. 4265 Full-text search via `query` operates only against the fields configured 4266 as `search_fields` on the schema. 4267 The authenticated user must be a member of the team with sufficient 4268 access. Returns 404 if the team is not found, the caller lacks access, 4269 or `type` does not match a registered schema for the team's organization. 4270 4271 Args: 4272 team: Team ID (`team_...`). Scopes results to objects owned by this team. 4273 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 4274 limit: Maximum number of objects to return per page. 4275 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 4276 row_key: Filter results to objects whose `row_key` exactly matches this value. 4277 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 4278 query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending. 4279 4280 Returns: 4281 Successful response 4282 """ 4283 query: dict[str, object] = {} 4284 query["type"] = type 4285 if limit is not None: 4286 query["limit"] = limit 4287 if offset is not None: 4288 query["offset"] = offset 4289 if row_key is not None: 4290 query["row_key"] = row_key 4291 if sort_key is not None: 4292 query["sort_key"] = sort_key 4293 if query is not None: 4294 query["query"] = query 4295 return await self._http.request( 4296 f"/api/v1/teams/{team}/custom_objects", 4297 query=query, 4298 response_type=TeamCustomObjectListResponse, 4299 ) 4300 4301 async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 4302 """ 4303 Create a team custom object 4304 Creates a new custom object owned by the specified team. The object is 4305 instantiated against the schema identified by `type` (the schema's 4306 `lookup_key`). All field values are validated against that schema's 4307 field definitions before the object is persisted. 4308 The authenticated user must be a member of the team with sufficient 4309 access. If the team is not found or the caller lacks access, the endpoint 4310 returns 404. If `type` does not match a registered schema for the team's 4311 organization, the endpoint also returns 404. 4312 4313 Args: 4314 team: Team ID (`team_...`). Scopes results to objects owned by this team. 4315 input: Request body. 4316 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 4317 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 4318 4319 Returns: 4320 The newly created custom object. 4321 """ 4322 return await self._http.request( 4323 f"/api/v1/teams/{team}/custom_objects", 4324 method="POST", 4325 body=input, 4326 response_type=CustomObject, 4327 ) 4328 4329 4330class AsyncTeamInviteResource: 4331 def __init__(self, http: HttpClient): 4332 self._http = http 4333 4334 async def create(self, team: str) -> TeamInvite: 4335 """ 4336 Create a team invite 4337 Generates a new invite code for the specified team. The authenticated user 4338 must be a member of the team with the `owner` or `admin` role. 4339 The returned code is a short alphanumeric string that other users can 4340 present to join the team. Each call produces a new code; previously issued 4341 codes are not invalidated by this request. Codes expire after seven days. 4342 Sharing a code intentionally grants membership across organizations within 4343 the same application, including access to objects shared with team members. 4344 Treat it as a bearer credential. Revoke an individual code with 4345 DELETE /api/v1/teams/:team/invite/:code before issuing a replacement. 4346 Revocation does not remove existing members or their access. 4347 4348 Args: 4349 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 4350 4351 Returns: 4352 The newly created team invite containing the join code. 4353 """ 4354 return await self._http.request( 4355 f"/api/v1/teams/{team}/invite", 4356 method="POST", 4357 response_type=TeamInvite, 4358 ) 4359 4360 async def delete(self, team: str, code: str) -> None: 4361 """ 4362 Revoke a team invite code 4363 Deletes one invite code for this team. Requires an owner or admin membership. 4364 Future redemption returns 404, as for an unknown or expired code. Existing 4365 memberships and their access are unchanged; remove members separately to end 4366 their access. Redemption already in flight is not cancelled. 4367 To replace a code, revoke it and then create a new invite. Creating a new 4368 invite alone does not invalidate any previous code. Other codes remain valid. 4369 4370 Args: 4371 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 4372 code: The invite code to revoke. 4373 4374 Returns: 4375 No content 4376 """ 4377 await self._http.request(f"/api/v1/teams/{team}/invite/{code}", method="DELETE") 4378 4379 4380class AsyncMemberResource: 4381 def __init__(self, http: HttpClient): 4382 self._http = http 4383 4384 async def remove(self, team: str) -> None: 4385 """ 4386 Remove a member or org from a team 4387 Removes a user, agent, or all members of an organization from the specified 4388 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 4389 one or none returns a 400 error. On success, returns 204 No Content. 4390 When `org` is provided, every user and agent membership belonging to that org 4391 is removed in a single call. The caller must be a member of the team's owning 4392 org to perform an org-scoped removal. You cannot target the team's owning org 4393 itself with this parameter. 4394 The caller must have permission to manage the team. When `app` is present, the 4395 request is scoped to that app and requires a valid app-scoped token. 4396 4397 Args: 4398 team: Team ID (`team_...`). The team to remove the member from. 4399 4400 Returns: 4401 Empty response. Returns 204 No Content on success. 4402 """ 4403 await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 4404 4405 async def list(self, team: str) -> MemberListResponse: 4406 """ 4407 List members of a team 4408 Returns all members of the specified team, including both users and agents. 4409 Members are returned in a single non-paginated array ordered by join time. 4410 Bearer-authenticated users must be a member of the team to retrieve its 4411 member list. Developer and server-to-server callers can retrieve members for 4412 any team visible to their app scope. When `app` is provided, the request is 4413 scoped to that app and requires a valid app-scoped token. 4414 4415 Args: 4416 team: Team ID (`team_...`). The team to remove the member from. 4417 4418 Returns: 4419 Successful response 4420 """ 4421 return await self._http.request( 4422 f"/api/v1/teams/{team}/members", 4423 response_type=MemberListResponse, 4424 ) 4425 4426 async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 4427 """ 4428 Add a member to a team 4429 Adds a user or agent as a member of the specified team and returns the new 4430 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 4431 both or neither returns a 400 error. 4432 Adding a user requires permission to manage the team (team owner, team 4433 admin, or org admin). Adding an agent with the default `"member"` role is 4434 also open to any existing member of the team; assigning an elevated role to 4435 an agent still requires team-manage permission. When an `app` is provided, 4436 the request is scoped to that app and the caller must hold a valid app-scoped 4437 token. The default role is `"member"` when `role` is omitted. 4438 4439 Args: 4440 team: Team ID (`team_...`). The team to remove the member from. 4441 input: Request body. 4442 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 4443 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 4444 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 4445 4446 Returns: 4447 The newly created team membership. 4448 """ 4449 return await self._http.request( 4450 f"/api/v1/teams/{team}/members", 4451 method="POST", 4452 body=input, 4453 response_type=TeamMembership, 4454 ) 4455 4456 async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 4457 """ 4458 Update a team member's role 4459 Changes the role of an existing user member on the specified team. Returns the 4460 updated membership on success. 4461 Only user memberships are supported by this endpoint. Attempting to update an 4462 agent membership returns 404. To change an agent's role, remove the existing 4463 membership and re-add the agent with the desired role. 4464 The caller must have permission to modify the team. You cannot change a member's 4465 role across organization boundaries. Demoting the last owner of a team returns 4466 409. An invalid `role` value returns 422. When `app` is provided, the request 4467 is scoped to that app and requires a valid app-scoped token. 4468 4469 Args: 4470 team: Team ID (`team_...`). The team to remove the member from. 4471 user: User ID (`usr_...`) of the existing member whose role should be changed. 4472 input: Request body. 4473 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 4474 4475 Returns: 4476 The updated team membership reflecting the new role. 4477 """ 4478 return await self._http.request( 4479 f"/api/v1/teams/{team}/members/{user}", 4480 method="PATCH", 4481 body=input, 4482 response_type=TeamMembership, 4483 ) 4484 4485 4486class AsyncTeamTaskResource: 4487 def __init__(self, http: HttpClient): 4488 self._http = http 4489 4490 async def list( 4491 self, 4492 team: str, 4493 *, 4494 user: str | None = None, 4495 org: str | None = None, 4496 status: str | None = None, 4497 owner_user: str | None = None, 4498 owner_agent: str | None = None, 4499 priority: int | None = None, 4500 tag: str | None = None, 4501 parent: str | None = None, 4502 source_scope: str | None = None, 4503 source_type: str | None = None, 4504 source_id: str | None = None, 4505 epic: str | None = None, 4506 search: str | None = None, 4507 sort: str | None = None, 4508 order: str | None = None, 4509 due_before: str | None = None, 4510 due_after: str | None = None, 4511 overdue: bool | None = None, 4512 ready: bool | None = None, 4513 attention: bool | None = None, 4514 limit: int | None = None, 4515 after_cursor: str | None = None, 4516 ) -> TeamTaskListResponse: 4517 """ 4518 List an owner's tasks 4519 Returns tasks owned by the specified user or team. You can narrow results using the 4520 optional filters below. By default results are returned in reverse chronological 4521 order (most recently created first); use `sort` and `order` to sort by due date or 4522 priority instead. 4523 User-authenticated callers may list their personal tasks or tasks for teams they 4524 have joined. Privileged callers provide the owner in the route; the owner's 4525 organization is implied by that principal. An explicit `org` is optional and, 4526 when set, must match the owner's organization. 4527 4528 Args: 4529 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4530 user: User ID (`usr_...`) for user-scoped tasks. 4531 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 4532 status: Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses. 4533 owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`). 4534 owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`). 4535 priority: Filter tasks by priority, from 0 (highest) to 4 (lowest). 4536 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 4537 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 4538 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4539 source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters. 4540 source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters. 4541 epic: Return only tasks with this exact epic label. 4542 search: Restrict results to tasks whose name or description contains this string. 4543 sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created. 4544 order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`. 4545 due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded. 4546 due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded. 4547 overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue. 4548 ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work. 4549 attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry. 4550 limit: Maximum number of tasks to return. Capped at 100. 4551 after_cursor: Opaque cursor returned by the previous page. 4552 4553 Returns: 4554 Successful response 4555 """ 4556 query: dict[str, object] = {} 4557 if user is not None: 4558 query["user"] = user 4559 if org is not None: 4560 query["org"] = org 4561 if status is not None: 4562 query["status"] = status 4563 if owner_user is not None: 4564 query["owner_user"] = owner_user 4565 if owner_agent is not None: 4566 query["owner_agent"] = owner_agent 4567 if priority is not None: 4568 query["priority"] = priority 4569 if tag is not None: 4570 query["tag"] = tag 4571 if parent is not None: 4572 query["parent"] = parent 4573 if source_scope is not None: 4574 query["source_scope"] = source_scope 4575 if source_type is not None: 4576 query["source_type"] = source_type 4577 if source_id is not None: 4578 query["source_id"] = source_id 4579 if epic is not None: 4580 query["epic"] = epic 4581 if search is not None: 4582 query["search"] = search 4583 if sort is not None: 4584 query["sort"] = sort 4585 if order is not None: 4586 query["order"] = order 4587 if due_before is not None: 4588 query["due_before"] = due_before 4589 if due_after is not None: 4590 query["due_after"] = due_after 4591 if overdue is not None: 4592 query["overdue"] = overdue 4593 if ready is not None: 4594 query["ready"] = ready 4595 if attention is not None: 4596 query["attention"] = attention 4597 if limit is not None: 4598 query["limit"] = limit 4599 if after_cursor is not None: 4600 query["after_cursor"] = after_cursor 4601 return await self._http.request( 4602 f"/api/v1/teams/{team}/tasks", 4603 query=query, 4604 response_type=TeamTaskListResponse, 4605 ) 4606 4607 async def create(self, team: str, input: TeamTaskCreateInput) -> Task: 4608 """ 4609 Create a task for an owner 4610 Creates a new task owned by the specified user or team and returns the full 4611 task object. User-authenticated calls are attributed to the authenticated 4612 user or agent. App-scoped developer and server-to-server callers must provide 4613 the task's explicit `org` scope and an explicit `user` or `agent` actor for 4614 team tasks; a user-owned task reuses the user in the route unless an explicit 4615 agent is supplied. Every referenced principal is validated against the app, 4616 owner, and team membership before creation. 4617 4618 Args: 4619 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4620 input: Request body. 4621 input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner. 4622 input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. 4623 input.task: Attributes for the task to create. `name` is required; all other fields are optional. 4624 input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call. 4625 4626 Returns: 4627 The newly created task. 4628 """ 4629 return await self._http.request( 4630 f"/api/v1/teams/{team}/tasks", 4631 method="POST", 4632 body=input, 4633 response_type=Task, 4634 ) 4635 4636 async def blocker_cycles( 4637 self, 4638 team: str, 4639 *, 4640 user: str | None = None, 4641 org: str | None = None, 4642 limit: int | None = None, 4643 after_cursor: str | None = None, 4644 ) -> TeamTaskBlockerCyclesResponse: 4645 """ 4646 List task blocker cycles 4647 Runs an on-demand diagnostic over unfinished tasks owned by the specified 4648 team or user and returns a forward cursor-paginated page of complete cyclic 4649 blocker components. Detection is bounded to owners with at most 100 4650 unfinished tasks. This endpoint is read-only: cycles do not prevent task 4651 updates, lease acquisition, or completion. 4652 4653 Args: 4654 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4655 user: User ID (`usr_...`) owning the tasks. 4656 org: Optional organization context for privileged callers. 4657 limit: Maximum cycle components to return. Defaults to 50; maximum is 100. 4658 after_cursor: Opaque cursor returned by the preceding page. 4659 4660 Returns: 4661 Successful response 4662 """ 4663 query: dict[str, object] = {} 4664 if user is not None: 4665 query["user"] = user 4666 if org is not None: 4667 query["org"] = org 4668 if limit is not None: 4669 query["limit"] = limit 4670 if after_cursor is not None: 4671 query["after_cursor"] = after_cursor 4672 return await self._http.request( 4673 f"/api/v1/teams/{team}/tasks/blocker_cycles", 4674 query=query, 4675 response_type=TeamTaskBlockerCyclesResponse, 4676 ) 4677 4678 async def by_source(self, team: str, input: TeamTaskBySourceInput) -> TaskEnsureResult: 4679 """ 4680 Find or create a task by source 4681 Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted. 4682 4683 Args: 4684 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4685 input: Request body. 4686 input.agent: Explicit acting agent for privileged callers. 4687 input.description: Initial task description. 4688 input.epic: Initial epic grouping. 4689 input.name: Initial task name. 4690 input.org: Explicit organization for privileged callers. 4691 input.source_id: Source identity, for example owner/repo#123. 4692 input.source_scope: Source scope, for example github. 4693 input.source_type: Source type, for example pull_request. 4694 input.status: Initial task status. 4695 input.user: User owner, or explicit acting user on a team route. 4696 4697 Returns: 4698 The task and whether this request created it. 4699 """ 4700 return await self._http.request( 4701 f"/api/v1/teams/{team}/tasks/by-source", 4702 method="PUT", 4703 body=input, 4704 response_type=TaskEnsureResult, 4705 ) 4706 4707 async def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse: 4708 """ 4709 Get task activity metrics for a team 4710 Returns task activity metrics scoped to one team (the Network in ArchAgents). 4711 `open` counts currently open or in-progress team tasks, `created` counts 4712 tasks inserted in the UTC-day window, and `completed` counts tasks whose 4713 `closed_at` falls in that window while still in a closed status. Hard-deleted 4714 tasks are absent from the projection and therefore omitted. The daily series 4715 is zero-filled across the requested window and includes reconstructed 4716 end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at). 4717 Any authenticated team member may read this count-only Network summary. 4718 Requests from callers without team access return 404 so team existence is 4719 not disclosed. 4720 4721 Args: 4722 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4723 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 4724 4725 Returns: 4726 Successful response 4727 """ 4728 query: dict[str, object] = {} 4729 if days is not None: 4730 query["days"] = days 4731 return await self._http.request( 4732 f"/api/v1/teams/{team}/tasks/metrics", 4733 query=query, 4734 response_type=TeamTaskMetricsResponse, 4735 ) 4736 4737 async def ready( 4738 self, 4739 team: str, 4740 *, 4741 user: str | None = None, 4742 org: str | None = None, 4743 explain: bool | None = None, 4744 assigned_to_me: bool | None = None, 4745 source_scope: str | None = None, 4746 source_type: str | None = None, 4747 source_id: str | None = None, 4748 epic: str | None = None, 4749 limit: int | None = None, 4750 after_cursor: str | None = None, 4751 ) -> TeamTaskReadyResponse: 4752 """ 4753 List an owner's ready tasks 4754 Returns open tasks with no unfinished blockers and no active session lease. 4755 Readiness is calculated by the server from the current task projection. It is 4756 a snapshot, not a reservation; claim a task lease before starting work. 4757 Results are ordered by priority (0, the most urgent, first), then oldest 4758 first, so the first page is always the most urgent ready work. 4759 Pass `explain=true` to include every open task with a stable readiness reason. 4760 4761 Args: 4762 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4763 user: User ID (`usr_...`) owning the tasks. 4764 org: Optional organization context for privileged callers. 4765 explain: Include blocked and actively leased open tasks with exclusion reasons. 4766 assigned_to_me: Only include tasks assigned to the authenticated user. 4767 source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4768 source_type: Only include tasks whose source matches this object kind. 4769 source_id: Only include tasks whose source matches this object identity. 4770 epic: Only include tasks with this exact epic label. 4771 limit: Maximum number of readiness entries to return. Capped at 100. 4772 after_cursor: Opaque cursor returned by the previous page. 4773 4774 Returns: 4775 Successful response 4776 """ 4777 query: dict[str, object] = {} 4778 if user is not None: 4779 query["user"] = user 4780 if org is not None: 4781 query["org"] = org 4782 if explain is not None: 4783 query["explain"] = explain 4784 if assigned_to_me is not None: 4785 query["assigned_to_me"] = assigned_to_me 4786 if source_scope is not None: 4787 query["source_scope"] = source_scope 4788 if source_type is not None: 4789 query["source_type"] = source_type 4790 if source_id is not None: 4791 query["source_id"] = source_id 4792 if epic is not None: 4793 query["epic"] = epic 4794 if limit is not None: 4795 query["limit"] = limit 4796 if after_cursor is not None: 4797 query["after_cursor"] = after_cursor 4798 return await self._http.request( 4799 f"/api/v1/teams/{team}/tasks/ready", 4800 query=query, 4801 response_type=TeamTaskReadyResponse, 4802 ) 4803 4804 async def search( 4805 self, 4806 team: str, 4807 *, 4808 user: str | None = None, 4809 org: str | None = None, 4810 q: str | None = None, 4811 query: str | None = None, 4812 status: str | None = None, 4813 owner_user: str | None = None, 4814 owner_agent: str | None = None, 4815 priority: int | None = None, 4816 tag: str | None = None, 4817 parent: str | None = None, 4818 source_scope: str | None = None, 4819 source_type: str | None = None, 4820 source_id: str | None = None, 4821 epic: str | None = None, 4822 limit: int | None = None, 4823 after_cursor: str | None = None, 4824 ) -> TeamTaskSearchResponse: 4825 """ 4826 Search an owner's tasks 4827 Performs a full-text search over tasks owned by the specified user or team and returns 4828 matching results. Combine `q` with the optional filters to narrow the result set 4829 further. When no query is provided, the endpoint behaves like a filtered list. 4830 The `query` field in the response echoes the effective search query. 4831 User-authenticated callers may search their personal tasks or tasks for teams 4832 they have joined. Privileged callers provide the owner in the route; the owner's 4833 organization is implied by that principal. An explicit `org` is optional and, 4834 when set, must match the owner's organization. 4835 4836 Args: 4837 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4838 user: User ID (`usr_...`) whose tasks are searched. 4839 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 4840 q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided. 4841 query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility. 4842 status: Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses. 4843 owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`). 4844 owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`). 4845 priority: Filter results by priority, from 0 (highest) to 4 (lowest). 4846 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 4847 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 4848 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4849 source_type: Return only tasks whose source matches this object kind. 4850 source_id: Return only tasks whose source matches this object identity. 4851 epic: Return only tasks with this exact epic label. 4852 limit: Maximum number of tasks to return. Capped at 100. 4853 after_cursor: Opaque cursor returned by the previous page. 4854 4855 Returns: 4856 Successful response 4857 """ 4858 query: dict[str, object] = {} 4859 if user is not None: 4860 query["user"] = user 4861 if org is not None: 4862 query["org"] = org 4863 if q is not None: 4864 query["q"] = q 4865 if query is not None: 4866 query["query"] = query 4867 if status is not None: 4868 query["status"] = status 4869 if owner_user is not None: 4870 query["owner_user"] = owner_user 4871 if owner_agent is not None: 4872 query["owner_agent"] = owner_agent 4873 if priority is not None: 4874 query["priority"] = priority 4875 if tag is not None: 4876 query["tag"] = tag 4877 if parent is not None: 4878 query["parent"] = parent 4879 if source_scope is not None: 4880 query["source_scope"] = source_scope 4881 if source_type is not None: 4882 query["source_type"] = source_type 4883 if source_id is not None: 4884 query["source_id"] = source_id 4885 if epic is not None: 4886 query["epic"] = epic 4887 if limit is not None: 4888 query["limit"] = limit 4889 if after_cursor is not None: 4890 query["after_cursor"] = after_cursor 4891 return await self._http.request( 4892 f"/api/v1/teams/{team}/tasks/search", 4893 query=query, 4894 response_type=TeamTaskSearchResponse, 4895 ) 4896 4897 4898class AsyncTeamThreadResource: 4899 def __init__(self, http: HttpClient): 4900 self._http = http 4901 4902 async def list( 4903 self, team: str, *, tags: builtins.list[str] | None = None 4904 ) -> TeamThreadListResponse: 4905 """ 4906 List threads for a team 4907 Returns all threads owned by the specified team that the authenticated caller 4908 has permission to view. The caller must have access to the team; requests 4909 without team access are rejected with 404. 4910 Threads are returned in a single `data` array, ordered with the team's 4911 default thread first, then by most recent activity (newest first). Each 4912 thread carries a `last_activity` timestamp the most recent message's 4913 creation time, falling back to the thread's own creation time. Use the 4914 team-scoped thread endpoints to create, update, or delete individual 4915 threads. 4916 4917 Args: 4918 team: Team ID (`tem_...`) whose threads should be listed. 4919 tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`. 4920 4921 Returns: 4922 Successful response 4923 """ 4924 query: dict[str, object] = {} 4925 if tags is not None: 4926 query["tags"] = tags 4927 return await self._http.request( 4928 f"/api/v1/teams/{team}/threads", 4929 query=query, 4930 response_type=TeamThreadListResponse, 4931 ) 4932 4933 async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 4934 """ 4935 Create a thread for a team 4936 Creates a new thread owned by the specified team. The authenticated caller must 4937 have access to the team; requests from callers without team access are rejected 4938 with 404. 4939 If a `profile_picture` is provided in the thread params, it must be 4940 base64-encoded image data. The image is uploaded and associated with the thread 4941 before creation completes. Omit `profile_picture` to skip this step. 4942 By default the platform sends an automatic welcome message into the new thread. 4943 Pass `skip_welcome_message: true` to suppress this behavior, for example when 4944 creating threads programmatically in bulk or seeding test data. 4945 4946 Args: 4947 team: Team ID (`tem_...`) whose threads should be listed. 4948 input: Request body. 4949 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 4950 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 4951 4952 Returns: 4953 The newly created thread. 4954 """ 4955 return await self._http.request( 4956 f"/api/v1/teams/{team}/threads", 4957 method="POST", 4958 body=input, 4959 response_type=Thread, 4960 ) 4961 4962 async def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse: 4963 """ 4964 Get threads-created count for a team 4965 Returns how many **network-public** team threads were created in the UTC-day 4966 window. Counts come from realtime SQL aggregation over append-only 4967 `network_activity_events` (`thread.created` rows co-committed with create): 4968 team- or restricted-visibility threads (plus legacy open-team rows), never 4969 private or mirror. Every Network member sees the same number. Hard-delete 4970 co-commits a separate `thread.deleted` transition event and does not remove 4971 create events (metric is "created", not "still present"). Visibility flips 4972 after insert are ignored in v1. 4973 Any authenticated team member may read this count-only Network summary. 4974 Requests from callers without team access return 404 so team existence is 4975 not disclosed. 4976 4977 Args: 4978 team: Team ID (`tem_...`) whose threads should be listed. 4979 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 4980 4981 Returns: 4982 Successful response 4983 """ 4984 query: dict[str, object] = {} 4985 if days is not None: 4986 query["days"] = days 4987 return await self._http.request( 4988 f"/api/v1/teams/{team}/threads/metrics", 4989 query=query, 4990 response_type=TeamThreadMetricsResponse, 4991 ) 4992 4993 4994class AsyncTeamResource: 4995 def __init__(self, http: HttpClient): 4996 self._http = http 4997 self.custom_objects = AsyncTeamCustomObjectResource(http) 4998 self.invite = AsyncTeamInviteResource(http) 4999 self.members = AsyncMemberResource(http) 5000 self.tasks = AsyncTeamTaskResource(http) 5001 self.threads = AsyncTeamThreadResource(http) 5002 5003 async def list( 5004 self, 5005 *, 5006 page: int | None = None, 5007 page_size: int | None = None, 5008 search: str | None = None, 5009 metadata: dict[str, Any] | None = None, 5010 membership: str | None = None, 5011 ) -> TeamListResponse: 5012 """ 5013 List teams 5014 Returns a paginated list of teams visible to the authenticated user, ordered 5015 by creation time descending. Use `membership` to narrow results to teams the 5016 caller has joined or teams they are eligible to join based on their ACL 5017 visibility. 5018 Supports full-text search across team name and description via `search`, and 5019 structured metadata filtering via `metadata`. When `app` is present, results 5020 are scoped to that app and the caller must hold the corresponding app scope. 5021 5022 Args: 5023 page: Page number to retrieve, starting at 1. Defaults to 1. 5024 page_size: Number of teams to return per page. Defaults to 25. 5025 search: Full-text search string matched against team name and description. 5026 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 5027 membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams. 5028 5029 Returns: 5030 Successful response 5031 """ 5032 query: dict[str, object] = {} 5033 if page is not None: 5034 query["page"] = page 5035 if page_size is not None: 5036 query["page_size"] = page_size 5037 if search is not None: 5038 query["search"] = search 5039 if metadata is not None: 5040 query["metadata"] = metadata 5041 if membership is not None: 5042 query["membership"] = membership 5043 return await self._http.request( 5044 "/api/v1/teams", 5045 query=query, 5046 response_type=TeamListResponse, 5047 ) 5048 5049 async def create(self, input: TeamCreateInput) -> Team: 5050 """ 5051 Create a team 5052 Creates a new team and returns the created team object. The authenticated 5053 user becomes the team's owner. 5054 When `app` is supplied, the request is scoped to that app and the caller 5055 must hold the corresponding app scope. Omit `org` unless you want the team 5056 pinned to a specific organization. A default chat thread is provisioned for 5057 the team automatically after creation. 5058 5059 Args: 5060 input: Request body. 5061 input.acl: Access control configuration for the team. Controls who can discover and join the team. 5062 input.description: Optional human-readable description of the team's purpose. 5063 input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team. 5064 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 5065 input.name: Display name for the team. 5066 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 5067 5068 Returns: 5069 The newly created team. 5070 """ 5071 return await self._http.request( 5072 "/api/v1/teams", 5073 method="POST", 5074 body=input, 5075 response_type=Team, 5076 ) 5077 5078 async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 5079 """ 5080 Join a team with an invite code 5081 Adds a principal to a team using a 12-character invite code. The invite 5082 code can be supplied as either `join_code` or `invite_code`; both are 5083 accepted for backwards compatibility. 5084 For user-authenticated requests, the currently authenticated user is added 5085 to the team. For server-to-server requests, you must supply either `agent` 5086 (to add an agent) or `user` (to add a specific user by ID). If the user 5087 is already a member of the team, the request succeeds without creating a 5088 duplicate membership. 5089 This endpoint is rate-limited to 10 requests per minute per IP address to 5090 prevent invite-code enumeration. 5091 5092 Args: 5093 input: Request body. 5094 input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. 5095 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 5096 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 5097 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 5098 5099 Returns: 5100 The team the principal has joined. 5101 """ 5102 return await self._http.request( 5103 "/api/v1/teams/join_by_code", 5104 method="POST", 5105 body=input, 5106 response_type=Team, 5107 ) 5108 5109 async def delete(self, team: str) -> None: 5110 """ 5111 Delete a team 5112 Permanently deletes the team identified by `team`. This action is 5113 irreversible all team memberships, settings, and associated data are 5114 removed. 5115 The caller must be the team owner or an org admin. When `app` is present, 5116 the caller must also hold the corresponding app scope. 5117 5118 Args: 5119 team: Team ID (`team_...`) of the team to delete. 5120 5121 Returns: 5122 Empty response the team has been deleted. 5123 """ 5124 await self._http.request(f"/api/v1/teams/{team}", method="DELETE") 5125 5126 async def get(self, team: str) -> Team: 5127 """ 5128 Retrieve a team 5129 Returns the full team object for the given `team` ID, including its current 5130 member list and all associated threads. 5131 The authenticated user must be a member of the team or hold a role that 5132 grants visibility (org admin, app scope). When `app` is supplied, the 5133 caller must hold the corresponding app scope. 5134 5135 Args: 5136 team: Team ID (`team_...`) of the team to retrieve. 5137 5138 Returns: 5139 The requested team, including its members and threads. 5140 """ 5141 return await self._http.request(f"/api/v1/teams/{team}", response_type=Team) 5142 5143 async def update(self, team: str, input: TeamUpdateInput) -> Team: 5144 """ 5145 Update a team 5146 Updates one or more attributes of the team identified by `team`. Only the 5147 fields you provide are changed; omitted fields are left as-is. 5148 To replace the team's profile picture, supply the `profile_picture` object 5149 with base64-encoded image data. The previous picture is deleted after the 5150 new one is successfully uploaded. When `app` is present, the caller must hold 5151 the corresponding app scope. The caller must be a team owner or org admin. 5152 5153 Args: 5154 team: Team ID (`team_...`) of the team to update. 5155 input: Request body. 5156 input.acl: New access control configuration for the team. Replaces the existing ACL. 5157 input.description: New human-readable description of the team's purpose. 5158 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 5159 input.name: New display name for the team. 5160 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 5161 5162 Returns: 5163 The updated team with all changes applied. 5164 """ 5165 return await self._http.request( 5166 f"/api/v1/teams/{team}", 5167 method="PATCH", 5168 body=input, 5169 response_type=Team, 5170 ) 5171 5172 async def artifacts( 5173 self, team: str, *, group_key: str | None = None, group_key_prefix: str | None = None 5174 ) -> TeamArtifactsResponse: 5175 """ 5176 List a team's artifacts 5177 Returns all artifacts owned by the specified team. Artifacts represent 5178 AI-generated or user-uploaded files associated with agent sessions, 5179 threads, or sandboxes such as images, documents, and code outputs. 5180 The authenticated user must be a member of the team. Attempting to list 5181 artifacts for a team the caller does not have access to returns 404 5182 rather than 403 to avoid leaking team existence. 5183 Results are returned in a single page without cursor pagination. Each 5184 artifact in the response reflects the state of its current version, 5185 including a short-lived signed `file_url` for direct download. 5186 5187 Args: 5188 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 5189 group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match. 5190 group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key. 5191 5192 Returns: 5193 Successful response 5194 """ 5195 query: dict[str, object] = {} 5196 if group_key is not None: 5197 query["group_key"] = group_key 5198 if group_key_prefix is not None: 5199 query["group_key_prefix"] = group_key_prefix 5200 return await self._http.request( 5201 f"/api/v1/teams/{team}/artifacts", 5202 query=query, 5203 response_type=TeamArtifactsResponse, 5204 ) 5205 5206 async def dependents(self, team: str) -> TeamDeleteImpactResponse: 5207 """ 5208 Preview Team deletion impact 5209 Returns the number of stored custom-object rows that deleting this Team will 5210 physically delete. The count includes rows hidden after ordinary soft 5211 deletion. This read-only preview does not delete or restore data. 5212 5213 Args: 5214 team: Team ID (`team_...`) to inspect. 5215 5216 Returns: 5217 Stored custom-object rows and the existing physical-deletion contract. 5218 """ 5219 return await self._http.request( 5220 f"/api/v1/teams/{team}/dependents", 5221 response_type=TeamDeleteImpactResponse, 5222 ) 5223 5224 async def invites(self, team: str) -> TeamInvitesResponse: 5225 """ 5226 Create a team invite (server-to-server) 5227 Generates a new invite code for the specified team using server-to-server 5228 authentication. Unlike the user-facing create endpoint, this variant does not 5229 require the caller to be a team member it is intended for privileged 5230 back-end services acting on behalf of your platform. 5231 The returned code is a short alphanumeric string that users can present to 5232 join the team. Each call produces a new code; previously issued codes are 5233 not invalidated by this request. 5234 5235 Args: 5236 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5237 5238 Returns: 5239 Successful response 5240 """ 5241 return await self._http.request( 5242 f"/api/v1/teams/{team}/invites", 5243 method="POST", 5244 response_type=TeamInvitesResponse, 5245 ) 5246 5247 async def join(self, team: str, input: TeamJoinInput) -> None: 5248 """ 5249 Join a team 5250 Adds a principal to a team that is visible to the authenticated user. 5251 By default, the currently authenticated user joins the team. Provide `agent` 5252 to add an agent to the team instead the caller must already be a member of 5253 the team to do so. Provide `user` (by ID) or `email` to add another user from 5254 your organization the caller must be a team owner, team admin, or org admin. 5255 Only one of `agent`, `user`, or `email` may be supplied per request. 5256 If the target principal is already a member of the team, the request succeeds 5257 without creating a duplicate membership. Server-to-server callers are not 5258 permitted to use this endpoint; use the invite-code endpoint instead. 5259 5260 Args: 5261 team: Team ID (`team_...`) to join. 5262 input: Request body. 5263 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 5264 input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 5265 input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 5266 5267 Returns: 5268 Empty response the principal is now a member of the team. 5269 """ 5270 await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 5271 5272 async def leave(self, team: str) -> None: 5273 """ 5274 Leave a team 5275 Removes a principal from a team. By default, the authenticated user removes 5276 themselves from the team. Provide `agent` to remove an agent instead the 5277 caller must be a member of the team to do so. 5278 Team owners cannot leave their own team. To transfer ownership first, use 5279 the update-membership endpoint, then call this endpoint. 5280 For server-to-server requests, `user` is required to identify which user 5281 should be removed. 5282 5283 Args: 5284 team: Team ID (`team_...`) to leave. 5285 5286 Returns: 5287 Empty response the principal has been removed from the team. 5288 """ 5289 await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE") 5290 5291 async def task_assignees( 5292 self, team: str, *, org: str | None = None 5293 ) -> TeamTaskAssigneesResponse: 5294 """ 5295 List task assignees for a team 5296 Returns the list of principals users and agents that can be assigned 5297 to tasks within the team. Results include both human members and AI agents 5298 and are sorted alphabetically by display name. 5299 This endpoint is only available for team-scoped contexts. Calling it with a 5300 user-scoped owner returns a 400 error. The authenticated user must be a 5301 member of the team or hold org-admin access. App-scoped developer and 5302 server-to-server callers may list assignees for teams in their app so they 5303 can select the explicit user or agent actor required by privileged task 5304 mutations. 5305 5306 Args: 5307 team: Team ID (`tem_...`). 5308 org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization. 5309 5310 Returns: 5311 Successful response 5312 """ 5313 query: dict[str, object] = {} 5314 if org is not None: 5315 query["org"] = org 5316 return await self._http.request( 5317 f"/api/v1/teams/{team}/task_assignees", 5318 query=query, 5319 response_type=TeamTaskAssigneesResponse, 5320 ) 5321 5322 async def task_epics( 5323 self, 5324 team: str, 5325 *, 5326 user: str | None = None, 5327 org: str | None = None, 5328 source_scope: str | None = None, 5329 source_type: str | None = None, 5330 source_id: str | None = None, 5331 top_priority: int | None = None, 5332 include_closed: bool | None = None, 5333 limit: int | None = None, 5334 after_cursor: str | None = None, 5335 ) -> TeamTaskEpicsResponse: 5336 """ 5337 List an owner's epic summaries 5338 Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created. 5339 5340 Args: 5341 source_scope: Exact source scope; supply all three source fields. 5342 source_type: Exact source type. 5343 source_id: Exact source ID. 5344 top_priority: Exact highest open priority, from 0 to 4. 5345 include_closed: Include epics with no non-closed tasks; defaults to false. 5346 limit: Maximum epics; defaults to 50, capped at 100. 5347 after_cursor: Opaque forward cursor from the preceding page. 5348 5349 Returns: 5350 Successful response 5351 """ 5352 query: dict[str, object] = {} 5353 if user is not None: 5354 query["user"] = user 5355 if org is not None: 5356 query["org"] = org 5357 if source_scope is not None: 5358 query["source_scope"] = source_scope 5359 if source_type is not None: 5360 query["source_type"] = source_type 5361 if source_id is not None: 5362 query["source_id"] = source_id 5363 if top_priority is not None: 5364 query["top_priority"] = top_priority 5365 if include_closed is not None: 5366 query["include_closed"] = include_closed 5367 if limit is not None: 5368 query["limit"] = limit 5369 if after_cursor is not None: 5370 query["after_cursor"] = after_cursor 5371 return await self._http.request( 5372 f"/api/v1/teams/{team}/task_epics", 5373 query=query, 5374 response_type=TeamTaskEpicsResponse, 5375 ) 5376 5377 5378class TeamCustomObjectResource: 5379 def __init__(self, http: SyncHttpClient): 5380 self._http = http 5381 5382 def list( 5383 self, 5384 team: str, 5385 type: str, 5386 *, 5387 limit: int | None = None, 5388 offset: int | None = None, 5389 row_key: str | None = None, 5390 sort_key: str | None = None, 5391 query: str | None = None, 5392 ) -> TeamCustomObjectListResponse: 5393 """ 5394 List a team's custom objects 5395 Returns a paginated list of custom objects owned by the specified team, 5396 filtered to a single schema type. Results are ordered by creation time 5397 descending unless `query` is provided, in which case they are ordered by 5398 full-text relevance score descending. 5399 Use `limit` and `offset` for page-based pagination. Use `row_key` or 5400 `sort_key` to narrow results to objects matching those index values. 5401 Full-text search via `query` operates only against the fields configured 5402 as `search_fields` on the schema. 5403 The authenticated user must be a member of the team with sufficient 5404 access. Returns 404 if the team is not found, the caller lacks access, 5405 or `type` does not match a registered schema for the team's organization. 5406 5407 Args: 5408 team: Team ID (`team_...`). Scopes results to objects owned by this team. 5409 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 5410 limit: Maximum number of objects to return per page. 5411 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 5412 row_key: Filter results to objects whose `row_key` exactly matches this value. 5413 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 5414 query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending. 5415 5416 Returns: 5417 Successful response 5418 """ 5419 query: dict[str, object] = {} 5420 query["type"] = type 5421 if limit is not None: 5422 query["limit"] = limit 5423 if offset is not None: 5424 query["offset"] = offset 5425 if row_key is not None: 5426 query["row_key"] = row_key 5427 if sort_key is not None: 5428 query["sort_key"] = sort_key 5429 if query is not None: 5430 query["query"] = query 5431 return self._http.request( 5432 f"/api/v1/teams/{team}/custom_objects", 5433 query=query, 5434 response_type=TeamCustomObjectListResponse, 5435 ) 5436 5437 def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 5438 """ 5439 Create a team custom object 5440 Creates a new custom object owned by the specified team. The object is 5441 instantiated against the schema identified by `type` (the schema's 5442 `lookup_key`). All field values are validated against that schema's 5443 field definitions before the object is persisted. 5444 The authenticated user must be a member of the team with sufficient 5445 access. If the team is not found or the caller lacks access, the endpoint 5446 returns 404. If `type` does not match a registered schema for the team's 5447 organization, the endpoint also returns 404. 5448 5449 Args: 5450 team: Team ID (`team_...`). Scopes results to objects owned by this team. 5451 input: Request body. 5452 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 5453 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 5454 5455 Returns: 5456 The newly created custom object. 5457 """ 5458 return self._http.request( 5459 f"/api/v1/teams/{team}/custom_objects", 5460 method="POST", 5461 body=input, 5462 response_type=CustomObject, 5463 ) 5464 5465 5466class TeamInviteResource: 5467 def __init__(self, http: SyncHttpClient): 5468 self._http = http 5469 5470 def create(self, team: str) -> TeamInvite: 5471 """ 5472 Create a team invite 5473 Generates a new invite code for the specified team. The authenticated user 5474 must be a member of the team with the `owner` or `admin` role. 5475 The returned code is a short alphanumeric string that other users can 5476 present to join the team. Each call produces a new code; previously issued 5477 codes are not invalidated by this request. Codes expire after seven days. 5478 Sharing a code intentionally grants membership across organizations within 5479 the same application, including access to objects shared with team members. 5480 Treat it as a bearer credential. Revoke an individual code with 5481 DELETE /api/v1/teams/:team/invite/:code before issuing a replacement. 5482 Revocation does not remove existing members or their access. 5483 5484 Args: 5485 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5486 5487 Returns: 5488 The newly created team invite containing the join code. 5489 """ 5490 return self._http.request( 5491 f"/api/v1/teams/{team}/invite", 5492 method="POST", 5493 response_type=TeamInvite, 5494 ) 5495 5496 def delete(self, team: str, code: str) -> None: 5497 """ 5498 Revoke a team invite code 5499 Deletes one invite code for this team. Requires an owner or admin membership. 5500 Future redemption returns 404, as for an unknown or expired code. Existing 5501 memberships and their access are unchanged; remove members separately to end 5502 their access. Redemption already in flight is not cancelled. 5503 To replace a code, revoke it and then create a new invite. Creating a new 5504 invite alone does not invalidate any previous code. Other codes remain valid. 5505 5506 Args: 5507 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5508 code: The invite code to revoke. 5509 5510 Returns: 5511 No content 5512 """ 5513 self._http.request(f"/api/v1/teams/{team}/invite/{code}", method="DELETE") 5514 5515 5516class MemberResource: 5517 def __init__(self, http: SyncHttpClient): 5518 self._http = http 5519 5520 def remove(self, team: str) -> None: 5521 """ 5522 Remove a member or org from a team 5523 Removes a user, agent, or all members of an organization from the specified 5524 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 5525 one or none returns a 400 error. On success, returns 204 No Content. 5526 When `org` is provided, every user and agent membership belonging to that org 5527 is removed in a single call. The caller must be a member of the team's owning 5528 org to perform an org-scoped removal. You cannot target the team's owning org 5529 itself with this parameter. 5530 The caller must have permission to manage the team. When `app` is present, the 5531 request is scoped to that app and requires a valid app-scoped token. 5532 5533 Args: 5534 team: Team ID (`team_...`). The team to remove the member from. 5535 5536 Returns: 5537 Empty response. Returns 204 No Content on success. 5538 """ 5539 self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 5540 5541 def list(self, team: str) -> MemberListResponse: 5542 """ 5543 List members of a team 5544 Returns all members of the specified team, including both users and agents. 5545 Members are returned in a single non-paginated array ordered by join time. 5546 Bearer-authenticated users must be a member of the team to retrieve its 5547 member list. Developer and server-to-server callers can retrieve members for 5548 any team visible to their app scope. When `app` is provided, the request is 5549 scoped to that app and requires a valid app-scoped token. 5550 5551 Args: 5552 team: Team ID (`team_...`). The team to remove the member from. 5553 5554 Returns: 5555 Successful response 5556 """ 5557 return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse) 5558 5559 def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 5560 """ 5561 Add a member to a team 5562 Adds a user or agent as a member of the specified team and returns the new 5563 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 5564 both or neither returns a 400 error. 5565 Adding a user requires permission to manage the team (team owner, team 5566 admin, or org admin). Adding an agent with the default `"member"` role is 5567 also open to any existing member of the team; assigning an elevated role to 5568 an agent still requires team-manage permission. When an `app` is provided, 5569 the request is scoped to that app and the caller must hold a valid app-scoped 5570 token. The default role is `"member"` when `role` is omitted. 5571 5572 Args: 5573 team: Team ID (`team_...`). The team to remove the member from. 5574 input: Request body. 5575 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 5576 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 5577 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 5578 5579 Returns: 5580 The newly created team membership. 5581 """ 5582 return self._http.request( 5583 f"/api/v1/teams/{team}/members", 5584 method="POST", 5585 body=input, 5586 response_type=TeamMembership, 5587 ) 5588 5589 def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 5590 """ 5591 Update a team member's role 5592 Changes the role of an existing user member on the specified team. Returns the 5593 updated membership on success. 5594 Only user memberships are supported by this endpoint. Attempting to update an 5595 agent membership returns 404. To change an agent's role, remove the existing 5596 membership and re-add the agent with the desired role. 5597 The caller must have permission to modify the team. You cannot change a member's 5598 role across organization boundaries. Demoting the last owner of a team returns 5599 409. An invalid `role` value returns 422. When `app` is provided, the request 5600 is scoped to that app and requires a valid app-scoped token. 5601 5602 Args: 5603 team: Team ID (`team_...`). The team to remove the member from. 5604 user: User ID (`usr_...`) of the existing member whose role should be changed. 5605 input: Request body. 5606 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 5607 5608 Returns: 5609 The updated team membership reflecting the new role. 5610 """ 5611 return self._http.request( 5612 f"/api/v1/teams/{team}/members/{user}", 5613 method="PATCH", 5614 body=input, 5615 response_type=TeamMembership, 5616 ) 5617 5618 5619class TeamTaskResource: 5620 def __init__(self, http: SyncHttpClient): 5621 self._http = http 5622 5623 def list( 5624 self, 5625 team: str, 5626 *, 5627 user: str | None = None, 5628 org: str | None = None, 5629 status: str | None = None, 5630 owner_user: str | None = None, 5631 owner_agent: str | None = None, 5632 priority: int | None = None, 5633 tag: str | None = None, 5634 parent: str | None = None, 5635 source_scope: str | None = None, 5636 source_type: str | None = None, 5637 source_id: str | None = None, 5638 epic: str | None = None, 5639 search: str | None = None, 5640 sort: str | None = None, 5641 order: str | None = None, 5642 due_before: str | None = None, 5643 due_after: str | None = None, 5644 overdue: bool | None = None, 5645 ready: bool | None = None, 5646 attention: bool | None = None, 5647 limit: int | None = None, 5648 after_cursor: str | None = None, 5649 ) -> TeamTaskListResponse: 5650 """ 5651 List an owner's tasks 5652 Returns tasks owned by the specified user or team. You can narrow results using the 5653 optional filters below. By default results are returned in reverse chronological 5654 order (most recently created first); use `sort` and `order` to sort by due date or 5655 priority instead. 5656 User-authenticated callers may list their personal tasks or tasks for teams they 5657 have joined. Privileged callers provide the owner in the route; the owner's 5658 organization is implied by that principal. An explicit `org` is optional and, 5659 when set, must match the owner's organization. 5660 5661 Args: 5662 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5663 user: User ID (`usr_...`) for user-scoped tasks. 5664 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 5665 status: Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses. 5666 owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`). 5667 owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`). 5668 priority: Filter tasks by priority, from 0 (highest) to 4 (lowest). 5669 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 5670 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 5671 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5672 source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters. 5673 source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters. 5674 epic: Return only tasks with this exact epic label. 5675 search: Restrict results to tasks whose name or description contains this string. 5676 sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created. 5677 order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`. 5678 due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded. 5679 due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded. 5680 overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue. 5681 ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work. 5682 attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry. 5683 limit: Maximum number of tasks to return. Capped at 100. 5684 after_cursor: Opaque cursor returned by the previous page. 5685 5686 Returns: 5687 Successful response 5688 """ 5689 query: dict[str, object] = {} 5690 if user is not None: 5691 query["user"] = user 5692 if org is not None: 5693 query["org"] = org 5694 if status is not None: 5695 query["status"] = status 5696 if owner_user is not None: 5697 query["owner_user"] = owner_user 5698 if owner_agent is not None: 5699 query["owner_agent"] = owner_agent 5700 if priority is not None: 5701 query["priority"] = priority 5702 if tag is not None: 5703 query["tag"] = tag 5704 if parent is not None: 5705 query["parent"] = parent 5706 if source_scope is not None: 5707 query["source_scope"] = source_scope 5708 if source_type is not None: 5709 query["source_type"] = source_type 5710 if source_id is not None: 5711 query["source_id"] = source_id 5712 if epic is not None: 5713 query["epic"] = epic 5714 if search is not None: 5715 query["search"] = search 5716 if sort is not None: 5717 query["sort"] = sort 5718 if order is not None: 5719 query["order"] = order 5720 if due_before is not None: 5721 query["due_before"] = due_before 5722 if due_after is not None: 5723 query["due_after"] = due_after 5724 if overdue is not None: 5725 query["overdue"] = overdue 5726 if ready is not None: 5727 query["ready"] = ready 5728 if attention is not None: 5729 query["attention"] = attention 5730 if limit is not None: 5731 query["limit"] = limit 5732 if after_cursor is not None: 5733 query["after_cursor"] = after_cursor 5734 return self._http.request( 5735 f"/api/v1/teams/{team}/tasks", 5736 query=query, 5737 response_type=TeamTaskListResponse, 5738 ) 5739 5740 def create(self, team: str, input: TeamTaskCreateInput) -> Task: 5741 """ 5742 Create a task for an owner 5743 Creates a new task owned by the specified user or team and returns the full 5744 task object. User-authenticated calls are attributed to the authenticated 5745 user or agent. App-scoped developer and server-to-server callers must provide 5746 the task's explicit `org` scope and an explicit `user` or `agent` actor for 5747 team tasks; a user-owned task reuses the user in the route unless an explicit 5748 agent is supplied. Every referenced principal is validated against the app, 5749 owner, and team membership before creation. 5750 5751 Args: 5752 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5753 input: Request body. 5754 input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner. 5755 input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. 5756 input.task: Attributes for the task to create. `name` is required; all other fields are optional. 5757 input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call. 5758 5759 Returns: 5760 The newly created task. 5761 """ 5762 return self._http.request( 5763 f"/api/v1/teams/{team}/tasks", 5764 method="POST", 5765 body=input, 5766 response_type=Task, 5767 ) 5768 5769 def blocker_cycles( 5770 self, 5771 team: str, 5772 *, 5773 user: str | None = None, 5774 org: str | None = None, 5775 limit: int | None = None, 5776 after_cursor: str | None = None, 5777 ) -> TeamTaskBlockerCyclesResponse: 5778 """ 5779 List task blocker cycles 5780 Runs an on-demand diagnostic over unfinished tasks owned by the specified 5781 team or user and returns a forward cursor-paginated page of complete cyclic 5782 blocker components. Detection is bounded to owners with at most 100 5783 unfinished tasks. This endpoint is read-only: cycles do not prevent task 5784 updates, lease acquisition, or completion. 5785 5786 Args: 5787 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5788 user: User ID (`usr_...`) owning the tasks. 5789 org: Optional organization context for privileged callers. 5790 limit: Maximum cycle components to return. Defaults to 50; maximum is 100. 5791 after_cursor: Opaque cursor returned by the preceding page. 5792 5793 Returns: 5794 Successful response 5795 """ 5796 query: dict[str, object] = {} 5797 if user is not None: 5798 query["user"] = user 5799 if org is not None: 5800 query["org"] = org 5801 if limit is not None: 5802 query["limit"] = limit 5803 if after_cursor is not None: 5804 query["after_cursor"] = after_cursor 5805 return self._http.request( 5806 f"/api/v1/teams/{team}/tasks/blocker_cycles", 5807 query=query, 5808 response_type=TeamTaskBlockerCyclesResponse, 5809 ) 5810 5811 def by_source(self, team: str, input: TeamTaskBySourceInput) -> TaskEnsureResult: 5812 """ 5813 Find or create a task by source 5814 Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted. 5815 5816 Args: 5817 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5818 input: Request body. 5819 input.agent: Explicit acting agent for privileged callers. 5820 input.description: Initial task description. 5821 input.epic: Initial epic grouping. 5822 input.name: Initial task name. 5823 input.org: Explicit organization for privileged callers. 5824 input.source_id: Source identity, for example owner/repo#123. 5825 input.source_scope: Source scope, for example github. 5826 input.source_type: Source type, for example pull_request. 5827 input.status: Initial task status. 5828 input.user: User owner, or explicit acting user on a team route. 5829 5830 Returns: 5831 The task and whether this request created it. 5832 """ 5833 return self._http.request( 5834 f"/api/v1/teams/{team}/tasks/by-source", 5835 method="PUT", 5836 body=input, 5837 response_type=TaskEnsureResult, 5838 ) 5839 5840 def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse: 5841 """ 5842 Get task activity metrics for a team 5843 Returns task activity metrics scoped to one team (the Network in ArchAgents). 5844 `open` counts currently open or in-progress team tasks, `created` counts 5845 tasks inserted in the UTC-day window, and `completed` counts tasks whose 5846 `closed_at` falls in that window while still in a closed status. Hard-deleted 5847 tasks are absent from the projection and therefore omitted. The daily series 5848 is zero-filled across the requested window and includes reconstructed 5849 end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at). 5850 Any authenticated team member may read this count-only Network summary. 5851 Requests from callers without team access return 404 so team existence is 5852 not disclosed. 5853 5854 Args: 5855 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5856 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 5857 5858 Returns: 5859 Successful response 5860 """ 5861 query: dict[str, object] = {} 5862 if days is not None: 5863 query["days"] = days 5864 return self._http.request( 5865 f"/api/v1/teams/{team}/tasks/metrics", 5866 query=query, 5867 response_type=TeamTaskMetricsResponse, 5868 ) 5869 5870 def ready( 5871 self, 5872 team: str, 5873 *, 5874 user: str | None = None, 5875 org: str | None = None, 5876 explain: bool | None = None, 5877 assigned_to_me: bool | None = None, 5878 source_scope: str | None = None, 5879 source_type: str | None = None, 5880 source_id: str | None = None, 5881 epic: str | None = None, 5882 limit: int | None = None, 5883 after_cursor: str | None = None, 5884 ) -> TeamTaskReadyResponse: 5885 """ 5886 List an owner's ready tasks 5887 Returns open tasks with no unfinished blockers and no active session lease. 5888 Readiness is calculated by the server from the current task projection. It is 5889 a snapshot, not a reservation; claim a task lease before starting work. 5890 Results are ordered by priority (0, the most urgent, first), then oldest 5891 first, so the first page is always the most urgent ready work. 5892 Pass `explain=true` to include every open task with a stable readiness reason. 5893 5894 Args: 5895 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5896 user: User ID (`usr_...`) owning the tasks. 5897 org: Optional organization context for privileged callers. 5898 explain: Include blocked and actively leased open tasks with exclusion reasons. 5899 assigned_to_me: Only include tasks assigned to the authenticated user. 5900 source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5901 source_type: Only include tasks whose source matches this object kind. 5902 source_id: Only include tasks whose source matches this object identity. 5903 epic: Only include tasks with this exact epic label. 5904 limit: Maximum number of readiness entries to return. Capped at 100. 5905 after_cursor: Opaque cursor returned by the previous page. 5906 5907 Returns: 5908 Successful response 5909 """ 5910 query: dict[str, object] = {} 5911 if user is not None: 5912 query["user"] = user 5913 if org is not None: 5914 query["org"] = org 5915 if explain is not None: 5916 query["explain"] = explain 5917 if assigned_to_me is not None: 5918 query["assigned_to_me"] = assigned_to_me 5919 if source_scope is not None: 5920 query["source_scope"] = source_scope 5921 if source_type is not None: 5922 query["source_type"] = source_type 5923 if source_id is not None: 5924 query["source_id"] = source_id 5925 if epic is not None: 5926 query["epic"] = epic 5927 if limit is not None: 5928 query["limit"] = limit 5929 if after_cursor is not None: 5930 query["after_cursor"] = after_cursor 5931 return self._http.request( 5932 f"/api/v1/teams/{team}/tasks/ready", 5933 query=query, 5934 response_type=TeamTaskReadyResponse, 5935 ) 5936 5937 def search( 5938 self, 5939 team: str, 5940 *, 5941 user: str | None = None, 5942 org: str | None = None, 5943 q: str | None = None, 5944 query: str | None = None, 5945 status: str | None = None, 5946 owner_user: str | None = None, 5947 owner_agent: str | None = None, 5948 priority: int | None = None, 5949 tag: str | None = None, 5950 parent: str | None = None, 5951 source_scope: str | None = None, 5952 source_type: str | None = None, 5953 source_id: str | None = None, 5954 epic: str | None = None, 5955 limit: int | None = None, 5956 after_cursor: str | None = None, 5957 ) -> TeamTaskSearchResponse: 5958 """ 5959 Search an owner's tasks 5960 Performs a full-text search over tasks owned by the specified user or team and returns 5961 matching results. Combine `q` with the optional filters to narrow the result set 5962 further. When no query is provided, the endpoint behaves like a filtered list. 5963 The `query` field in the response echoes the effective search query. 5964 User-authenticated callers may search their personal tasks or tasks for teams 5965 they have joined. Privileged callers provide the owner in the route; the owner's 5966 organization is implied by that principal. An explicit `org` is optional and, 5967 when set, must match the owner's organization. 5968 5969 Args: 5970 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5971 user: User ID (`usr_...`) whose tasks are searched. 5972 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 5973 q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided. 5974 query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility. 5975 status: Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses. 5976 owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`). 5977 owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`). 5978 priority: Filter results by priority, from 0 (highest) to 4 (lowest). 5979 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 5980 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 5981 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5982 source_type: Return only tasks whose source matches this object kind. 5983 source_id: Return only tasks whose source matches this object identity. 5984 epic: Return only tasks with this exact epic label. 5985 limit: Maximum number of tasks to return. Capped at 100. 5986 after_cursor: Opaque cursor returned by the previous page. 5987 5988 Returns: 5989 Successful response 5990 """ 5991 query: dict[str, object] = {} 5992 if user is not None: 5993 query["user"] = user 5994 if org is not None: 5995 query["org"] = org 5996 if q is not None: 5997 query["q"] = q 5998 if query is not None: 5999 query["query"] = query 6000 if status is not None: 6001 query["status"] = status 6002 if owner_user is not None: 6003 query["owner_user"] = owner_user 6004 if owner_agent is not None: 6005 query["owner_agent"] = owner_agent 6006 if priority is not None: 6007 query["priority"] = priority 6008 if tag is not None: 6009 query["tag"] = tag 6010 if parent is not None: 6011 query["parent"] = parent 6012 if source_scope is not None: 6013 query["source_scope"] = source_scope 6014 if source_type is not None: 6015 query["source_type"] = source_type 6016 if source_id is not None: 6017 query["source_id"] = source_id 6018 if epic is not None: 6019 query["epic"] = epic 6020 if limit is not None: 6021 query["limit"] = limit 6022 if after_cursor is not None: 6023 query["after_cursor"] = after_cursor 6024 return self._http.request( 6025 f"/api/v1/teams/{team}/tasks/search", 6026 query=query, 6027 response_type=TeamTaskSearchResponse, 6028 ) 6029 6030 6031class TeamThreadResource: 6032 def __init__(self, http: SyncHttpClient): 6033 self._http = http 6034 6035 def list(self, team: str, *, tags: builtins.list[str] | None = None) -> TeamThreadListResponse: 6036 """ 6037 List threads for a team 6038 Returns all threads owned by the specified team that the authenticated caller 6039 has permission to view. The caller must have access to the team; requests 6040 without team access are rejected with 404. 6041 Threads are returned in a single `data` array, ordered with the team's 6042 default thread first, then by most recent activity (newest first). Each 6043 thread carries a `last_activity` timestamp the most recent message's 6044 creation time, falling back to the thread's own creation time. Use the 6045 team-scoped thread endpoints to create, update, or delete individual 6046 threads. 6047 6048 Args: 6049 team: Team ID (`tem_...`) whose threads should be listed. 6050 tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`. 6051 6052 Returns: 6053 Successful response 6054 """ 6055 query: dict[str, object] = {} 6056 if tags is not None: 6057 query["tags"] = tags 6058 return self._http.request( 6059 f"/api/v1/teams/{team}/threads", 6060 query=query, 6061 response_type=TeamThreadListResponse, 6062 ) 6063 6064 def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 6065 """ 6066 Create a thread for a team 6067 Creates a new thread owned by the specified team. The authenticated caller must 6068 have access to the team; requests from callers without team access are rejected 6069 with 404. 6070 If a `profile_picture` is provided in the thread params, it must be 6071 base64-encoded image data. The image is uploaded and associated with the thread 6072 before creation completes. Omit `profile_picture` to skip this step. 6073 By default the platform sends an automatic welcome message into the new thread. 6074 Pass `skip_welcome_message: true` to suppress this behavior, for example when 6075 creating threads programmatically in bulk or seeding test data. 6076 6077 Args: 6078 team: Team ID (`tem_...`) whose threads should be listed. 6079 input: Request body. 6080 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 6081 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 6082 6083 Returns: 6084 The newly created thread. 6085 """ 6086 return self._http.request( 6087 f"/api/v1/teams/{team}/threads", 6088 method="POST", 6089 body=input, 6090 response_type=Thread, 6091 ) 6092 6093 def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse: 6094 """ 6095 Get threads-created count for a team 6096 Returns how many **network-public** team threads were created in the UTC-day 6097 window. Counts come from realtime SQL aggregation over append-only 6098 `network_activity_events` (`thread.created` rows co-committed with create): 6099 team- or restricted-visibility threads (plus legacy open-team rows), never 6100 private or mirror. Every Network member sees the same number. Hard-delete 6101 co-commits a separate `thread.deleted` transition event and does not remove 6102 create events (metric is "created", not "still present"). Visibility flips 6103 after insert are ignored in v1. 6104 Any authenticated team member may read this count-only Network summary. 6105 Requests from callers without team access return 404 so team existence is 6106 not disclosed. 6107 6108 Args: 6109 team: Team ID (`tem_...`) whose threads should be listed. 6110 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 6111 6112 Returns: 6113 Successful response 6114 """ 6115 query: dict[str, object] = {} 6116 if days is not None: 6117 query["days"] = days 6118 return self._http.request( 6119 f"/api/v1/teams/{team}/threads/metrics", 6120 query=query, 6121 response_type=TeamThreadMetricsResponse, 6122 ) 6123 6124 6125class TeamResource: 6126 def __init__(self, http: SyncHttpClient): 6127 self._http = http 6128 self.custom_objects = TeamCustomObjectResource(http) 6129 self.invite = TeamInviteResource(http) 6130 self.members = MemberResource(http) 6131 self.tasks = TeamTaskResource(http) 6132 self.threads = TeamThreadResource(http) 6133 6134 def list( 6135 self, 6136 *, 6137 page: int | None = None, 6138 page_size: int | None = None, 6139 search: str | None = None, 6140 metadata: dict[str, Any] | None = None, 6141 membership: str | None = None, 6142 ) -> TeamListResponse: 6143 """ 6144 List teams 6145 Returns a paginated list of teams visible to the authenticated user, ordered 6146 by creation time descending. Use `membership` to narrow results to teams the 6147 caller has joined or teams they are eligible to join based on their ACL 6148 visibility. 6149 Supports full-text search across team name and description via `search`, and 6150 structured metadata filtering via `metadata`. When `app` is present, results 6151 are scoped to that app and the caller must hold the corresponding app scope. 6152 6153 Args: 6154 page: Page number to retrieve, starting at 1. Defaults to 1. 6155 page_size: Number of teams to return per page. Defaults to 25. 6156 search: Full-text search string matched against team name and description. 6157 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 6158 membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams. 6159 6160 Returns: 6161 Successful response 6162 """ 6163 query: dict[str, object] = {} 6164 if page is not None: 6165 query["page"] = page 6166 if page_size is not None: 6167 query["page_size"] = page_size 6168 if search is not None: 6169 query["search"] = search 6170 if metadata is not None: 6171 query["metadata"] = metadata 6172 if membership is not None: 6173 query["membership"] = membership 6174 return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse) 6175 6176 def create(self, input: TeamCreateInput) -> Team: 6177 """ 6178 Create a team 6179 Creates a new team and returns the created team object. The authenticated 6180 user becomes the team's owner. 6181 When `app` is supplied, the request is scoped to that app and the caller 6182 must hold the corresponding app scope. Omit `org` unless you want the team 6183 pinned to a specific organization. A default chat thread is provisioned for 6184 the team automatically after creation. 6185 6186 Args: 6187 input: Request body. 6188 input.acl: Access control configuration for the team. Controls who can discover and join the team. 6189 input.description: Optional human-readable description of the team's purpose. 6190 input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team. 6191 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 6192 input.name: Display name for the team. 6193 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 6194 6195 Returns: 6196 The newly created team. 6197 """ 6198 return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team) 6199 6200 def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 6201 """ 6202 Join a team with an invite code 6203 Adds a principal to a team using a 12-character invite code. The invite 6204 code can be supplied as either `join_code` or `invite_code`; both are 6205 accepted for backwards compatibility. 6206 For user-authenticated requests, the currently authenticated user is added 6207 to the team. For server-to-server requests, you must supply either `agent` 6208 (to add an agent) or `user` (to add a specific user by ID). If the user 6209 is already a member of the team, the request succeeds without creating a 6210 duplicate membership. 6211 This endpoint is rate-limited to 10 requests per minute per IP address to 6212 prevent invite-code enumeration. 6213 6214 Args: 6215 input: Request body. 6216 input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. 6217 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 6218 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 6219 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 6220 6221 Returns: 6222 The team the principal has joined. 6223 """ 6224 return self._http.request( 6225 "/api/v1/teams/join_by_code", 6226 method="POST", 6227 body=input, 6228 response_type=Team, 6229 ) 6230 6231 def delete(self, team: str) -> None: 6232 """ 6233 Delete a team 6234 Permanently deletes the team identified by `team`. This action is 6235 irreversible all team memberships, settings, and associated data are 6236 removed. 6237 The caller must be the team owner or an org admin. When `app` is present, 6238 the caller must also hold the corresponding app scope. 6239 6240 Args: 6241 team: Team ID (`team_...`) of the team to delete. 6242 6243 Returns: 6244 Empty response the team has been deleted. 6245 """ 6246 self._http.request(f"/api/v1/teams/{team}", method="DELETE") 6247 6248 def get(self, team: str) -> Team: 6249 """ 6250 Retrieve a team 6251 Returns the full team object for the given `team` ID, including its current 6252 member list and all associated threads. 6253 The authenticated user must be a member of the team or hold a role that 6254 grants visibility (org admin, app scope). When `app` is supplied, the 6255 caller must hold the corresponding app scope. 6256 6257 Args: 6258 team: Team ID (`team_...`) of the team to retrieve. 6259 6260 Returns: 6261 The requested team, including its members and threads. 6262 """ 6263 return self._http.request(f"/api/v1/teams/{team}", response_type=Team) 6264 6265 def update(self, team: str, input: TeamUpdateInput) -> Team: 6266 """ 6267 Update a team 6268 Updates one or more attributes of the team identified by `team`. Only the 6269 fields you provide are changed; omitted fields are left as-is. 6270 To replace the team's profile picture, supply the `profile_picture` object 6271 with base64-encoded image data. The previous picture is deleted after the 6272 new one is successfully uploaded. When `app` is present, the caller must hold 6273 the corresponding app scope. The caller must be a team owner or org admin. 6274 6275 Args: 6276 team: Team ID (`team_...`) of the team to update. 6277 input: Request body. 6278 input.acl: New access control configuration for the team. Replaces the existing ACL. 6279 input.description: New human-readable description of the team's purpose. 6280 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 6281 input.name: New display name for the team. 6282 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 6283 6284 Returns: 6285 The updated team with all changes applied. 6286 """ 6287 return self._http.request( 6288 f"/api/v1/teams/{team}", 6289 method="PATCH", 6290 body=input, 6291 response_type=Team, 6292 ) 6293 6294 def artifacts( 6295 self, team: str, *, group_key: str | None = None, group_key_prefix: str | None = None 6296 ) -> TeamArtifactsResponse: 6297 """ 6298 List a team's artifacts 6299 Returns all artifacts owned by the specified team. Artifacts represent 6300 AI-generated or user-uploaded files associated with agent sessions, 6301 threads, or sandboxes such as images, documents, and code outputs. 6302 The authenticated user must be a member of the team. Attempting to list 6303 artifacts for a team the caller does not have access to returns 404 6304 rather than 403 to avoid leaking team existence. 6305 Results are returned in a single page without cursor pagination. Each 6306 artifact in the response reflects the state of its current version, 6307 including a short-lived signed `file_url` for direct download. 6308 6309 Args: 6310 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 6311 group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match. 6312 group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key. 6313 6314 Returns: 6315 Successful response 6316 """ 6317 query: dict[str, object] = {} 6318 if group_key is not None: 6319 query["group_key"] = group_key 6320 if group_key_prefix is not None: 6321 query["group_key_prefix"] = group_key_prefix 6322 return self._http.request( 6323 f"/api/v1/teams/{team}/artifacts", 6324 query=query, 6325 response_type=TeamArtifactsResponse, 6326 ) 6327 6328 def dependents(self, team: str) -> TeamDeleteImpactResponse: 6329 """ 6330 Preview Team deletion impact 6331 Returns the number of stored custom-object rows that deleting this Team will 6332 physically delete. The count includes rows hidden after ordinary soft 6333 deletion. This read-only preview does not delete or restore data. 6334 6335 Args: 6336 team: Team ID (`team_...`) to inspect. 6337 6338 Returns: 6339 Stored custom-object rows and the existing physical-deletion contract. 6340 """ 6341 return self._http.request( 6342 f"/api/v1/teams/{team}/dependents", 6343 response_type=TeamDeleteImpactResponse, 6344 ) 6345 6346 def invites(self, team: str) -> TeamInvitesResponse: 6347 """ 6348 Create a team invite (server-to-server) 6349 Generates a new invite code for the specified team using server-to-server 6350 authentication. Unlike the user-facing create endpoint, this variant does not 6351 require the caller to be a team member it is intended for privileged 6352 back-end services acting on behalf of your platform. 6353 The returned code is a short alphanumeric string that users can present to 6354 join the team. Each call produces a new code; previously issued codes are 6355 not invalidated by this request. 6356 6357 Args: 6358 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 6359 6360 Returns: 6361 Successful response 6362 """ 6363 return self._http.request( 6364 f"/api/v1/teams/{team}/invites", 6365 method="POST", 6366 response_type=TeamInvitesResponse, 6367 ) 6368 6369 def join(self, team: str, input: TeamJoinInput) -> None: 6370 """ 6371 Join a team 6372 Adds a principal to a team that is visible to the authenticated user. 6373 By default, the currently authenticated user joins the team. Provide `agent` 6374 to add an agent to the team instead the caller must already be a member of 6375 the team to do so. Provide `user` (by ID) or `email` to add another user from 6376 your organization the caller must be a team owner, team admin, or org admin. 6377 Only one of `agent`, `user`, or `email` may be supplied per request. 6378 If the target principal is already a member of the team, the request succeeds 6379 without creating a duplicate membership. Server-to-server callers are not 6380 permitted to use this endpoint; use the invite-code endpoint instead. 6381 6382 Args: 6383 team: Team ID (`team_...`) to join. 6384 input: Request body. 6385 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 6386 input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 6387 input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 6388 6389 Returns: 6390 Empty response the principal is now a member of the team. 6391 """ 6392 self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 6393 6394 def leave(self, team: str) -> None: 6395 """ 6396 Leave a team 6397 Removes a principal from a team. By default, the authenticated user removes 6398 themselves from the team. Provide `agent` to remove an agent instead the 6399 caller must be a member of the team to do so. 6400 Team owners cannot leave their own team. To transfer ownership first, use 6401 the update-membership endpoint, then call this endpoint. 6402 For server-to-server requests, `user` is required to identify which user 6403 should be removed. 6404 6405 Args: 6406 team: Team ID (`team_...`) to leave. 6407 6408 Returns: 6409 Empty response the principal has been removed from the team. 6410 """ 6411 self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE") 6412 6413 def task_assignees(self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse: 6414 """ 6415 List task assignees for a team 6416 Returns the list of principals users and agents that can be assigned 6417 to tasks within the team. Results include both human members and AI agents 6418 and are sorted alphabetically by display name. 6419 This endpoint is only available for team-scoped contexts. Calling it with a 6420 user-scoped owner returns a 400 error. The authenticated user must be a 6421 member of the team or hold org-admin access. App-scoped developer and 6422 server-to-server callers may list assignees for teams in their app so they 6423 can select the explicit user or agent actor required by privileged task 6424 mutations. 6425 6426 Args: 6427 team: Team ID (`tem_...`). 6428 org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization. 6429 6430 Returns: 6431 Successful response 6432 """ 6433 query: dict[str, object] = {} 6434 if org is not None: 6435 query["org"] = org 6436 return self._http.request( 6437 f"/api/v1/teams/{team}/task_assignees", 6438 query=query, 6439 response_type=TeamTaskAssigneesResponse, 6440 ) 6441 6442 def task_epics( 6443 self, 6444 team: str, 6445 *, 6446 user: str | None = None, 6447 org: str | None = None, 6448 source_scope: str | None = None, 6449 source_type: str | None = None, 6450 source_id: str | None = None, 6451 top_priority: int | None = None, 6452 include_closed: bool | None = None, 6453 limit: int | None = None, 6454 after_cursor: str | None = None, 6455 ) -> TeamTaskEpicsResponse: 6456 """ 6457 List an owner's epic summaries 6458 Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created. 6459 6460 Args: 6461 source_scope: Exact source scope; supply all three source fields. 6462 source_type: Exact source type. 6463 source_id: Exact source ID. 6464 top_priority: Exact highest open priority, from 0 to 4. 6465 include_closed: Include epics with no non-closed tasks; defaults to false. 6466 limit: Maximum epics; defaults to 50, capped at 100. 6467 after_cursor: Opaque forward cursor from the preceding page. 6468 6469 Returns: 6470 Successful response 6471 """ 6472 query: dict[str, object] = {} 6473 if user is not None: 6474 query["user"] = user 6475 if org is not None: 6476 query["org"] = org 6477 if source_scope is not None: 6478 query["source_scope"] = source_scope 6479 if source_type is not None: 6480 query["source_type"] = source_type 6481 if source_id is not None: 6482 query["source_id"] = source_id 6483 if top_priority is not None: 6484 query["top_priority"] = top_priority 6485 if include_closed is not None: 6486 query["include_closed"] = include_closed 6487 if limit is not None: 6488 query["limit"] = limit 6489 if after_cursor is not None: 6490 query["after_cursor"] = after_cursor 6491 return self._http.request( 6492 f"/api/v1/teams/{team}/task_epics", 6493 query=query, 6494 response_type=TeamTaskEpicsResponse, 6495 )
21class TeamCustomObjectCreateInput(TypedDict): 22 "Create a team custom object" 23 24 fields: dict[str, Any] 25 "Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`." 26 type: str 27 "Schema type identifier (`lookup_key`) that defines the object's fields and validation rules."
Create a team custom object
Map of field values to set on the new object. Keys and value types must conform to the schema identified by type.
30class MemberCreateInput(TypedDict, total=False): 31 "Add a member to a team" 32 33 agent: str | None 34 "Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`." 35 role: str | None 36 'Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.' 37 user: str | None 38 "User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`."
Add a member to a team
41class MemberUpdateInput(TypedDict): 42 "Update a team member's role" 43 44 role: str 45 'New role to assign. One of `"owner"`, `"admin"`, or `"member"`.'
Update a team member's role
48class TeamTaskCreateInputTask(TypedDict, total=False): 49 description: str | None 50 "Optional long-form description or notes for the task. Supports plain text." 51 due_date: datetime | None 52 "Date and time by which the task should be completed (ISO 8601). Omit to create the task without a due date." 53 epic: str | None 54 "Optional free-form grouping label." 55 id: str | None 56 "Optional caller-generated task public ID (`tsk_...`). Persist it before creating a task when creation must survive a lost response. An existing ID returns 409 without modifying the task; read the task by ID to reconcile. Omit for a server-generated ID." 57 links: dict[str, Any] | None 58 "Arbitrary key-value map of named URLs or references associated with the task (e.g. external ticket links)." 59 metadata: dict[str, Any] | None 60 "Arbitrary key-value map for storing application-specific data alongside the task. Omit to create the task with no metadata." 61 name: Required[str] 62 "Human-readable title for the task." 63 owner_agent: str | None 64 "ID of the agent to assign as owner (`agi_...`). Mutually exclusive with `owner_user`; omit to leave the task unassigned." 65 owner_user: str | None 66 "ID of the user to assign as owner (`usr_...`). Mutually exclusive with `owner_agent`; omit to leave the task unassigned." 67 parent: str | None 68 "Create this task as a subtask of an existing top-level task (`tsk_...`). Subtasks nest exactly one level." 69 priority: int | None 70 "Priority level from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when omitted." 71 project_id: str | None 72 "Optional project ID (`prj_...`). Pass null to clear it." 73 source_id: str | None 74 "Source object identity (for example `ArchAstro/firstlanding`)." 75 source_scope: str | None 76 "Container of the work this task is about (for example `github.com`). Must be supplied with `source_type` and `source_id`." 77 source_type: str | None 78 "Kind of source object (for example `repository`)." 79 status: str | None 80 'Initial status for the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`. Defaults to `"open"` when omitted.' 81 tags: list[str] | None 82 "Labels for grouping and filtering (max 20, each up to 40 characters). Stored canonically: lowercase, trimmed, de-duplicated." 83 target_binary: str | None 84 "Binary that must run this work, as a lowercase identifier of 1-64 characters (letters, digits, `.`, `_`, `-`; for example `my-cli`). Must be supplied with `target_version`." 85 target_version: str | None 86 "Minimum semantic version of `target_binary` that can run this work (`MAJOR.MINOR.PATCH` with optional prerelease and build, no leading `v`). Must be supplied with `target_binary`." 87 thread: str | None 88 "Bind the task to a thread (`thr_...`) owned by the same team or user as the task. A bound task appears in that thread's task scope, exactly like a task filed from inside the conversation. Omit for a task not tied to a conversation."
Date and time by which the task should be completed (ISO 8601). Omit to create the task without a due date.
Optional caller-generated task public ID (tsk_...). Persist it before creating a task when creation must survive a lost response. An existing ID returns 409 without modifying the task; read the task by ID to reconcile. Omit for a server-generated ID.
Arbitrary key-value map of named URLs or references associated with the task (e.g. external ticket links).
Arbitrary key-value map for storing application-specific data alongside the task. Omit to create the task with no metadata.
ID of the agent to assign as owner (agi_...). Mutually exclusive with owner_user; omit to leave the task unassigned.
ID of the user to assign as owner (usr_...). Mutually exclusive with owner_agent; omit to leave the task unassigned.
Create this task as a subtask of an existing top-level task (tsk_...). Subtasks nest exactly one level.
Priority level from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when omitted.
Container of the work this task is about (for example github.com). Must be supplied with source_type and source_id.
Initial status for the task. One of "open", "in_progress", "in_review", "paused", "failed", "superseding", "done", or "cancelled". Defaults to "open" when omitted.
Binary that must run this work, as a lowercase identifier of 1-64 characters (letters, digits, ., _, -; for example my-cli). Must be supplied with target_version.
Minimum semantic version of target_binary that can run this work (MAJOR.MINOR.PATCH with optional prerelease and build, no leading v). Must be supplied with target_binary.
91class TeamTaskCreateInput(TypedDict, total=False): 92 "Create a task for an owner" 93 94 agent: str | None 95 "Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner." 96 org: str | None 97 "Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team." 98 task: Required[TeamTaskCreateInputTask] 99 "Attributes for the task to create. `name` is required; all other fields are optional." 100 user: str | None 101 "User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call."
Create a task for an owner
Explicit acting agent (agi_...) for a developer or server-to-server call. Mutually exclusive with an acting user; the agent must belong to the task owner.
Explicit organization (org_...) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team.
Attributes for the task to create. name is required; all other fields are optional.
104class TeamTaskBySourceInput(TypedDict, total=False): 105 "Find or create a task by source" 106 107 agent: str | None 108 "Explicit acting agent for privileged callers." 109 description: str | None 110 "Initial task description." 111 epic: str | None 112 "Initial epic grouping." 113 name: Required[str] 114 "Initial task name." 115 org: str | None 116 "Explicit organization for privileged callers." 117 source_id: Required[str] 118 "Source identity, for example owner/repo#123." 119 source_scope: Required[str] 120 "Source scope, for example github." 121 source_type: Required[str] 122 "Source type, for example pull_request." 123 status: str | None 124 "Initial task status." 125 user: str | None 126 "User owner, or explicit acting user on a team route."
Find or create a task by source
136class TeamThreadCreateInputThreadProfilePicture(TypedDict, total=False): 137 data: str | None 138 "Base64-encoded image bytes." 139 filename: str | None 140 "Original filename of the uploaded image, used for display and content-type inference." 141 mime_type: str | None 142 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
145class TeamThreadCreateInputThreadSettings(TypedDict, total=False): 146 agent_enabled: bool | None 147 "Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting."
150class TeamThreadCreateInputThread(TypedDict, total=False): 151 create_legacy_agent: bool | None 152 "When `true`, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model." 153 description: str | None 154 "Optional longer description of the thread's purpose. `null` if not provided." 155 is_unlisted: bool | None 156 "When `true`, the thread is hidden from the default thread list and accessible only by direct link or ID." 157 key: str | None 158 "Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization." 159 kind: Literal["personal", "feed"] | None 160 "Optional behavioral subtype. `personal` is accepted only for a user-owned thread and limits membership to that user and agents currently owned by them. `feed` is accepted for any owner and renders the thread as a post feed: message lists return top-level posts with their newest replies inline, and agent responses attach to the root post. Mirror kinds remain server-derived and cannot be selected by callers." 161 members: list[TeamThreadCreateInputThreadMembersItem] | None 162 "Users and agents to add atomically when the thread is created. Each target must pass the same authorization rules as a post-creation member add. Slack mirror threads reject non-empty caller-supplied rosters because their membership is sync-owned." 163 metadata: dict[str, Any] | None 164 "Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers." 165 muted: bool | None 166 "When `true`, push and in-app notifications for this thread are suppressed for the creating user." 167 org_id: str | None 168 "ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted." 169 profile_picture: TeamThreadCreateInputThreadProfilePicture | None 170 "Optional profile image for the thread, provided as a base64-encoded payload." 171 settings: TeamThreadCreateInputThreadSettings | None 172 "Configuration overrides for the thread, such as AI model selection and context window settings." 173 slug: str | None 174 "Optional URL-safe identifier. Derived from the title when omitted and unique within the thread owner." 175 title: str | None 176 "Display name for the thread. `null` if omitted, which causes the thread to be untitled." 177 visibility: Literal["team", "restricted", "private", "org"] | None 178 "Thread visibility. A team-owned thread with members must explicitly use `restricted` or `private`. User- and agent-owned threads with members default to `private` and reject every other value. `org` is only valid on an organization-owned thread with no team, user, or agent owner."
When true, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model.
When true, the thread is hidden from the default thread list and accessible only by direct link or ID.
Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization.
Optional behavioral subtype. personal is accepted only for a user-owned thread and limits membership to that user and agents currently owned by them. feed is accepted for any owner and renders the thread as a post feed: message lists return top-level posts with their newest replies inline, and agent responses attach to the root post. Mirror kinds remain server-derived and cannot be selected by callers.
Users and agents to add atomically when the thread is created. Each target must pass the same authorization rules as a post-creation member add. Slack mirror threads reject non-empty caller-supplied rosters because their membership is sync-owned.
Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers.
When true, push and in-app notifications for this thread are suppressed for the creating user.
ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted.
Optional profile image for the thread, provided as a base64-encoded payload.
Configuration overrides for the thread, such as AI model selection and context window settings.
Optional URL-safe identifier. Derived from the title when omitted and unique within the thread owner.
Display name for the thread. null if omitted, which causes the thread to be untitled.
Thread visibility. A team-owned thread with members must explicitly use restricted or private. User- and agent-owned threads with members default to private and reject every other value. org is only valid on an organization-owned thread with no team, user, or agent owner.
181class TeamThreadCreateInput(TypedDict, total=False): 182 "Create a thread for a team" 183 184 skip_welcome_message: bool | None 185 "When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`." 186 thread: Required[TeamThreadCreateInputThread] 187 "Attributes for the new thread. See ThreadCreateParams for available fields."
Create a thread for a team
When true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to false.
Attributes for the new thread. See ThreadCreateParams for available fields.
190class TeamCreateInputAclAddItem(TypedDict, total=False): 191 actions: Required[list[str]] 192 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 193 principal: str | None 194 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 195 principal_type: Required[str] 196 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
199class TeamCreateInputAclGrantsItem(TypedDict, total=False): 200 actions: Required[list[str]] 201 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 202 principal: str | None 203 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 204 principal_type: Required[str] 205 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
208class TeamCreateInputAclRemoveItem(TypedDict, total=False): 209 principal: str | None 210 'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.' 211 principal_type: Required[str] 212 'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
215class TeamCreateInputAcl(TypedDict, total=False): 216 add: list[TeamCreateInputAclAddItem] | None 217 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 218 grants: list[TeamCreateInputAclGrantsItem] | None 219 "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`." 220 remove: list[TeamCreateInputAclRemoveItem] | None 221 "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
224class TeamCreateInput(TypedDict, total=False): 225 "Create a team" 226 227 acl: TeamCreateInputAcl | None 228 "Access control configuration for the team. Controls who can discover and join the team." 229 description: str | None 230 "Optional human-readable description of the team's purpose." 231 idempotency_key: str | None 232 "Optional retry key. Replays in the same app, organization, and sandbox return the original team." 233 metadata: dict[str, Any] | None 234 "Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings." 235 name: Required[str] 236 "Display name for the team." 237 org: str | None 238 "Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation."
Create a team
Access control configuration for the team. Controls who can discover and join the team.
Optional retry key. Replays in the same app, organization, and sandbox return the original team.
241class TeamJoinByCodeInput(TypedDict, total=False): 242 "Join a team with an invite code" 243 244 agent: str | None 245 "Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session." 246 invite_code: str | None 247 "12-character invite code alias for `join_code` accepted for backwards compatibility." 248 join_code: str | None 249 "12-character invite code that identifies the team. Mutually usable with `invite_code`." 250 user: str | None 251 "User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied."
Join a team with an invite code
Agent ID (agent_...) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session.
12-character invite code alias for join_code accepted for backwards compatibility.
12-character invite code that identifies the team. Mutually usable with invite_code.
User ID (user_...) to add to the team. Required for server-to-server requests when agent is not supplied.
254class TeamUpdateInputAclAddItem(TypedDict, total=False): 255 actions: Required[list[str]] 256 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 257 principal: str | None 258 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 259 principal_type: Required[str] 260 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
263class TeamUpdateInputAclGrantsItem(TypedDict, total=False): 264 actions: Required[list[str]] 265 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 266 principal: str | None 267 'The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.' 268 principal_type: Required[str] 269 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
272class TeamUpdateInputAclRemoveItem(TypedDict, total=False): 273 principal: str | None 274 'The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.' 275 principal_type: Required[str] 276 'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.'
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
279class TeamUpdateInputAcl(TypedDict, total=False): 280 add: list[TeamUpdateInputAclAddItem] | None 281 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 282 grants: list[TeamUpdateInputAclGrantsItem] | None 283 "Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`." 284 remove: list[TeamUpdateInputAclRemoveItem] | None 285 "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`."
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
288class TeamUpdateInputProfilePicture(TypedDict, total=False): 289 data: str | None 290 "Base64-encoded binary image data." 291 filename: str | None 292 "Original filename of the image, used for storage metadata." 293 mime_type: str | None 294 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
297class TeamUpdateInput(TypedDict, total=False): 298 "Update a team" 299 300 acl: TeamUpdateInputAcl | None 301 "New access control configuration for the team. Replaces the existing ACL." 302 description: str | None 303 "New human-readable description of the team's purpose." 304 metadata: dict[str, Any] | None 305 "Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely." 306 name: str | None 307 "New display name for the team." 308 profile_picture: TeamUpdateInputProfilePicture | None 309 "New profile picture for the team. Provide this object to upload and replace the current picture."
Update a team
New access control configuration for the team. Replaces the existing ACL.
Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
New profile picture for the team. Provide this object to upload and replace the current picture.
312class TeamJoinInput(TypedDict, total=False): 313 "Join a team" 314 315 agent: str | None 316 "Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team." 317 email: str | None 318 "Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role." 319 user: str | None 320 "User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role."
Join a team
Agent ID (agent_...) to add to the team. The caller must already be a member of the team.
323class TeamCustomObjectListResponseDataItemAclAddItem(BaseModel): 324 actions: list[str] = Field( 325 ..., 326 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 327 ) 328 principal: str | None = Field( 329 default=None, 330 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 331 ) 332 principal_type: str = Field( 333 ..., 334 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 335 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
338class TeamCustomObjectListResponseDataItemAclGrantsItem(BaseModel): 339 actions: list[str] = Field( 340 ..., 341 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 342 ) 343 principal: str | None = Field( 344 default=None, 345 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 346 ) 347 principal_type: str = Field( 348 ..., 349 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 350 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
353class TeamCustomObjectListResponseDataItemAclRemoveItem(BaseModel): 354 principal: str | None = Field( 355 default=None, 356 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 357 ) 358 principal_type: str = Field( 359 ..., 360 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 361 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
364class TeamCustomObjectListResponseDataItemAcl(BaseModel): 365 add: list[TeamCustomObjectListResponseDataItemAclAddItem] | None = Field( 366 default=None, 367 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 368 ) 369 grants: list[TeamCustomObjectListResponseDataItemAclGrantsItem] | None = Field( 370 default=None, 371 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 372 ) 373 remove: list[TeamCustomObjectListResponseDataItemAclRemoveItem] | None = Field( 374 default=None, 375 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 376 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
379class TeamCustomObjectListResponseDataItem(BaseModel): 380 acl: TeamCustomObjectListResponseDataItemAcl | None = Field( 381 default=None, 382 description="Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; `null` for everyone else.", 383 ) 384 agent: str | None = Field( 385 default=None, 386 description="ID of the agent that owns this object (`agt_...`). `null` for other ownership types.", 387 ) 388 created_at: datetime | None = Field( 389 default=None, description="When the custom object was created (ISO 8601)." 390 ) 391 expires_at: datetime | None = Field( 392 default=None, description="Absolute expiry time (RFC 3339). Null when no expiry is set." 393 ) 394 fields: dict[str, Any] | None = Field( 395 default=None, 396 description="Map of field names to their current values as defined by the object's schema type.", 397 ) 398 id: str = Field(..., description="Unique identifier for the custom object (`cobj_...`).") 399 org: str | None = Field( 400 default=None, description="ID of the organization this object belongs to (`org_...`)." 401 ) 402 row_key: str | None = Field( 403 default=None, 404 description="An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set.", 405 ) 406 sandbox: str | None = Field( 407 default=None, 408 description="ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects.", 409 ) 410 schema_type: str | None = Field( 411 default=None, 412 description="The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set.", 413 ) 414 team: str | None = Field( 415 default=None, 416 description="ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped.", 417 ) 418 updated_at: datetime | None = Field( 419 default=None, 420 description="When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation.", 421 ) 422 user: str | None = Field( 423 default=None, 424 description="ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped.", 425 ) 426 version: int | None = Field( 427 default=None, 428 description="Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.", 429 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Access control list governing read and write access to this custom object. Only returned to resource owners and privileged or organization-admin viewers; null for everyone else.
ID of the agent that owns this object (agt_...). null for other ownership types.
Absolute expiry time (RFC 3339). Null when no expiry is set.
Map of field names to their current values as defined by the object's schema type.
An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. null if not set.
ID of the sandbox environment this object is scoped to (dsb_...). null for production objects.
The lookup key of the schema type that defines this object's field structure. null if the schema type has not been set.
ID of the team that owns this object (tem_...). null if the object is not team-scoped.
When the custom object was last modified (ISO 8601). null if the object has never been updated after creation.
432class TeamCustomObjectListResponse(BaseModel): 433 """ 434 Successful response 435 """ 436 437 data: list[TeamCustomObjectListResponseDataItem] = Field( 438 ..., description="Array of custom object records for the current page." 439 ) 440 meta: dict[str, Any] | None = Field( 441 default=None, description="Pagination metadata for the response." 442 )
Successful response
445class MemberListResponseDataItemAgentAclAddItem(BaseModel): 446 actions: list[str] = Field( 447 ..., 448 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 449 ) 450 principal: str | None = Field( 451 default=None, 452 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 453 ) 454 principal_type: str = Field( 455 ..., 456 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 457 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
460class MemberListResponseDataItemAgentAclGrantsItem(BaseModel): 461 actions: list[str] = Field( 462 ..., 463 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 464 ) 465 principal: str | None = Field( 466 default=None, 467 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 468 ) 469 principal_type: str = Field( 470 ..., 471 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 472 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
475class MemberListResponseDataItemAgentAclRemoveItem(BaseModel): 476 principal: str | None = Field( 477 default=None, 478 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 479 ) 480 principal_type: str = Field( 481 ..., 482 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 483 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
486class MemberListResponseDataItemAgentAcl(BaseModel): 487 add: list[MemberListResponseDataItemAgentAclAddItem] | None = Field( 488 default=None, 489 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 490 ) 491 grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = Field( 492 default=None, 493 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 494 ) 495 remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = Field( 496 default=None, 497 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 498 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
501class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo(BaseModel): 502 file: str | None = Field( 503 default=None, 504 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 505 ) 506 height: int | None = Field( 507 default=None, description="Height of the image in pixels. `null` if not known." 508 ) 509 media: str | None = Field( 510 default=None, 511 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 512 ) 513 mime_type: str | None = Field( 514 default=None, 515 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 516 ) 517 refresh_url: str | None = Field( 518 default=None, 519 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 520 ) 521 url: str | None = Field( 522 default=None, 523 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 524 ) 525 width: int | None = Field( 526 default=None, description="Width of the image in pixels. `null` if not known." 527 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
530class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 531 BaseModel 532): 533 description: str | None = Field( 534 default=None, 535 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 536 ) 537 name: str = Field( 538 ..., 539 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 540 ) 541 required: bool = Field( 542 ..., 543 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 544 ) 545 type: str = Field( 546 ..., 547 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 548 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Workflow-authored explanation of the slot's role. null when the workflow declares none.
The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.
551class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills( 552 BaseModel 553): 554 participants: dict[str, Any] | None = Field( 555 default=None, 556 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 557 ) 558 payload: dict[str, Any] | None = Field( 559 default=None, 560 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 561 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
564class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract( 565 BaseModel 566): 567 input_schema: dict[str, Any] | None = Field( 568 default=None, 569 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 570 ) 571 participants: ( 572 list[ 573 MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem 574 ] 575 | None 576 ) = Field( 577 default=None, 578 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 579 ) 580 prefills: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 581 ..., 582 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 583 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.
Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.
Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.
586class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails(BaseModel): 587 automation_type: str | None = Field( 588 default=None, 589 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 590 ) 591 invoke_contract: ( 592 MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract 593 | None 594 ) = Field( 595 default=None, 596 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 597 ) 598 type: Literal["automation"] = Field( 599 default="automation", 600 description="Template-details discriminator. Always `automation` for this variant.", 601 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.
Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.
604class MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem(BaseModel): 605 description: str | None = Field( 606 default=None, 607 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 608 ) 609 details: ( 610 MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItemDetails | None 611 ) = Field( 612 default=None, 613 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 614 ) 615 display_name: str | None = Field( 616 default=None, 617 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 618 ) 619 id: str | None = Field( 620 default=None, 621 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 622 ) 623 kind: str = Field( 624 ..., 625 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 626 ) 627 lookup_key: str | None = Field( 628 default=None, 629 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 630 ) 631 name: str | None = Field( 632 default=None, 633 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 634 ) 635 readme_url: str | None = Field( 636 default=None, 637 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 638 ) 639 virtual_path: str | None = Field( 640 default=None, 641 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 642 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.
Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.
Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.
Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.
Lookup key stamped on the template config at import time. null when no lookup key was assigned.
Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.
Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
645class MemberListResponseDataItemAgentSourceSolutionCurrentSolution(BaseModel): 646 category_keys: list[str] | None = Field( 647 default=None, 648 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 649 ) 650 created_at: str | None = Field( 651 default=None, description="When the Solution config was first imported (ISO 8601)." 652 ) 653 description: str | None = Field( 654 default=None, 655 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 656 ) 657 events: dict[str, Any] | None = Field( 658 default=None, 659 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 660 ) 661 id: str = Field(..., description="Solution config ID (`cfg_...`).") 662 image_url: str | None = Field( 663 default=None, 664 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 665 ) 666 installed_config_ids: list[str] = Field( 667 ..., 668 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 669 ) 670 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 671 latest_solution: str | None = Field( 672 default=None, 673 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 674 ) 675 latest_version: str | None = Field( 676 default=None, 677 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 678 ) 679 lookup_key: str | None = Field( 680 default=None, 681 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 682 ) 683 metadata: dict[str, Any] | None = Field( 684 default=None, 685 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 686 ) 687 name: str | None = Field( 688 default=None, 689 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 690 ) 691 org: str | None = Field( 692 default=None, 693 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 694 ) 695 org_logo: MemberListResponseDataItemAgentSourceSolutionCurrentSolutionOrgLogo | None = Field( 696 default=None, 697 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 698 ) 699 org_name: str | None = Field( 700 default=None, 701 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 702 ) 703 org_slug: str | None = Field( 704 default=None, 705 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 706 ) 707 owners: list[str] = Field( 708 ..., 709 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 710 ) 711 readme_url: str | None = Field( 712 default=None, 713 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 714 ) 715 screenshot_urls: list[str] | None = Field( 716 default=None, 717 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 718 ) 719 solution_id: str | None = Field( 720 default=None, 721 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 722 ) 723 solution_version: str | None = Field( 724 default=None, 725 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 726 ) 727 tag_keys: list[str] | None = Field( 728 default=None, 729 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 730 ) 731 template_kind: str | None = Field( 732 default=None, 733 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 734 ) 735 templates: list[MemberListResponseDataItemAgentSourceSolutionCurrentSolutionTemplatesItem] = ( 736 Field( 737 ..., 738 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 739 ) 740 ) 741 updated_at: str | None = Field( 742 default=None, description="When the Solution config was last modified (ISO 8601)." 743 ) 744 upgrade_available: bool = Field( 745 ..., 746 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 747 ) 748 virtual_path: str | None = Field( 749 default=None, 750 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 751 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.
Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.
Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.
Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image. Org-only rows remain null; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.
Config IDs (cfg_...) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.
When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.
When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.
The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.
Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.
Human-facing display name declared in the Solution body. null when the Solution body does not set one.
Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.
Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.
Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).
Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.
Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.
Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.
Freeform tag keys declared in the Solution body. An empty array when the body declares none.
Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.
Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.
true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.
754class MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo(BaseModel): 755 file: str | None = Field( 756 default=None, 757 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 758 ) 759 height: int | None = Field( 760 default=None, description="Height of the image in pixels. `null` if not known." 761 ) 762 media: str | None = Field( 763 default=None, 764 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 765 ) 766 mime_type: str | None = Field( 767 default=None, 768 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 769 ) 770 refresh_url: str | None = Field( 771 default=None, 772 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 773 ) 774 url: str | None = Field( 775 default=None, 776 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 777 ) 778 width: int | None = Field( 779 default=None, description="Width of the image in pixels. `null` if not known." 780 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
783class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 784 BaseModel 785): 786 description: str | None = Field( 787 default=None, 788 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 789 ) 790 name: str = Field( 791 ..., 792 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 793 ) 794 required: bool = Field( 795 ..., 796 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 797 ) 798 type: str = Field( 799 ..., 800 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 801 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Workflow-authored explanation of the slot's role. null when the workflow declares none.
The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.
804class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills( 805 BaseModel 806): 807 participants: dict[str, Any] | None = Field( 808 default=None, 809 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 810 ) 811 payload: dict[str, Any] | None = Field( 812 default=None, 813 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 814 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
817class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract( 818 BaseModel 819): 820 input_schema: dict[str, Any] | None = Field( 821 default=None, 822 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 823 ) 824 participants: ( 825 list[ 826 MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem 827 ] 828 | None 829 ) = Field( 830 default=None, 831 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 832 ) 833 prefills: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 834 ..., 835 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 836 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.
Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.
Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.
839class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails(BaseModel): 840 automation_type: str | None = Field( 841 default=None, 842 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 843 ) 844 invoke_contract: ( 845 MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetailsInvokeContract 846 | None 847 ) = Field( 848 default=None, 849 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 850 ) 851 type: Literal["automation"] = Field( 852 default="automation", 853 description="Template-details discriminator. Always `automation` for this variant.", 854 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.
Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.
857class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(BaseModel): 858 description: str | None = Field( 859 default=None, 860 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 861 ) 862 details: MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItemDetails | None = ( 863 Field( 864 default=None, 865 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 866 ) 867 ) 868 display_name: str | None = Field( 869 default=None, 870 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 871 ) 872 id: str | None = Field( 873 default=None, 874 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 875 ) 876 kind: str = Field( 877 ..., 878 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 879 ) 880 lookup_key: str | None = Field( 881 default=None, 882 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 883 ) 884 name: str | None = Field( 885 default=None, 886 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 887 ) 888 readme_url: str | None = Field( 889 default=None, 890 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 891 ) 892 virtual_path: str | None = Field( 893 default=None, 894 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 895 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.
Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.
Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.
Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.
Lookup key stamped on the template config at import time. null when no lookup key was assigned.
Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.
Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
898class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel): 899 category_keys: list[str] | None = Field( 900 default=None, 901 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 902 ) 903 created_at: str | None = Field( 904 default=None, description="When the Solution config was first imported (ISO 8601)." 905 ) 906 description: str | None = Field( 907 default=None, 908 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 909 ) 910 events: dict[str, Any] | None = Field( 911 default=None, 912 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 913 ) 914 id: str = Field(..., description="Solution config ID (`cfg_...`).") 915 image_url: str | None = Field( 916 default=None, 917 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 918 ) 919 installed_config_ids: list[str] = Field( 920 ..., 921 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 922 ) 923 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 924 latest_solution: str | None = Field( 925 default=None, 926 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 927 ) 928 latest_version: str | None = Field( 929 default=None, 930 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 931 ) 932 lookup_key: str | None = Field( 933 default=None, 934 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 935 ) 936 metadata: dict[str, Any] | None = Field( 937 default=None, 938 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 939 ) 940 name: str | None = Field( 941 default=None, 942 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 943 ) 944 org: str | None = Field( 945 default=None, 946 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 947 ) 948 org_logo: MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo | None = Field( 949 default=None, 950 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 951 ) 952 org_name: str | None = Field( 953 default=None, 954 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 955 ) 956 org_slug: str | None = Field( 957 default=None, 958 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 959 ) 960 owners: list[str] = Field( 961 ..., 962 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 963 ) 964 readme_url: str | None = Field( 965 default=None, 966 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 967 ) 968 screenshot_urls: list[str] | None = Field( 969 default=None, 970 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 971 ) 972 solution_id: str | None = Field( 973 default=None, 974 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 975 ) 976 solution_version: str | None = Field( 977 default=None, 978 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 979 ) 980 tag_keys: list[str] | None = Field( 981 default=None, 982 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 983 ) 984 template_kind: str | None = Field( 985 default=None, 986 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 987 ) 988 templates: list[MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem] = Field( 989 ..., 990 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 991 ) 992 updated_at: str | None = Field( 993 default=None, description="When the Solution config was last modified (ISO 8601)." 994 ) 995 upgrade_available: bool = Field( 996 ..., 997 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 998 ) 999 virtual_path: str | None = Field( 1000 default=None, 1001 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 1002 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.
Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.
Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.
Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image. Org-only rows remain null; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.
Config IDs (cfg_...) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.
When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.
When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.
The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.
Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.
Human-facing display name declared in the Solution body. null when the Solution body does not set one.
Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.
Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.
Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).
Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.
Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.
Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.
Freeform tag keys declared in the Solution body. An empty array when the body declares none.
Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.
Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.
true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.
1005class MemberListResponseDataItemAgentSourceSolutionTemplate(BaseModel): 1006 created_at: datetime | None = Field( 1007 default=None, description="When this template config was created (ISO 8601)." 1008 ) 1009 description: str | None = Field( 1010 default=None, 1011 description="Description of the template from the config body. `null` if the current version has no `description` field.", 1012 ) 1013 display_name: str | None = Field( 1014 default=None, 1015 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 1016 ) 1017 id: str = Field(..., description="Template config ID (`cfg_...`).") 1018 kind: str = Field( 1019 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 1020 ) 1021 lookup_key: str | None = Field( 1022 default=None, 1023 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 1024 ) 1025 name: str | None = Field( 1026 default=None, 1027 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 1028 ) 1029 updated_at: datetime | None = Field( 1030 default=None, description="When this template config was last modified (ISO 8601)." 1031 ) 1032 virtual_path: str | None = Field( 1033 default=None, 1034 description="Virtual filesystem path for this template config. `null` if not set.", 1035 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Description of the template from the config body. null if the current version has no description field.
Human-readable display name from the config body. null if the current version has no display_name field.
Config kind identifier for this template (e.g. "agent_tool_template").
Stable lookup key assigned to this template config. null if no lookup key is set.
Template name as stored in the config body. null if the current version has no name field.
1038class MemberListResponseDataItemAgentSourceSolution(BaseModel): 1039 current_solution: MemberListResponseDataItemAgentSourceSolutionCurrentSolution | None = Field( 1040 default=None, 1041 description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.", 1042 ) 1043 solution: MemberListResponseDataItemAgentSourceSolutionSolution = Field( 1044 ..., 1045 description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.", 1046 ) 1047 template: MemberListResponseDataItemAgentSourceSolutionTemplate = Field( 1048 ..., 1049 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 1050 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Summary of the current parent Solution config row. solution is the pinned Solution version the agent points at; current_solution is the source Solution config row as it exists now.
Summary of the parent Solution, including upgrade_available, latest_version, and latest_solution when a newer system-scoped version is available for the agent's org-scoped Solution.
1053class MemberListResponseDataItemAgent(BaseModel): 1054 acl: MemberListResponseDataItemAgentAcl | None = Field( 1055 default=None, 1056 description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.", 1057 ) 1058 app: str | None = Field( 1059 default=None, description="ID of the application that owns this agent (`dap_...`)." 1060 ) 1061 created_at: str | None = Field( 1062 default=None, description="When the agent was created (ISO 8601)." 1063 ) 1064 default_model: str | None = Field( 1065 default=None, 1066 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 1067 ) 1068 description: str | None = Field( 1069 default=None, 1070 description="Human-readable description of what the agent does. `null` if not set.", 1071 ) 1072 email: str | None = Field( 1073 default=None, 1074 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 1075 ) 1076 id: str = Field(..., description="Agent ID (`agi_...`).") 1077 identity: str | None = Field( 1078 default=None, 1079 description="System-level identity prompt that shapes the agent's persona and behavior.", 1080 ) 1081 last_applied_template_config: str | None = Field( 1082 default=None, 1083 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 1084 ) 1085 lookup_key: str | None = Field( 1086 default=None, 1087 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 1088 ) 1089 metadata: dict[str, Any] | None = Field( 1090 default=None, 1091 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 1092 ) 1093 name: str | None = Field( 1094 default=None, description="Human-readable display name for the agent. `null` if not set." 1095 ) 1096 org: str | None = Field( 1097 default=None, 1098 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 1099 ) 1100 org_name: str | None = Field( 1101 default=None, 1102 description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.", 1103 ) 1104 originator: str | None = Field( 1105 default=None, 1106 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 1107 ) 1108 phone_number: str | None = Field( 1109 default=None, 1110 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 1111 ) 1112 sandbox: str | None = Field( 1113 default=None, 1114 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 1115 ) 1116 source_solution: MemberListResponseDataItemAgentSourceSolution | None = Field( 1117 default=None, 1118 description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.", 1119 ) 1120 team: str | None = Field( 1121 default=None, 1122 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 1123 ) 1124 template_upgrade_available: bool | None = Field( 1125 default=None, 1126 description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).", 1127 ) 1128 updated_at: str | None = Field( 1129 default=None, description="When the agent was last modified (ISO 8601)." 1130 ) 1131 user: str | None = Field( 1132 default=None, 1133 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 1134 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Access control list for the agent. Contains a grants array where each entry specifies principal_type, principal, and actions. null when no ACL restrictions are applied and the agent is accessible to all members of its scope.
Default LLM model identifier used by this agent when no model is specified at runtime (e.g. "claude-3-7-sonnet-latest").
Email address provisioned for this agent. null if email delivery is not configured.
System-level identity prompt that shapes the agent's persona and behavior.
ID of the AgentTemplate config (cfg_...) this agent was last provisioned or updated from. null for manually created agents.
Stable, user-defined identifier for this agent within the application. Unique per app.
Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.
ID of the organization this agent belongs to (org_...). null if the agent is not org-scoped.
Display name of the organization this agent belongs to. null when the agent is not org-scoped or when the org association was not preloaded.
Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).
Phone number provisioned for this agent. null if SMS is not configured.
ID of the sandbox environment this agent is scoped to (dsb_...). null in production deployments.
Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes upgrade_available, latest_version, and latest_solution so you can render an upgrade badge without a separate dry-run call. null for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.
ID of the team that owns this agent (tem_...). null if the agent is not team-scoped.
True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from source_solution.upgrade_available, which compares Solution versions: an agent can lag its template (template_upgrade_available: true) while the org already holds the latest Solution version (upgrade_available: false).
1137class MemberListResponseDataItemProfilePicture(BaseModel): 1138 file: str | None = Field( 1139 default=None, 1140 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1141 ) 1142 height: int | None = Field( 1143 default=None, description="Height of the image in pixels. `null` if not known." 1144 ) 1145 media: str | None = Field( 1146 default=None, 1147 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1148 ) 1149 mime_type: str | None = Field( 1150 default=None, 1151 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1152 ) 1153 refresh_url: str | None = Field( 1154 default=None, 1155 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1156 ) 1157 url: str | None = Field( 1158 default=None, 1159 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1160 ) 1161 width: int | None = Field( 1162 default=None, description="Width of the image in pixels. `null` if not known." 1163 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1166class MemberListResponseDataItemUser(BaseModel): 1167 alias: str | None = Field( 1168 default=None, description="Short handle or alias for the user. `null` if not set." 1169 ) 1170 app: str | None = Field( 1171 default=None, 1172 description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.", 1173 ) 1174 app_name: str | None = Field( 1175 default=None, 1176 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 1177 ) 1178 created_by_agent_user: str | None = Field( 1179 default=None, 1180 description="Agent user that created this account (`usr_...`). `null` unless an agent created it.", 1181 ) 1182 created_by_developer: str | None = Field( 1183 default=None, 1184 description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.", 1185 ) 1186 created_by_org: str | None = Field( 1187 default=None, 1188 description="Org of the principal that created this user (`org_...`). `null` on legacy rows.", 1189 ) 1190 created_by_team: str | None = Field( 1191 default=None, 1192 description="Team that created this user (`tem_...`). `null` unless created as a team.", 1193 ) 1194 created_by_user: str | None = Field( 1195 default=None, 1196 description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.", 1197 ) 1198 email: str | None = Field(default=None, description="Email address of the user.") 1199 id: str = Field(..., description="User ID (`usr_...`).") 1200 is_system_user: bool | None = Field( 1201 default=None, 1202 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 1203 ) 1204 metadata: dict[str, Any] | None = Field( 1205 default=None, 1206 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 1207 ) 1208 name: str | None = Field( 1209 default=None, 1210 description="Full display name of the user. `null` if the user has not set a name.", 1211 ) 1212 org: str | None = Field( 1213 default=None, 1214 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 1215 ) 1216 org_name: str | None = Field( 1217 default=None, 1218 description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 1219 ) 1220 org_role: str | None = Field( 1221 default=None, 1222 description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.', 1223 ) 1224 org_slug: str | None = Field( 1225 default=None, 1226 description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 1227 ) 1228 sandbox: str | None = Field( 1229 default=None, 1230 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 1231 ) 1232 sandbox_name: str | None = Field( 1233 default=None, 1234 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 1235 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the app this user (and their access token) is scoped to (dap_...). null if the user is not scoped to an app.
Display name of the user's app. null when the app association was not preloaded by the caller.
Agent user that created this account (usr_...). null unless an agent created it.
Developer account that created this user (dva_...). null unless created via a developer token.
Org of the principal that created this user (org_...). null on legacy rows.
Team that created this user (tem_...). null unless created as a team.
User who created this account (usr_...). null on self-signup or legacy rows.
true if this account is an internal system user rather than a human. System users are created automatically by the platform.
Arbitrary key-value metadata attached to the user. Defaults to an empty object.
ID of the organization this user belongs to (org_...). null if the user is not a member of any organization.
Display name of the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.
Role of the user within their organization. One of "admin", "member", or "viewer". null when the user is not a member of any organization.
Stable workspace slug for the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.
1238class MemberListResponseDataItem(BaseModel): 1239 agent: MemberListResponseDataItemAgent | None = Field( 1240 default=None, 1241 description="The agent associated with this membership, as an expanded agent object. `null` when the member is a user, the type is unknown, or the association is not preloaded.", 1242 ) 1243 created_at: datetime | None = Field( 1244 default=None, description="When this membership record was created (ISO 8601)." 1245 ) 1246 id: str = Field(..., description="Team membership ID (`tmb_...`).") 1247 joined_at: datetime | None = Field( 1248 default=None, description="When the principal joined the team (ISO 8601)." 1249 ) 1250 metadata: dict[str, Any] | None = Field( 1251 default=None, 1252 description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.", 1253 ) 1254 name: str | None = Field( 1255 default=None, 1256 description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.", 1257 ) 1258 profile_picture: MemberListResponseDataItemProfilePicture | None = Field( 1259 default=None, 1260 description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.", 1261 ) 1262 role: str | None = Field( 1263 default=None, 1264 description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.', 1265 ) 1266 team: dict[str, Any] | None = Field( 1267 default=None, 1268 description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.", 1269 ) 1270 type: str | None = Field( 1271 default=None, 1272 description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.', 1273 ) 1274 updated_at: datetime | None = Field( 1275 default=None, description="When this membership record was last updated (ISO 8601)." 1276 ) 1277 user: MemberListResponseDataItemUser | None = Field( 1278 default=None, 1279 description="The user associated with this membership, as an expanded user object. `null` when the member is an agent, the type is unknown, or the association is not preloaded.", 1280 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The agent associated with this membership, as an expanded agent object. null when the member is a user, the type is unknown, or the association is not preloaded.
Arbitrary key-value metadata attached to this membership record. null if no metadata has been set.
Display name of the member, derived from the associated user or agent. null if the principal is unknown.
Profile picture of the member, derived from the associated user or agent. null if not set or principal is unknown.
The team this membership belongs to, as an expanded team object. null when the team association is not preloaded.
Resolved principal type. One of "user", "agent", or "unknown" when the principal cannot be determined.
When this membership record was last updated (ISO 8601).
1283class MemberListResponse(BaseModel): 1284 """ 1285 Successful response 1286 """ 1287 1288 data: list[MemberListResponseDataItem] = Field( 1289 ..., description="Array of team membership objects, including both user and agent members." 1290 )
Successful response
1293class TeamTaskListResponseDataItemCreatedByActorProfilePicture(BaseModel): 1294 file: str | None = Field( 1295 default=None, 1296 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1297 ) 1298 height: int | None = Field( 1299 default=None, description="Height of the image in pixels. `null` if not known." 1300 ) 1301 media: str | None = Field( 1302 default=None, 1303 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1304 ) 1305 mime_type: str | None = Field( 1306 default=None, 1307 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1308 ) 1309 refresh_url: str | None = Field( 1310 default=None, 1311 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1312 ) 1313 url: str | None = Field( 1314 default=None, 1315 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1316 ) 1317 width: int | None = Field( 1318 default=None, description="Width of the image in pixels. `null` if not known." 1319 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1322class TeamTaskListResponseDataItemCreatedByActor(BaseModel): 1323 alias: str | None = Field( 1324 default=None, 1325 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1326 ) 1327 id: str | None = Field( 1328 default=None, 1329 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1330 ) 1331 name: str | None = Field( 1332 default=None, 1333 description="Display name of the actor shown in the UI. `null` if no name is set.", 1334 ) 1335 profile_picture: TeamTaskListResponseDataItemCreatedByActorProfilePicture | None = Field( 1336 default=None, 1337 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1338 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
1341class TeamTaskListResponseDataItemCurrentLease(BaseModel): 1342 expires_at: datetime = Field( 1343 ..., description="Server-calculated lease expiry in ISO 8601 format." 1344 ) 1345 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 1346 session_name: str = Field( 1347 ..., description="Display name supplied by the coding session that holds the lease." 1348 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
1351class TeamTaskListResponseDataItemOwnerActorProfilePicture(BaseModel): 1352 file: str | None = Field( 1353 default=None, 1354 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1355 ) 1356 height: int | None = Field( 1357 default=None, description="Height of the image in pixels. `null` if not known." 1358 ) 1359 media: str | None = Field( 1360 default=None, 1361 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1362 ) 1363 mime_type: str | None = Field( 1364 default=None, 1365 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1366 ) 1367 refresh_url: str | None = Field( 1368 default=None, 1369 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1370 ) 1371 url: str | None = Field( 1372 default=None, 1373 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1374 ) 1375 width: int | None = Field( 1376 default=None, description="Width of the image in pixels. `null` if not known." 1377 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1380class TeamTaskListResponseDataItemOwnerActor(BaseModel): 1381 alias: str | None = Field( 1382 default=None, 1383 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1384 ) 1385 id: str | None = Field( 1386 default=None, 1387 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1388 ) 1389 name: str | None = Field( 1390 default=None, 1391 description="Display name of the actor shown in the UI. `null` if no name is set.", 1392 ) 1393 profile_picture: TeamTaskListResponseDataItemOwnerActorProfilePicture | None = Field( 1394 default=None, 1395 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1396 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
1399class TeamTaskListResponseDataItem(BaseModel): 1400 agent: str | None = Field( 1401 default=None, 1402 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 1403 ) 1404 aggregate_version: int | None = Field( 1405 default=None, 1406 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 1407 ) 1408 blocked_by_count: int | None = Field( 1409 default=None, 1410 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 1411 ) 1412 closed_at: datetime | None = Field( 1413 default=None, 1414 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 1415 ) 1416 comments_count: int | None = Field( 1417 default=None, description="Total number of comments posted on this task." 1418 ) 1419 created_at: datetime | None = Field( 1420 default=None, description="When the task was created (ISO 8601)." 1421 ) 1422 created_by_actor: TeamTaskListResponseDataItemCreatedByActor | None = Field( 1423 default=None, 1424 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 1425 ) 1426 created_by_agent: str | None = Field( 1427 default=None, 1428 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 1429 ) 1430 created_by_user: str | None = Field( 1431 default=None, 1432 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 1433 ) 1434 current_lease: TeamTaskListResponseDataItemCurrentLease | None = Field( 1435 default=None, 1436 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 1437 ) 1438 description: str | None = Field( 1439 default=None, 1440 description="Long-form description or notes for the task. `null` if no description has been provided.", 1441 ) 1442 due_date: datetime | None = Field( 1443 default=None, 1444 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 1445 ) 1446 epic: str | None = Field( 1447 default=None, 1448 description="Free-form grouping label. `null` when the task is not in an epic.", 1449 ) 1450 id: str = Field(..., description="Task ID (`tsk_...`).") 1451 is_blocked: bool | None = Field( 1452 default=None, 1453 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 1454 ) 1455 is_stalled: bool | None = Field( 1456 default=None, 1457 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 1458 ) 1459 links: dict[str, Any] | None = Field( 1460 default=None, 1461 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 1462 ) 1463 metadata: dict[str, Any] | None = Field( 1464 default=None, 1465 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 1466 ) 1467 name: str = Field(..., description="Human-readable title of the task.") 1468 org: str | None = Field( 1469 default=None, 1470 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 1471 ) 1472 owner_actor: TeamTaskListResponseDataItemOwnerActor | None = Field( 1473 default=None, 1474 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 1475 ) 1476 owner_agent: str | None = Field( 1477 default=None, 1478 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 1479 ) 1480 owner_user: str | None = Field( 1481 default=None, 1482 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 1483 ) 1484 parent: str | None = Field( 1485 default=None, 1486 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 1487 ) 1488 priority: int | None = Field( 1489 default=None, 1490 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 1491 ) 1492 project_id: str | None = Field( 1493 default=None, 1494 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 1495 ) 1496 sandbox: str | None = Field( 1497 default=None, 1498 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 1499 ) 1500 source_id: str | None = Field( 1501 default=None, 1502 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 1503 ) 1504 source_scope: str | None = Field( 1505 default=None, 1506 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 1507 ) 1508 source_type: str | None = Field( 1509 default=None, 1510 description="Kind of source object (for example `repository`). `null` when the task has no source.", 1511 ) 1512 stalled_since: datetime | None = Field( 1513 default=None, 1514 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 1515 ) 1516 status: str = Field( 1517 ..., 1518 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 1519 ) 1520 subtasks_count: int | None = Field( 1521 default=None, 1522 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 1523 ) 1524 tags: list[str] | None = Field( 1525 default=None, 1526 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 1527 ) 1528 target_binary: str | None = Field( 1529 default=None, 1530 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 1531 ) 1532 target_version: str | None = Field( 1533 default=None, 1534 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 1535 ) 1536 team: str | None = Field( 1537 default=None, 1538 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 1539 ) 1540 thread: str | None = Field( 1541 default=None, 1542 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 1543 ) 1544 updated_at: datetime | None = Field( 1545 default=None, description="When the task was last modified (ISO 8601)." 1546 ) 1547 user: str | None = Field( 1548 default=None, 1549 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 1550 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.
Event-stream version for optimistic update fencing. Pass this value as expected_version on an update to reject concurrent writes.
Number of readable tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.
When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.
ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.
ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.
Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.
Long-form description or notes for the task. null if no description has been provided.
Date and time by which the task should be completed (ISO 8601). null if no due date is set.
true while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.
True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.
Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.
Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.
ID of the organization this task belongs to (org_...). null for tasks outside an org context.
ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.
ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.
ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.
Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.
Optional project ID (prj_...). Membership does not change task visibility.
ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.
Source object identity (for example ArchAstro/firstlanding). null when the task has no source.
Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.
Kind of source object (for example repository). null when the task has no source.
Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.
Current status of the task. One of "open", "in_progress", "in_review", "paused", "failed", "superseding", "done", or "cancelled".
Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.
Binary that must run this work (for example my-cli). A worker should take the task only when its own target_binary build is at least target_version. null when the task has no target. Set together with target_version.
Minimum semantic version of target_binary that can run this work (for example 0.48.9), in canonical MAJOR.MINOR.PATCH[-prerelease][+build] form. null when the task has no target.
ID of the team that owns this task (tem_...). null if the task is not scoped to a team.
1553class TeamTaskListResponse(BaseModel): 1554 """ 1555 Successful response 1556 """ 1557 1558 after_cursor: str | None = None 1559 before_cursor: str | None = None 1560 data: list[TeamTaskListResponseDataItem] = Field( 1561 ..., description="Array of task objects matching the requested filters." 1562 ) 1563 has_more: bool
Successful response
1566class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture(BaseModel): 1567 file: str | None = Field( 1568 default=None, 1569 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1570 ) 1571 height: int | None = Field( 1572 default=None, description="Height of the image in pixels. `null` if not known." 1573 ) 1574 media: str | None = Field( 1575 default=None, 1576 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1577 ) 1578 mime_type: str | None = Field( 1579 default=None, 1580 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1581 ) 1582 refresh_url: str | None = Field( 1583 default=None, 1584 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1585 ) 1586 url: str | None = Field( 1587 default=None, 1588 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1589 ) 1590 width: int | None = Field( 1591 default=None, description="Width of the image in pixels. `null` if not known." 1592 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1595class TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor(BaseModel): 1596 alias: str | None = Field( 1597 default=None, 1598 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1599 ) 1600 id: str | None = Field( 1601 default=None, 1602 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1603 ) 1604 name: str | None = Field( 1605 default=None, 1606 description="Display name of the actor shown in the UI. `null` if no name is set.", 1607 ) 1608 profile_picture: ( 1609 TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActorProfilePicture | None 1610 ) = Field( 1611 default=None, 1612 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1613 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
Profile picture for the actor. null if the actor has no profile picture.
1616class TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease(BaseModel): 1617 expires_at: datetime = Field( 1618 ..., description="Server-calculated lease expiry in ISO 8601 format." 1619 ) 1620 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 1621 session_name: str = Field( 1622 ..., description="Display name supplied by the coding session that holds the lease." 1623 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
1626class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture(BaseModel): 1627 file: str | None = Field( 1628 default=None, 1629 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1630 ) 1631 height: int | None = Field( 1632 default=None, description="Height of the image in pixels. `null` if not known." 1633 ) 1634 media: str | None = Field( 1635 default=None, 1636 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1637 ) 1638 mime_type: str | None = Field( 1639 default=None, 1640 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1641 ) 1642 refresh_url: str | None = Field( 1643 default=None, 1644 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1645 ) 1646 url: str | None = Field( 1647 default=None, 1648 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1649 ) 1650 width: int | None = Field( 1651 default=None, description="Width of the image in pixels. `null` if not known." 1652 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1655class TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor(BaseModel): 1656 alias: str | None = Field( 1657 default=None, 1658 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1659 ) 1660 id: str | None = Field( 1661 default=None, 1662 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1663 ) 1664 name: str | None = Field( 1665 default=None, 1666 description="Display name of the actor shown in the UI. `null` if no name is set.", 1667 ) 1668 profile_picture: ( 1669 TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActorProfilePicture | None 1670 ) = Field( 1671 default=None, 1672 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1673 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
Profile picture for the actor. null if the actor has no profile picture.
1676class TeamTaskBlockerCyclesResponseDataItemTasksItem(BaseModel): 1677 agent: str | None = Field( 1678 default=None, 1679 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 1680 ) 1681 aggregate_version: int | None = Field( 1682 default=None, 1683 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 1684 ) 1685 blocked_by_count: int | None = Field( 1686 default=None, 1687 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 1688 ) 1689 closed_at: datetime | None = Field( 1690 default=None, 1691 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 1692 ) 1693 comments_count: int | None = Field( 1694 default=None, description="Total number of comments posted on this task." 1695 ) 1696 created_at: datetime | None = Field( 1697 default=None, description="When the task was created (ISO 8601)." 1698 ) 1699 created_by_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemCreatedByActor | None = Field( 1700 default=None, 1701 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 1702 ) 1703 created_by_agent: str | None = Field( 1704 default=None, 1705 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 1706 ) 1707 created_by_user: str | None = Field( 1708 default=None, 1709 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 1710 ) 1711 current_lease: TeamTaskBlockerCyclesResponseDataItemTasksItemCurrentLease | None = Field( 1712 default=None, 1713 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 1714 ) 1715 description: str | None = Field( 1716 default=None, 1717 description="Long-form description or notes for the task. `null` if no description has been provided.", 1718 ) 1719 due_date: datetime | None = Field( 1720 default=None, 1721 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 1722 ) 1723 epic: str | None = Field( 1724 default=None, 1725 description="Free-form grouping label. `null` when the task is not in an epic.", 1726 ) 1727 id: str = Field(..., description="Task ID (`tsk_...`).") 1728 is_blocked: bool | None = Field( 1729 default=None, 1730 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 1731 ) 1732 is_stalled: bool | None = Field( 1733 default=None, 1734 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 1735 ) 1736 links: dict[str, Any] | None = Field( 1737 default=None, 1738 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 1739 ) 1740 metadata: dict[str, Any] | None = Field( 1741 default=None, 1742 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 1743 ) 1744 name: str = Field(..., description="Human-readable title of the task.") 1745 org: str | None = Field( 1746 default=None, 1747 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 1748 ) 1749 owner_actor: TeamTaskBlockerCyclesResponseDataItemTasksItemOwnerActor | None = Field( 1750 default=None, 1751 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 1752 ) 1753 owner_agent: str | None = Field( 1754 default=None, 1755 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 1756 ) 1757 owner_user: str | None = Field( 1758 default=None, 1759 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 1760 ) 1761 parent: str | None = Field( 1762 default=None, 1763 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 1764 ) 1765 priority: int | None = Field( 1766 default=None, 1767 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 1768 ) 1769 project_id: str | None = Field( 1770 default=None, 1771 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 1772 ) 1773 sandbox: str | None = Field( 1774 default=None, 1775 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 1776 ) 1777 source_id: str | None = Field( 1778 default=None, 1779 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 1780 ) 1781 source_scope: str | None = Field( 1782 default=None, 1783 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 1784 ) 1785 source_type: str | None = Field( 1786 default=None, 1787 description="Kind of source object (for example `repository`). `null` when the task has no source.", 1788 ) 1789 stalled_since: datetime | None = Field( 1790 default=None, 1791 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 1792 ) 1793 status: str = Field( 1794 ..., 1795 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 1796 ) 1797 subtasks_count: int | None = Field( 1798 default=None, 1799 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 1800 ) 1801 tags: list[str] | None = Field( 1802 default=None, 1803 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 1804 ) 1805 target_binary: str | None = Field( 1806 default=None, 1807 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 1808 ) 1809 target_version: str | None = Field( 1810 default=None, 1811 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 1812 ) 1813 team: str | None = Field( 1814 default=None, 1815 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 1816 ) 1817 thread: str | None = Field( 1818 default=None, 1819 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 1820 ) 1821 updated_at: datetime | None = Field( 1822 default=None, description="When the task was last modified (ISO 8601)." 1823 ) 1824 user: str | None = Field( 1825 default=None, 1826 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 1827 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.
Event-stream version for optimistic update fencing. Pass this value as expected_version on an update to reject concurrent writes.
Number of readable tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.
When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.
ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.
ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.
Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.
Long-form description or notes for the task. null if no description has been provided.
Date and time by which the task should be completed (ISO 8601). null if no due date is set.
true while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.
True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.
Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.
Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.
ID of the organization this task belongs to (org_...). null for tasks outside an org context.
ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.
ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.
ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.
Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.
Optional project ID (prj_...). Membership does not change task visibility.
ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.
Source object identity (for example ArchAstro/firstlanding). null when the task has no source.
Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.
Kind of source object (for example repository). null when the task has no source.
Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.
Current status of the task. One of "open", "in_progress", "in_review", "paused", "failed", "superseding", "done", or "cancelled".
Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.
Binary that must run this work (for example my-cli). A worker should take the task only when its own target_binary build is at least target_version. null when the task has no target. Set together with target_version.
Minimum semantic version of target_binary that can run this work (for example 0.48.9), in canonical MAJOR.MINOR.PATCH[-prerelease][+build] form. null when the task has no target.
ID of the team that owns this task (tem_...). null if the task is not scoped to a team.
1830class TeamTaskBlockerCyclesResponseDataItem(BaseModel): 1831 tasks: list[TeamTaskBlockerCyclesResponseDataItemTasksItem] = Field( 1832 ..., description="Every unfinished task in this cyclic blocker component." 1833 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
1836class TeamTaskBlockerCyclesResponse(BaseModel): 1837 """ 1838 Successful response 1839 """ 1840 1841 after_cursor: str | None = None 1842 before_cursor: str | None = None 1843 data: list[TeamTaskBlockerCyclesResponseDataItem] 1844 has_more: bool
Successful response
1847class TeamTaskMetricsResponse(BaseModel): 1848 """ 1849 Successful response 1850 """ 1851 1852 completed: int 1853 created: int 1854 days: int 1855 end_at: datetime 1856 open: int 1857 series: list[dict[str, Any]] = Field( 1858 ..., 1859 description="Zero-filled UTC-day buckets with `date`, end-of-day `open`, `created`, and `completed`.", 1860 ) 1861 start_at: datetime
Successful response
1864class TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture(BaseModel): 1865 file: str | None = Field( 1866 default=None, 1867 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1868 ) 1869 height: int | None = Field( 1870 default=None, description="Height of the image in pixels. `null` if not known." 1871 ) 1872 media: str | None = Field( 1873 default=None, 1874 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1875 ) 1876 mime_type: str | None = Field( 1877 default=None, 1878 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1879 ) 1880 refresh_url: str | None = Field( 1881 default=None, 1882 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1883 ) 1884 url: str | None = Field( 1885 default=None, 1886 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1887 ) 1888 width: int | None = Field( 1889 default=None, description="Width of the image in pixels. `null` if not known." 1890 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1893class TeamTaskReadyResponseDataItemTaskCreatedByActor(BaseModel): 1894 alias: str | None = Field( 1895 default=None, 1896 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1897 ) 1898 id: str | None = Field( 1899 default=None, 1900 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1901 ) 1902 name: str | None = Field( 1903 default=None, 1904 description="Display name of the actor shown in the UI. `null` if no name is set.", 1905 ) 1906 profile_picture: TeamTaskReadyResponseDataItemTaskCreatedByActorProfilePicture | None = Field( 1907 default=None, 1908 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1909 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
1912class TeamTaskReadyResponseDataItemTaskCurrentLease(BaseModel): 1913 expires_at: datetime = Field( 1914 ..., description="Server-calculated lease expiry in ISO 8601 format." 1915 ) 1916 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 1917 session_name: str = Field( 1918 ..., description="Display name supplied by the coding session that holds the lease." 1919 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
1922class TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture(BaseModel): 1923 file: str | None = Field( 1924 default=None, 1925 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1926 ) 1927 height: int | None = Field( 1928 default=None, description="Height of the image in pixels. `null` if not known." 1929 ) 1930 media: str | None = Field( 1931 default=None, 1932 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1933 ) 1934 mime_type: str | None = Field( 1935 default=None, 1936 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1937 ) 1938 refresh_url: str | None = Field( 1939 default=None, 1940 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 1941 ) 1942 url: str | None = Field( 1943 default=None, 1944 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 1945 ) 1946 width: int | None = Field( 1947 default=None, description="Width of the image in pixels. `null` if not known." 1948 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
1951class TeamTaskReadyResponseDataItemTaskOwnerActor(BaseModel): 1952 alias: str | None = Field( 1953 default=None, 1954 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 1955 ) 1956 id: str | None = Field( 1957 default=None, 1958 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 1959 ) 1960 name: str | None = Field( 1961 default=None, 1962 description="Display name of the actor shown in the UI. `null` if no name is set.", 1963 ) 1964 profile_picture: TeamTaskReadyResponseDataItemTaskOwnerActorProfilePicture | None = Field( 1965 default=None, 1966 description="Profile picture for the actor. `null` if the actor has no profile picture.", 1967 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
1970class TeamTaskReadyResponseDataItemTask(BaseModel): 1971 agent: str | None = Field( 1972 default=None, 1973 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 1974 ) 1975 aggregate_version: int | None = Field( 1976 default=None, 1977 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 1978 ) 1979 blocked_by_count: int | None = Field( 1980 default=None, 1981 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 1982 ) 1983 closed_at: datetime | None = Field( 1984 default=None, 1985 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 1986 ) 1987 comments_count: int | None = Field( 1988 default=None, description="Total number of comments posted on this task." 1989 ) 1990 created_at: datetime | None = Field( 1991 default=None, description="When the task was created (ISO 8601)." 1992 ) 1993 created_by_actor: TeamTaskReadyResponseDataItemTaskCreatedByActor | None = Field( 1994 default=None, 1995 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 1996 ) 1997 created_by_agent: str | None = Field( 1998 default=None, 1999 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 2000 ) 2001 created_by_user: str | None = Field( 2002 default=None, 2003 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 2004 ) 2005 current_lease: TeamTaskReadyResponseDataItemTaskCurrentLease | None = Field( 2006 default=None, 2007 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 2008 ) 2009 description: str | None = Field( 2010 default=None, 2011 description="Long-form description or notes for the task. `null` if no description has been provided.", 2012 ) 2013 due_date: datetime | None = Field( 2014 default=None, 2015 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 2016 ) 2017 epic: str | None = Field( 2018 default=None, 2019 description="Free-form grouping label. `null` when the task is not in an epic.", 2020 ) 2021 id: str = Field(..., description="Task ID (`tsk_...`).") 2022 is_blocked: bool | None = Field( 2023 default=None, 2024 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 2025 ) 2026 is_stalled: bool | None = Field( 2027 default=None, 2028 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 2029 ) 2030 links: dict[str, Any] | None = Field( 2031 default=None, 2032 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 2033 ) 2034 metadata: dict[str, Any] | None = Field( 2035 default=None, 2036 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 2037 ) 2038 name: str = Field(..., description="Human-readable title of the task.") 2039 org: str | None = Field( 2040 default=None, 2041 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 2042 ) 2043 owner_actor: TeamTaskReadyResponseDataItemTaskOwnerActor | None = Field( 2044 default=None, 2045 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 2046 ) 2047 owner_agent: str | None = Field( 2048 default=None, 2049 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 2050 ) 2051 owner_user: str | None = Field( 2052 default=None, 2053 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 2054 ) 2055 parent: str | None = Field( 2056 default=None, 2057 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 2058 ) 2059 priority: int | None = Field( 2060 default=None, 2061 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 2062 ) 2063 project_id: str | None = Field( 2064 default=None, 2065 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 2066 ) 2067 sandbox: str | None = Field( 2068 default=None, 2069 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 2070 ) 2071 source_id: str | None = Field( 2072 default=None, 2073 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 2074 ) 2075 source_scope: str | None = Field( 2076 default=None, 2077 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 2078 ) 2079 source_type: str | None = Field( 2080 default=None, 2081 description="Kind of source object (for example `repository`). `null` when the task has no source.", 2082 ) 2083 stalled_since: datetime | None = Field( 2084 default=None, 2085 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 2086 ) 2087 status: str = Field( 2088 ..., 2089 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 2090 ) 2091 subtasks_count: int | None = Field( 2092 default=None, 2093 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 2094 ) 2095 tags: list[str] | None = Field( 2096 default=None, 2097 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 2098 ) 2099 target_binary: str | None = Field( 2100 default=None, 2101 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 2102 ) 2103 target_version: str | None = Field( 2104 default=None, 2105 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 2106 ) 2107 team: str | None = Field( 2108 default=None, 2109 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 2110 ) 2111 thread: str | None = Field( 2112 default=None, 2113 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 2114 ) 2115 updated_at: datetime | None = Field( 2116 default=None, description="When the task was last modified (ISO 8601)." 2117 ) 2118 user: str | None = Field( 2119 default=None, 2120 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 2121 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.
Event-stream version for optimistic update fencing. Pass this value as expected_version on an update to reject concurrent writes.
Number of readable tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.
When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.
ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.
ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.
Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.
Long-form description or notes for the task. null if no description has been provided.
Date and time by which the task should be completed (ISO 8601). null if no due date is set.
true while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.
True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.
Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.
Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.
ID of the organization this task belongs to (org_...). null for tasks outside an org context.
ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.
ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.
ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.
Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.
Optional project ID (prj_...). Membership does not change task visibility.
ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.
Source object identity (for example ArchAstro/firstlanding). null when the task has no source.
Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.
Kind of source object (for example repository). null when the task has no source.
Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.
Current status of the task. One of "open", "in_progress", "in_review", "paused", "failed", "superseding", "done", or "cancelled".
Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.
Binary that must run this work (for example my-cli). A worker should take the task only when its own target_binary build is at least target_version. null when the task has no target. Set together with target_version.
Minimum semantic version of target_binary that can run this work (for example 0.48.9), in canonical MAJOR.MINOR.PATCH[-prerelease][+build] form. null when the task has no target.
ID of the team that owns this task (tem_...). null if the task is not scoped to a team.
2124class TeamTaskReadyResponseDataItem(BaseModel): 2125 readiness: Literal["ready", "blocked", "leased"] = Field( 2126 ..., description="One of `ready`, `blocked`, or `leased`." 2127 ) 2128 reason: Literal["open_blockers", "active_lease"] | None = Field( 2129 default=None, 2130 description="Stable exclusion reason: `open_blockers` or `active_lease`; omitted when ready.", 2131 ) 2132 task: TeamTaskReadyResponseDataItemTask = Field( 2133 ..., description="The task evaluated for readiness." 2134 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
One of ready, blocked, or leased.
2137class TeamTaskReadyResponse(BaseModel): 2138 """ 2139 Successful response 2140 """ 2141 2142 after_cursor: str | None = None 2143 authoritative: bool = Field( 2144 ..., 2145 description="Always false because projections can lag writes and a later claim can race this read.", 2146 ) 2147 before_cursor: str | None = None 2148 data: list[TeamTaskReadyResponseDataItem] 2149 has_more: bool
Successful response
2152class TeamTaskSearchResponseDataItemCreatedByActorProfilePicture(BaseModel): 2153 file: str | None = Field( 2154 default=None, 2155 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2156 ) 2157 height: int | None = Field( 2158 default=None, description="Height of the image in pixels. `null` if not known." 2159 ) 2160 media: str | None = Field( 2161 default=None, 2162 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2163 ) 2164 mime_type: str | None = Field( 2165 default=None, 2166 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2167 ) 2168 refresh_url: str | None = Field( 2169 default=None, 2170 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2171 ) 2172 url: str | None = Field( 2173 default=None, 2174 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2175 ) 2176 width: int | None = Field( 2177 default=None, description="Width of the image in pixels. `null` if not known." 2178 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
2181class TeamTaskSearchResponseDataItemCreatedByActor(BaseModel): 2182 alias: str | None = Field( 2183 default=None, 2184 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 2185 ) 2186 id: str | None = Field( 2187 default=None, 2188 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 2189 ) 2190 name: str | None = Field( 2191 default=None, 2192 description="Display name of the actor shown in the UI. `null` if no name is set.", 2193 ) 2194 profile_picture: TeamTaskSearchResponseDataItemCreatedByActorProfilePicture | None = Field( 2195 default=None, 2196 description="Profile picture for the actor. `null` if the actor has no profile picture.", 2197 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
2200class TeamTaskSearchResponseDataItemCurrentLease(BaseModel): 2201 expires_at: datetime = Field( 2202 ..., description="Server-calculated lease expiry in ISO 8601 format." 2203 ) 2204 harness: str = Field(..., description="Bounded harness identifier for the coding session.") 2205 session_name: str = Field( 2206 ..., description="Display name supplied by the coding session that holds the lease." 2207 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
2210class TeamTaskSearchResponseDataItemOwnerActorProfilePicture(BaseModel): 2211 file: str | None = Field( 2212 default=None, 2213 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2214 ) 2215 height: int | None = Field( 2216 default=None, description="Height of the image in pixels. `null` if not known." 2217 ) 2218 media: str | None = Field( 2219 default=None, 2220 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2221 ) 2222 mime_type: str | None = Field( 2223 default=None, 2224 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2225 ) 2226 refresh_url: str | None = Field( 2227 default=None, 2228 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2229 ) 2230 url: str | None = Field( 2231 default=None, 2232 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2233 ) 2234 width: int | None = Field( 2235 default=None, description="Width of the image in pixels. `null` if not known." 2236 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
2239class TeamTaskSearchResponseDataItemOwnerActor(BaseModel): 2240 alias: str | None = Field( 2241 default=None, 2242 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 2243 ) 2244 id: str | None = Field( 2245 default=None, 2246 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 2247 ) 2248 name: str | None = Field( 2249 default=None, 2250 description="Display name of the actor shown in the UI. `null` if no name is set.", 2251 ) 2252 profile_picture: TeamTaskSearchResponseDataItemOwnerActorProfilePicture | None = Field( 2253 default=None, 2254 description="Profile picture for the actor. `null` if the actor has no profile picture.", 2255 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
2258class TeamTaskSearchResponseDataItem(BaseModel): 2259 agent: str | None = Field( 2260 default=None, 2261 description="ID of the agent that owns this task (`agi_...`). `null` if the task is scoped to a team or user.", 2262 ) 2263 aggregate_version: int | None = Field( 2264 default=None, 2265 description="Event-stream version for optimistic update fencing. Pass this value as `expected_version` on an update to reject concurrent writes.", 2266 ) 2267 blocked_by_count: int | None = Field( 2268 default=None, 2269 description="Number of readable tasks marked as blocking this task, whether or not they are done (see `GET /tasks/{task}/blockers`). Computed on list/show reads; create/update responses may lag one read behind.", 2270 ) 2271 closed_at: datetime | None = Field( 2272 default=None, 2273 description="When the task was marked as done or otherwise closed (ISO 8601). `null` if the task is still open.", 2274 ) 2275 comments_count: int | None = Field( 2276 default=None, description="Total number of comments posted on this task." 2277 ) 2278 created_at: datetime | None = Field( 2279 default=None, description="When the task was created (ISO 8601)." 2280 ) 2281 created_by_actor: TeamTaskSearchResponseDataItemCreatedByActor | None = Field( 2282 default=None, 2283 description="Resolved creator details including `id`, `name`, `alias`, and `profile_picture`. `null` if no creator is set or the creator cannot be resolved (e.g. creating agent was deleted).", 2284 ) 2285 created_by_agent: str | None = Field( 2286 default=None, 2287 description="ID of the agent that created this task (`agi_...`). `null` if the task was created by a human user, or if the creating agent was later deleted.", 2288 ) 2289 created_by_user: str | None = Field( 2290 default=None, 2291 description="ID of the user who created this task (`usr_...`). `null` if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.", 2292 ) 2293 current_lease: TeamTaskSearchResponseDataItemCurrentLease | None = Field( 2294 default=None, 2295 description="Viewer-safe live coding-session lease summary. `null` when the task is unleased or the projected lease has expired. Fencing identifiers are never included.", 2296 ) 2297 description: str | None = Field( 2298 default=None, 2299 description="Long-form description or notes for the task. `null` if no description has been provided.", 2300 ) 2301 due_date: datetime | None = Field( 2302 default=None, 2303 description="Date and time by which the task should be completed (ISO 8601). `null` if no due date is set.", 2304 ) 2305 epic: str | None = Field( 2306 default=None, 2307 description="Free-form grouping label. `null` when the task is not in an epic.", 2308 ) 2309 id: str = Field(..., description="Task ID (`tsk_...`).") 2310 is_blocked: bool | None = Field( 2311 default=None, 2312 description="`true` while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.", 2313 ) 2314 is_stalled: bool | None = Field( 2315 default=None, 2316 description="True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.", 2317 ) 2318 links: dict[str, Any] | None = Field( 2319 default=None, 2320 description="Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.", 2321 ) 2322 metadata: dict[str, Any] | None = Field( 2323 default=None, 2324 description="Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.", 2325 ) 2326 name: str = Field(..., description="Human-readable title of the task.") 2327 org: str | None = Field( 2328 default=None, 2329 description="ID of the organization this task belongs to (`org_...`). `null` for tasks outside an org context.", 2330 ) 2331 owner_actor: TeamTaskSearchResponseDataItemOwnerActor | None = Field( 2332 default=None, 2333 description="Resolved owner details including `id`, `name`, `alias`, and `profile_picture`. `null` if the task is unassigned or the owner cannot be resolved (e.g. assigned agent was deleted).", 2334 ) 2335 owner_agent: str | None = Field( 2336 default=None, 2337 description="ID of the agent assigned as owner (`agi_...`). `null` if the owner is a human user, the task is unassigned, or the assigned agent was deleted.", 2338 ) 2339 owner_user: str | None = Field( 2340 default=None, 2341 description="ID of the user assigned as owner (`usr_...`). `null` if the owner is an agent, the task is unassigned, or the assigned agent was deleted.", 2342 ) 2343 parent: str | None = Field( 2344 default=None, 2345 description="ID of the parent task when this task is a subtask (`tsk_...`). `null` for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.", 2346 ) 2347 priority: int | None = Field( 2348 default=None, 2349 description="Priority level of the task from `0` (highest) to `4` (lowest). Defaults to `2` (medium) when not explicitly set.", 2350 ) 2351 project_id: str | None = Field( 2352 default=None, 2353 description="Optional project ID (`prj_...`). Membership does not change task visibility.", 2354 ) 2355 sandbox: str | None = Field( 2356 default=None, 2357 description="ID of the developer sandbox this task is scoped to (`dsb_...`). `null` for tasks outside a sandbox environment.", 2358 ) 2359 source_id: str | None = Field( 2360 default=None, 2361 description="Source object identity (for example `ArchAstro/firstlanding`). `null` when the task has no source.", 2362 ) 2363 source_scope: str | None = Field( 2364 default=None, 2365 description="Container of the work this task is about (for example `github.com`). `null` when the task has no source. Set together with `source_type` and `source_id`.", 2366 ) 2367 source_type: str | None = Field( 2368 default=None, 2369 description="Kind of source object (for example `repository`). `null` when the task has no source.", 2370 ) 2371 stalled_since: datetime | None = Field( 2372 default=None, 2373 description="Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.", 2374 ) 2375 status: str = Field( 2376 ..., 2377 description='Current status of the task. One of `"open"`, `"in_progress"`, `"in_review"`, `"paused"`, `"failed"`, `"superseding"`, `"done"`, or `"cancelled"`.', 2378 ) 2379 subtasks_count: int | None = Field( 2380 default=None, 2381 description="Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.", 2382 ) 2383 tags: list[str] | None = Field( 2384 default=None, 2385 description="Labels for grouping and filtering, stored lowercase and de-duplicated. Empty array when untagged.", 2386 ) 2387 target_binary: str | None = Field( 2388 default=None, 2389 description="Binary that must run this work (for example `my-cli`). A worker should take the task only when its own `target_binary` build is at least `target_version`. `null` when the task has no target. Set together with `target_version`.", 2390 ) 2391 target_version: str | None = Field( 2392 default=None, 2393 description="Minimum semantic version of `target_binary` that can run this work (for example `0.48.9`), in canonical `MAJOR.MINOR.PATCH[-prerelease][+build]` form. `null` when the task has no target.", 2394 ) 2395 team: str | None = Field( 2396 default=None, 2397 description="ID of the team that owns this task (`tem_...`). `null` if the task is not scoped to a team.", 2398 ) 2399 thread: str | None = Field( 2400 default=None, 2401 description="ID of the thread this task is bound to (`thr_...`) - the conversation it was filed from, or the thread passed at creation. `null` for tasks not tied to a thread.", 2402 ) 2403 updated_at: datetime | None = Field( 2404 default=None, description="When the task was last modified (ISO 8601)." 2405 ) 2406 user: str | None = Field( 2407 default=None, 2408 description="ID of the user that owns this task (`usr_...`). `null` if the task is scoped to a team.", 2409 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the agent that owns this task (agi_...). null if the task is scoped to a team or user.
Event-stream version for optimistic update fencing. Pass this value as expected_version on an update to reject concurrent writes.
Number of readable tasks marked as blocking this task, whether or not they are done (see GET /tasks/{task}/blockers). Computed on list/show reads; create/update responses may lag one read behind.
When the task was marked as done or otherwise closed (ISO 8601). null if the task is still open.
ID of the agent that created this task (agi_...). null if the task was created by a human user, or if the creating agent was later deleted.
ID of the user who created this task (usr_...). null if the task was created by an agent, or if creator provenance was cleared after the creator was deleted.
Viewer-safe live coding-session lease summary. null when the task is unleased or the projected lease has expired. Fencing identifiers are never included.
Long-form description or notes for the task. null if no description has been provided.
Date and time by which the task should be completed (ISO 8601). null if no due date is set.
true while at least one blocking task is not yet done. Informational only - a blocked task can still change status - and derived at read time, so the task un-blocks automatically when its last open blocker completes. Computed on reads, including mutation responses.
True exactly when status is in_progress and the task has no lease or its lease expiry is in the past. Derived at read time from status and lease expiry, including on unannotated reads.
Key-value map of named URLs or references associated with the task. Returns an empty object when no links have been set.
Arbitrary key-value map of application-specific data stored alongside the task. Returns an empty object when no metadata has been set.
ID of the organization this task belongs to (org_...). null for tasks outside an org context.
ID of the agent assigned as owner (agi_...). null if the owner is a human user, the task is unassigned, or the assigned agent was deleted.
ID of the user assigned as owner (usr_...). null if the owner is an agent, the task is unassigned, or the assigned agent was deleted.
ID of the parent task when this task is a subtask (tsk_...). null for top-level tasks or when the parent is not readable. Subtasks nest exactly one level.
Priority level of the task from 0 (highest) to 4 (lowest). Defaults to 2 (medium) when not explicitly set.
Optional project ID (prj_...). Membership does not change task visibility.
ID of the developer sandbox this task is scoped to (dsb_...). null for tasks outside a sandbox environment.
Source object identity (for example ArchAstro/firstlanding). null when the task has no source.
Container of the work this task is about (for example github.com). null when the task has no source. Set together with source_type and source_id.
Kind of source object (for example repository). null when the task has no source.
Lease expiry for a stalled task, or its last update when no lease expiry exists. Null when not stalled.
Current status of the task. One of "open", "in_progress", "in_review", "paused", "failed", "superseding", "done", or "cancelled".
Number of readable subtasks under this task. Computed on list/show reads; create/update responses may report 0 until the next read. Always 0 for subtasks.
Binary that must run this work (for example my-cli). A worker should take the task only when its own target_binary build is at least target_version. null when the task has no target. Set together with target_version.
Minimum semantic version of target_binary that can run this work (for example 0.48.9), in canonical MAJOR.MINOR.PATCH[-prerelease][+build] form. null when the task has no target.
ID of the team that owns this task (tem_...). null if the task is not scoped to a team.
2412class TeamTaskSearchResponse(BaseModel): 2413 """ 2414 Successful response 2415 """ 2416 2417 after_cursor: str | None = None 2418 before_cursor: str | None = None 2419 data: list[TeamTaskSearchResponseDataItem] = Field( 2420 ..., description="Array of task objects matching the query and filters." 2421 ) 2422 has_more: bool 2423 query: str
Successful response
2426class TeamThreadListResponseDataItemParentMessageAclAddItem(BaseModel): 2427 actions: list[str] = Field( 2428 ..., 2429 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2430 ) 2431 principal: str | None = Field( 2432 default=None, 2433 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2434 ) 2435 principal_type: str = Field( 2436 ..., 2437 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2438 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
2441class TeamThreadListResponseDataItemParentMessageAclGrantsItem(BaseModel): 2442 actions: list[str] = Field( 2443 ..., 2444 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2445 ) 2446 principal: str | None = Field( 2447 default=None, 2448 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2449 ) 2450 principal_type: str = Field( 2451 ..., 2452 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2453 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
2456class TeamThreadListResponseDataItemParentMessageAclRemoveItem(BaseModel): 2457 principal: str | None = Field( 2458 default=None, 2459 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 2460 ) 2461 principal_type: str = Field( 2462 ..., 2463 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2464 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
2467class TeamThreadListResponseDataItemParentMessageAcl(BaseModel): 2468 add: list[TeamThreadListResponseDataItemParentMessageAclAddItem] | None = Field( 2469 default=None, 2470 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 2471 ) 2472 grants: list[TeamThreadListResponseDataItemParentMessageAclGrantsItem] | None = Field( 2473 default=None, 2474 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 2475 ) 2476 remove: list[TeamThreadListResponseDataItemParentMessageAclRemoveItem] | None = Field( 2477 default=None, 2478 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 2479 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
2482class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(BaseModel): 2483 file: str | None = Field( 2484 default=None, 2485 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2486 ) 2487 height: int | None = Field( 2488 default=None, description="Height of the image in pixels. `null` if not known." 2489 ) 2490 media: str | None = Field( 2491 default=None, 2492 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2493 ) 2494 mime_type: str | None = Field( 2495 default=None, 2496 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2497 ) 2498 refresh_url: str | None = Field( 2499 default=None, 2500 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2501 ) 2502 url: str | None = Field( 2503 default=None, 2504 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2505 ) 2506 width: int | None = Field( 2507 default=None, description="Width of the image in pixels. `null` if not known." 2508 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
2511class TeamThreadListResponseDataItemParentMessageActorsItem(BaseModel): 2512 alias: str | None = Field( 2513 default=None, 2514 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 2515 ) 2516 id: str | None = Field( 2517 default=None, 2518 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 2519 ) 2520 name: str | None = Field( 2521 default=None, 2522 description="Display name of the actor shown in the UI. `null` if no name is set.", 2523 ) 2524 profile_picture: TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture | None = ( 2525 Field( 2526 default=None, 2527 description="Profile picture for the actor. `null` if the actor has no profile picture.", 2528 ) 2529 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
2532class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(BaseModel): 2533 file: str | None = Field( 2534 default=None, 2535 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2536 ) 2537 height: int | None = Field( 2538 default=None, description="Height of the image in pixels. `null` if not known." 2539 ) 2540 media: str | None = Field( 2541 default=None, 2542 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2543 ) 2544 mime_type: str | None = Field( 2545 default=None, 2546 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2547 ) 2548 refresh_url: str | None = Field( 2549 default=None, 2550 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2551 ) 2552 url: str | None = Field( 2553 default=None, 2554 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2555 ) 2556 width: int | None = Field( 2557 default=None, description="Width of the image in pixels. `null` if not known." 2558 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
2561class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(BaseModel): 2562 file: str | None = Field( 2563 default=None, 2564 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 2565 ) 2566 height: int | None = Field( 2567 default=None, description="Height of the image in pixels. `null` if not known." 2568 ) 2569 media: str | None = Field( 2570 default=None, 2571 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 2572 ) 2573 mime_type: str | None = Field( 2574 default=None, 2575 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 2576 ) 2577 refresh_url: str | None = Field( 2578 default=None, 2579 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 2580 ) 2581 url: str | None = Field( 2582 default=None, 2583 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 2584 ) 2585 width: int | None = Field( 2586 default=None, description="Width of the image in pixels. `null` if not known." 2587 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
2590class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(BaseModel): 2591 byte_size: int | None = Field(default=None, description="Size of the stored bytes.") 2592 content_type: str | None = Field( 2593 default=None, 2594 description='MIME type of this variant\'s file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded.', 2595 ) 2596 created_at: datetime | None = Field( 2597 default=None, description="When this variant was created (ISO 8601)." 2598 ) 2599 duration_ms: int | None = Field( 2600 default=None, 2601 description="Client-declared video duration in milliseconds; not server-probed.", 2602 ) 2603 file: str | None = Field( 2604 default=None, 2605 description="ID of the underlying storage file that backs this variant (`fil_...`).", 2606 ) 2607 filename: str | None = Field( 2608 default=None, 2609 description="Original filename of the uploaded file for this variant. `null` if the file is not loaded.", 2610 ) 2611 height: int | None = Field( 2612 default=None, description="Height of this variant in pixels. `null` if not recorded." 2613 ) 2614 id: str = Field(..., description="Media variant ID (`mvr_...`).") 2615 image_source: ( 2616 TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource | None 2617 ) = Field( 2618 default=None, 2619 description="Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types.", 2620 ) 2621 sha256: str | None = Field(default=None, description="Lowercase SHA-256 of the stored bytes.") 2622 updated_at: datetime | None = Field( 2623 default=None, description="When this variant was last updated (ISO 8601)." 2624 ) 2625 url: str | None = Field( 2626 default=None, 2627 description="Signed download URL for this variant, resolved at request time. `null` if the file is unavailable.", 2628 ) 2629 url_expires_at: datetime | None = Field( 2630 default=None, description="Expiry of this variant's playable URL." 2631 ) 2632 variant_key: str | None = Field( 2633 default=None, 2634 description='Identifier for this variant\'s processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview).', 2635 ) 2636 width: int | None = Field( 2637 default=None, description="Width of this variant in pixels. `null` if not recorded." 2638 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
MIME type of this variant's file (e.g., "image/jpeg", "video/mp4"). null if the file is not loaded.
Original filename of the uploaded file for this variant. null if the file is not loaded.
Resolved image delivery metadata for this variant, including dimensions and CDN URL. null for non-image content types.
Signed download URL for this variant, resolved at request time. null if the file is unavailable.
2641class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): 2642 content_type: str | None = Field( 2643 default=None, 2644 description='MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 2645 ) 2646 description: str | None = Field( 2647 default=None, 2648 description="Short description. The page meta-description for `scraped_link`, the artifact description for `artifact`, and the task description for `task` types. `null` on other types.", 2649 ) 2650 filename: str | None = Field( 2651 default=None, 2652 description='Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 2653 ) 2654 height: int | None = Field( 2655 default=None, 2656 description="Height in pixels of the media item. Present on `media` type only. `null` otherwise.", 2657 ) 2658 id: str = Field(..., description="Unique identifier for this attachment within the message.") 2659 image_height: int | None = Field( 2660 default=None, 2661 description="Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 2662 ) 2663 image_source: TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource | None = ( 2664 Field( 2665 default=None, 2666 description="Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise.", 2667 ) 2668 ) 2669 image_url: str | None = Field( 2670 default=None, 2671 description="URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise.", 2672 ) 2673 image_width: int | None = Field( 2674 default=None, 2675 description="Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 2676 ) 2677 key: str | None = Field( 2678 default=None, 2679 description='For `structured_data` type, what the data is about as set by the sender (for example `"pr:14963"`), copied from the record so it can be read without `object`. Not unique. `null` when unset and on other types.', 2680 ) 2681 media_type: str | None = Field( 2682 default=None, 2683 description='The media category, e.g. `"video"` or `"audio"`. Present on `media` type only; omitted otherwise.', 2684 ) 2685 name: str | None = Field( 2686 default=None, 2687 description="Display name of the media item. Present on `media` type only. `null` otherwise.", 2688 ) 2689 object: dict[str, Any] | None = Field( 2690 default=None, 2691 description="The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. For `chart` type, contains the chart with its inline `spec`. For `structured_data` type, contains the inline `data` and the `schema_url` or `schema_config` naming its JSON Schema. Omitted on other types.", 2692 ) 2693 title: str | None = Field( 2694 default=None, 2695 description="Display title. The page title for `scraped_link`, the artifact name for `artifact`, and the task title for `task` types. `null` on other types.", 2696 ) 2697 type: str = Field( 2698 ..., 2699 description='The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, `"action"`, `"chart"`, or `"structured_data"`. Determines which additional fields are present.', 2700 ) 2701 url: str | None = Field( 2702 default=None, 2703 description="URL to access the resource. A signed download URL for `file` and `artifact` types; the original URL for `scraped_link`; a media playback URL for `media`. `null` on `task` and `action` types.", 2704 ) 2705 variants: ( 2706 list[TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem] | None 2707 ) = Field( 2708 default=None, 2709 description="Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only; omitted otherwise.", 2710 ) 2711 version: int | None = Field( 2712 default=None, 2713 description="Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise.", 2714 ) 2715 width: int | None = Field( 2716 default=None, 2717 description="Width in pixels of the media item. Present on `media` type only. `null` otherwise.", 2718 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
MIME type of the attached file, e.g. "image/png" or "application/pdf". Present on file, artifact, and media types. null otherwise.
Short description. The page meta-description for scraped_link, the artifact description for artifact, and the task description for task types. null on other types.
Original filename of the attached file, e.g. "report.pdf". Present on file, artifact, and media types. null otherwise.
Height in pixels of the media item. Present on media type only. null otherwise.
Height in pixels of the scraped preview image. Present on scraped_link type only. null otherwise.
Image source metadata for inline rendering. Present on file, scraped_link, artifact, and media types when the content is an image. null otherwise.
URL of the preview image extracted from the scraped page. Present on scraped_link type only. null otherwise.
Width in pixels of the scraped preview image. Present on scraped_link type only. null otherwise.
For structured_data type, what the data is about as set by the sender (for example "pr:14963"), copied from the record so it can be read without object. Not unique. null when unset and on other types.
The media category, e.g. "video" or "audio". Present on media type only; omitted otherwise.
The full embedded object payload. For task type, contains the task record. For action type, contains the action definition. For chart type, contains the chart with its inline spec. For structured_data type, contains the inline data and the schema_url or schema_config naming its JSON Schema. Omitted on other types.
Display title. The page title for scraped_link, the artifact name for artifact, and the task title for task types. null on other types.
The attachment type. One of "file", "scraped_link", "artifact", "task", "media", "action", "chart", or "structured_data". Determines which additional fields are present.
URL to access the resource. A signed download URL for file and artifact types; the original URL for scraped_link; a media playback URL for media. null on task and action types.
Array of available encoding variants for the media item (e.g. different resolutions). Present on media type only; omitted otherwise.
2721class TeamThreadListResponseDataItemParentMessageContextItem(BaseModel): 2722 attributes: dict[str, Any] | None = Field( 2723 default=None, 2724 description="Scalar key-value fields describing the context, such as route, repository, or pull-request number.", 2725 ) 2726 content: str | None = Field( 2727 default=None, 2728 description="Optional context body. The model receives it as escaped XML data, not a system instruction.", 2729 ) 2730 title: str | None = Field( 2731 default=None, description="Optional human-readable label for this context block." 2732 ) 2733 type: str = Field( 2734 ..., 2735 description="Stable context kind. Must start with a lowercase letter and contain only lowercase letters, numbers, dots, dashes, or underscores.", 2736 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Scalar key-value fields describing the context, such as route, repository, or pull-request number.
2739class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel): 2740 payload: dict[str, Any] | None = Field( 2741 default=None, 2742 description='Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `" "`).', 2743 ) 2744 type: str = Field( 2745 ..., 2746 description='Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions.', 2747 ) 2748 user: str | None = Field( 2749 default=None, description="Public ID of the user who added the reaction (`usr_...`)." 2750 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Type-specific reaction data. For "emoji_reaction" reactions, contains an emoji key with the Unicode emoji string (e.g., " ").
2753class TeamThreadListResponseDataItemParentMessage(BaseModel): 2754 acl: TeamThreadListResponseDataItemParentMessageAcl | None = Field( 2755 default=None, 2756 description="Access control list for private messages (grants with `read` action). Only returned to resource owners (and privileged/org-admin viewers) via server-side `field_redactions: [acl: :owner]`; `null` for everyone else.", 2757 ) 2758 actors: list[TeamThreadListResponseDataItemParentMessageActorsItem] | None = Field( 2759 default=None, 2760 description="Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.", 2761 ) 2762 agent: str | None = Field( 2763 default=None, 2764 description="ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users.", 2765 ) 2766 agent_mode: Literal["cli", "embedded"] | None = Field( 2767 default=None, 2768 description="Local agent execution mode for this message. One of `cli`, `embedded`, or `null` when the message was not created by a local agent execution path.", 2769 ) 2770 attachments: list[TeamThreadListResponseDataItemParentMessageAttachmentsItem] | None = Field( 2771 default=None, 2772 description="Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.", 2773 ) 2774 branched_thread: str | None = Field( 2775 default=None, 2776 description="ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread.", 2777 ) 2778 content: str | None = Field( 2779 default=None, 2780 description="Text content of the message. `null` for messages that contain only attachments.", 2781 ) 2782 context: list[TeamThreadListResponseDataItemParentMessageContextItem] | None = Field( 2783 default=None, 2784 description="Immutable structured context captured when the message was posted. Each entry has `type`, optional `title` and `content`, and scalar `attributes`. Always present; defaults to an empty array. Context is delivered to agents as escaped XML data, not as system instructions.", 2785 ) 2786 created_at: str | None = Field( 2787 default=None, description="When the message was posted (ISO 8601)." 2788 ) 2789 has_replies: bool | None = Field( 2790 default=None, 2791 description="Whether this message has at least one reply. Only present when explicitly requested or computed by the server.", 2792 ) 2793 id: str = Field(..., description="Message ID (`msg_...`).") 2794 idempotency_key: str | None = Field( 2795 default=None, 2796 description="Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one.", 2797 ) 2798 is_deleted: bool | None = Field( 2799 default=None, 2800 description="Whether this message is a deletion tombstone. `true` only on the `message_updated` broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always `false` for live messages.", 2801 ) 2802 legacy_agent: str | None = Field( 2803 default=None, 2804 description="Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users.", 2805 ) 2806 metadata: dict[str, Any] | None = Field( 2807 default=None, 2808 description="Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.", 2809 ) 2810 org: str | None = Field( 2811 default=None, description="ID of the organization that owns this message (`org_...`)." 2812 ) 2813 reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = Field( 2814 default=None, 2815 description="Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.", 2816 ) 2817 rendering_mode: str | None = Field( 2818 default=None, 2819 description='Display hint for how the message should be rendered. One of `"reply"`, `"direct"`, or `"inline"`. `null` for user-authored messages, which are always rendered as standard replies.', 2820 ) 2821 replies: list[dict[str, Any]] | None = Field( 2822 default=None, 2823 description="Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.", 2824 ) 2825 replies_after_cursor: str | None = Field( 2826 default=None, 2827 description="Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.", 2828 ) 2829 replies_before_cursor: str | None = Field( 2830 default=None, 2831 description="Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.", 2832 ) 2833 reply_count: int | None = Field( 2834 default=None, 2835 description="Total number of direct replies to this message. Only present when explicitly requested or computed by the server.", 2836 ) 2837 reply_to: dict[str, Any] | None = Field( 2838 default=None, 2839 description="The parent message this message is a reply to, expanded as a full message object when loaded. `null` if this is a top-level message or the association is not preloaded.", 2840 ) 2841 root_message_id: str | None = Field( 2842 default=None, 2843 description="ID of the root message in this reply chain (`msg_...`). `null` for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.", 2844 ) 2845 sandbox: str | None = Field( 2846 default=None, 2847 description="ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages.", 2848 ) 2849 team: str | None = Field( 2850 default=None, 2851 description="ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped.", 2852 ) 2853 thread: str | None = Field( 2854 default=None, description="ID of the thread this message belongs to (`thr_...`)." 2855 ) 2856 type: str | None = Field( 2857 default=None, 2858 description="Optional client-defined classification for the message (for example `note` or `status`). Free-form string up to 64 characters. The value `system` is reserved for platform-authored messages and cannot be set by clients. `null` when unset.", 2859 ) 2860 user: str | dict[str, Any] | None = Field( 2861 default=None, 2862 description="The human user who sent this message. Returns a public ID string (`usr_...`) when the association is not preloaded, or an expanded user object when it is. `null` for messages sent by agents.", 2863 ) 2864 visibility: Literal["default", "private"] | None = Field( 2865 default=None, 2866 description="Message-level visibility. `default` is visible to anyone who can see the parent thread. `private` is restricted to the sender and explicit ACL `read` grantees.", 2867 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Access control list for private messages (grants with read action). Only returned to resource owners (and privileged/org-admin viewers) via server-side field_redactions: [acl: :owner]; null for everyone else.
Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.
ID of the agent user that sent this message (agi_...). null for messages sent by human users.
Local agent execution mode for this message. One of cli, embedded, or null when the message was not created by a local agent execution path.
Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.
ID of the thread that was branched from this message (thr_...). null if this message has not spawned a branch thread.
Text content of the message. null for messages that contain only attachments.
Whether this message has at least one reply. Only present when explicitly requested or computed by the server.
Client-supplied idempotency key used to deduplicate message sends. null if the sender did not provide one.
Whether this message is a deletion tombstone. true only on the message_updated broadcast emitted when a message is deleted: the original content is replaced with a placeholder and the message no longer exists on the server. Always false for live messages.
Identifier of the legacy chat agent that sent this message, if applicable. null for messages sent by users or modern agent users.
Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.
Emoji and other reactions added to this message by users. Empty array if no reactions have been added or the association is not preloaded.
Display hint for how the message should be rendered. One of "reply", "direct", or "inline". null for user-authored messages, which are always rendered as standard replies.
Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.
Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.
Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.
Total number of direct replies to this message. Only present when explicitly requested or computed by the server.
The parent message this message is a reply to, expanded as a full message object when loaded. null if this is a top-level message or the association is not preloaded.
ID of the root message in this reply chain (msg_...). null for a top-level message. The value is persisted when the reply is created, so callers can correlate a multi-turn session without walking parent messages.
ID of the developer sandbox this message belongs to (dsb_...). null for non-sandbox messages.
ID of the team this message is scoped to (tem_...). null if the message is not team-scoped.
Optional client-defined classification for the message (for example note or status). Free-form string up to 64 characters. The value system is reserved for platform-authored messages and cannot be set by clients. null when unset.
2870class TeamThreadListResponseDataItemParticipantsItem(BaseModel): 2871 alias: str | None = Field( 2872 default=None, description="Short handle or alias for the user. `null` if not set." 2873 ) 2874 app: str | None = Field( 2875 default=None, 2876 description="ID of the app this user (and their access token) is scoped to (`dap_...`). `null` if the user is not scoped to an app.", 2877 ) 2878 app_name: str | None = Field( 2879 default=None, 2880 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 2881 ) 2882 created_by_agent_user: str | None = Field( 2883 default=None, 2884 description="Agent user that created this account (`usr_...`). `null` unless an agent created it.", 2885 ) 2886 created_by_developer: str | None = Field( 2887 default=None, 2888 description="Developer account that created this user (`dva_...`). `null` unless created via a developer token.", 2889 ) 2890 created_by_org: str | None = Field( 2891 default=None, 2892 description="Org of the principal that created this user (`org_...`). `null` on legacy rows.", 2893 ) 2894 created_by_team: str | None = Field( 2895 default=None, 2896 description="Team that created this user (`tem_...`). `null` unless created as a team.", 2897 ) 2898 created_by_user: str | None = Field( 2899 default=None, 2900 description="User who created this account (`usr_...`). `null` on self-signup or legacy rows.", 2901 ) 2902 email: str | None = Field(default=None, description="Email address of the user.") 2903 id: str = Field(..., description="User ID (`usr_...`).") 2904 is_system_user: bool | None = Field( 2905 default=None, 2906 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 2907 ) 2908 metadata: dict[str, Any] | None = Field( 2909 default=None, 2910 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 2911 ) 2912 name: str | None = Field( 2913 default=None, 2914 description="Full display name of the user. `null` if the user has not set a name.", 2915 ) 2916 org: str | None = Field( 2917 default=None, 2918 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 2919 ) 2920 org_name: str | None = Field( 2921 default=None, 2922 description="Display name of the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 2923 ) 2924 org_role: str | None = Field( 2925 default=None, 2926 description='Role of the user within their organization. One of `"admin"`, `"member"`, or `"viewer"`. `null` when the user is not a member of any organization.', 2927 ) 2928 org_slug: str | None = Field( 2929 default=None, 2930 description="Stable workspace slug for the user's organization. `null` when the user is not in an org, or when the org association was not preloaded by the caller.", 2931 ) 2932 sandbox: str | None = Field( 2933 default=None, 2934 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 2935 ) 2936 sandbox_name: str | None = Field( 2937 default=None, 2938 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 2939 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the app this user (and their access token) is scoped to (dap_...). null if the user is not scoped to an app.
Display name of the user's app. null when the app association was not preloaded by the caller.
Agent user that created this account (usr_...). null unless an agent created it.
Developer account that created this user (dva_...). null unless created via a developer token.
Org of the principal that created this user (org_...). null on legacy rows.
Team that created this user (tem_...). null unless created as a team.
User who created this account (usr_...). null on self-signup or legacy rows.
true if this account is an internal system user rather than a human. System users are created automatically by the platform.
Arbitrary key-value metadata attached to the user. Defaults to an empty object.
ID of the organization this user belongs to (org_...). null if the user is not a member of any organization.
Display name of the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.
Role of the user within their organization. One of "admin", "member", or "viewer". null when the user is not a member of any organization.
Stable workspace slug for the user's organization. null when the user is not in an org, or when the org association was not preloaded by the caller.
2942class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(BaseModel): 2943 actions: list[str] = Field( 2944 ..., 2945 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2946 ) 2947 principal: str | None = Field( 2948 default=None, 2949 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2950 ) 2951 principal_type: str = Field( 2952 ..., 2953 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2954 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
2957class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(BaseModel): 2958 actions: list[str] = Field( 2959 ..., 2960 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 2961 ) 2962 principal: str | None = Field( 2963 default=None, 2964 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 2965 ) 2966 principal_type: str = Field( 2967 ..., 2968 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2969 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
2972class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(BaseModel): 2973 principal: str | None = Field( 2974 default=None, 2975 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 2976 ) 2977 principal_type: str = Field( 2978 ..., 2979 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 2980 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
2983class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(BaseModel): 2984 add: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem] | None = Field( 2985 default=None, 2986 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 2987 ) 2988 grants: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem] | None = Field( 2989 default=None, 2990 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 2991 ) 2992 remove: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem] | None = Field( 2993 default=None, 2994 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 2995 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
2998class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo( 2999 BaseModel 3000): 3001 file: str | None = Field( 3002 default=None, 3003 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 3004 ) 3005 height: int | None = Field( 3006 default=None, description="Height of the image in pixels. `null` if not known." 3007 ) 3008 media: str | None = Field( 3009 default=None, 3010 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 3011 ) 3012 mime_type: str | None = Field( 3013 default=None, 3014 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 3015 ) 3016 refresh_url: str | None = Field( 3017 default=None, 3018 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 3019 ) 3020 url: str | None = Field( 3021 default=None, 3022 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 3023 ) 3024 width: int | None = Field( 3025 default=None, description="Width of the image in pixels. `null` if not known." 3026 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
3029class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 3030 BaseModel 3031): 3032 description: str | None = Field( 3033 default=None, 3034 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 3035 ) 3036 name: str = Field( 3037 ..., 3038 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 3039 ) 3040 required: bool = Field( 3041 ..., 3042 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 3043 ) 3044 type: str = Field( 3045 ..., 3046 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 3047 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Workflow-authored explanation of the slot's role. null when the workflow declares none.
The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.
3050class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills( 3051 BaseModel 3052): 3053 participants: dict[str, Any] | None = Field( 3054 default=None, 3055 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 3056 ) 3057 payload: dict[str, Any] | None = Field( 3058 default=None, 3059 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 3060 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
3063class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract( 3064 BaseModel 3065): 3066 input_schema: dict[str, Any] | None = Field( 3067 default=None, 3068 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 3069 ) 3070 participants: ( 3071 list[ 3072 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractParticipantsItem 3073 ] 3074 | None 3075 ) = Field( 3076 default=None, 3077 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 3078 ) 3079 prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 3080 ..., 3081 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 3082 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.
Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.
Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.
3085class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails( 3086 BaseModel 3087): 3088 automation_type: str | None = Field( 3089 default=None, 3090 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 3091 ) 3092 invoke_contract: ( 3093 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetailsInvokeContract 3094 | None 3095 ) = Field( 3096 default=None, 3097 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 3098 ) 3099 type: Literal["automation"] = Field( 3100 default="automation", 3101 description="Template-details discriminator. Always `automation` for this variant.", 3102 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.
Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.
3105class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem( 3106 BaseModel 3107): 3108 description: str | None = Field( 3109 default=None, 3110 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 3111 ) 3112 details: ( 3113 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItemDetails 3114 | None 3115 ) = Field( 3116 default=None, 3117 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 3118 ) 3119 display_name: str | None = Field( 3120 default=None, 3121 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 3122 ) 3123 id: str | None = Field( 3124 default=None, 3125 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 3126 ) 3127 kind: str = Field( 3128 ..., 3129 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 3130 ) 3131 lookup_key: str | None = Field( 3132 default=None, 3133 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 3134 ) 3135 name: str | None = Field( 3136 default=None, 3137 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 3138 ) 3139 readme_url: str | None = Field( 3140 default=None, 3141 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3142 ) 3143 virtual_path: str | None = Field( 3144 default=None, 3145 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 3146 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.
Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.
Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.
Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.
Lookup key stamped on the template config at import time. null when no lookup key was assigned.
Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.
Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
3149class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution(BaseModel): 3150 category_keys: list[str] | None = Field( 3151 default=None, 3152 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 3153 ) 3154 created_at: str | None = Field( 3155 default=None, description="When the Solution config was first imported (ISO 8601)." 3156 ) 3157 description: str | None = Field( 3158 default=None, 3159 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 3160 ) 3161 events: dict[str, Any] | None = Field( 3162 default=None, 3163 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 3164 ) 3165 id: str = Field(..., description="Solution config ID (`cfg_...`).") 3166 image_url: str | None = Field( 3167 default=None, 3168 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 3169 ) 3170 installed_config_ids: list[str] = Field( 3171 ..., 3172 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 3173 ) 3174 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 3175 latest_solution: str | None = Field( 3176 default=None, 3177 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 3178 ) 3179 latest_version: str | None = Field( 3180 default=None, 3181 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 3182 ) 3183 lookup_key: str | None = Field( 3184 default=None, 3185 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 3186 ) 3187 metadata: dict[str, Any] | None = Field( 3188 default=None, 3189 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 3190 ) 3191 name: str | None = Field( 3192 default=None, 3193 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 3194 ) 3195 org: str | None = Field( 3196 default=None, 3197 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 3198 ) 3199 org_logo: ( 3200 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionOrgLogo 3201 | None 3202 ) = Field( 3203 default=None, 3204 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 3205 ) 3206 org_name: str | None = Field( 3207 default=None, 3208 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 3209 ) 3210 org_slug: str | None = Field( 3211 default=None, 3212 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 3213 ) 3214 owners: list[str] = Field( 3215 ..., 3216 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 3217 ) 3218 readme_url: str | None = Field( 3219 default=None, 3220 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3221 ) 3222 screenshot_urls: list[str] | None = Field( 3223 default=None, 3224 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 3225 ) 3226 solution_id: str | None = Field( 3227 default=None, 3228 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 3229 ) 3230 solution_version: str | None = Field( 3231 default=None, 3232 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 3233 ) 3234 tag_keys: list[str] | None = Field( 3235 default=None, 3236 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 3237 ) 3238 template_kind: str | None = Field( 3239 default=None, 3240 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 3241 ) 3242 templates: list[ 3243 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolutionTemplatesItem 3244 ] = Field( 3245 ..., 3246 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 3247 ) 3248 updated_at: str | None = Field( 3249 default=None, description="When the Solution config was last modified (ISO 8601)." 3250 ) 3251 upgrade_available: bool = Field( 3252 ..., 3253 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 3254 ) 3255 virtual_path: str | None = Field( 3256 default=None, 3257 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 3258 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.
Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.
Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.
Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image. Org-only rows remain null; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.
Config IDs (cfg_...) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.
When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.
When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.
The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.
Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.
Human-facing display name declared in the Solution body. null when the Solution body does not set one.
Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.
Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.
Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).
Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.
Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.
Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.
Freeform tag keys declared in the Solution body. An empty array when the body declares none.
Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.
Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.
true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.
3261class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo(BaseModel): 3262 file: str | None = Field( 3263 default=None, 3264 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 3265 ) 3266 height: int | None = Field( 3267 default=None, description="Height of the image in pixels. `null` if not known." 3268 ) 3269 media: str | None = Field( 3270 default=None, 3271 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 3272 ) 3273 mime_type: str | None = Field( 3274 default=None, 3275 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 3276 ) 3277 refresh_url: str | None = Field( 3278 default=None, 3279 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 3280 ) 3281 url: str | None = Field( 3282 default=None, 3283 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 3284 ) 3285 width: int | None = Field( 3286 default=None, description="Width of the image in pixels. `null` if not known." 3287 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
3290class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem( 3291 BaseModel 3292): 3293 description: str | None = Field( 3294 default=None, 3295 description="Workflow-authored explanation of the slot's role. `null` when the workflow declares none.", 3296 ) 3297 name: str = Field( 3298 ..., 3299 description="The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level `participants[name]` field when invoking.", 3300 ) 3301 required: bool = Field( 3302 ..., 3303 description="Whether the workflow requires this slot to be filled for the run to complete its embedded stages.", 3304 ) 3305 type: str = Field( 3306 ..., 3307 description='The kind of principal the slot accepts. Currently always `"agent_user"` the value supplied at invoke is an agent ID (`agi_...`).', 3308 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Workflow-authored explanation of the slot's role. null when the workflow declares none.
The slot's name, as referenced by the workflow. Supply the chosen agent under the top-level participants[name] field when invoking.
3311class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills( 3312 BaseModel 3313): 3314 participants: dict[str, Any] | None = Field( 3315 default=None, 3316 description="Participant slot-to-agent mappings applied by the platform. Caller values at these slots must match exactly.", 3317 ) 3318 payload: dict[str, Any] | None = Field( 3319 default=None, 3320 description="Partial invocation payload applied by the platform. A caller may omit these values, but supplying a different value at any locked path is rejected.", 3321 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
3324class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract( 3325 BaseModel 3326): 3327 input_schema: dict[str, Any] | None = Field( 3328 default=None, 3329 description="JSON Schema validated against the whole invoke payload, from the automation's `input_schema_config`. `null` when none is configured.", 3330 ) 3331 participants: ( 3332 list[ 3333 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractParticipantsItem 3334 ] 3335 | None 3336 ) = Field( 3337 default=None, 3338 description="Named participant slots declared by the workflow, sorted by name. `null` when the workflow declares none. Values supplied under the top-level `participants` field are agent IDs.", 3339 ) 3340 prefills: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContractPrefills = Field( 3341 ..., 3342 description="Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.", 3343 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
JSON Schema validated against the whole invoke payload, from the automation's input_schema_config. null when none is configured.
Named participant slots declared by the workflow, sorted by name. null when the workflow declares none. Values supplied under the top-level participants field are agent IDs.
Owner-controlled payload and participant values the platform applies to every invocation. Supplying a conflicting value is rejected.
3346class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails( 3347 BaseModel 3348): 3349 automation_type: str | None = Field( 3350 default=None, 3351 description="Automation execution type (`invoked`, `scheduled`, or `trigger`). `null` when the template body does not declare one.", 3352 ) 3353 invoke_contract: ( 3354 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetailsInvokeContract 3355 | None 3356 ) = Field( 3357 default=None, 3358 description="Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. `null` for non-invoked automation types.", 3359 ) 3360 type: Literal["automation"] = Field( 3361 default="automation", 3362 description="Template-details discriminator. Always `automation` for this variant.", 3363 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Automation execution type (invoked, scheduled, or trigger). null when the template body does not declare one.
Schema-driven payload and participant inputs for an invoked automation. Used by installation clients to collect locked prefills before provisioning. null for non-invoked automation types.
3366class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem( 3367 BaseModel 3368): 3369 description: str | None = Field( 3370 default=None, 3371 description="Short prose blurb from the template body's `description:` field. `null` when the body doesn't set one. Used as the card subhead in the Library carousel.", 3372 ) 3373 details: ( 3374 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItemDetails 3375 | None 3376 ) = Field( 3377 default=None, 3378 description="Template-kind-specific details selected by the `type` discriminator. `null` when this template kind has no additional details.", 3379 ) 3380 display_name: str | None = Field( 3381 default=None, 3382 description="Human-facing label from the template body's `display_name:` field. `null` when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized `name`.", 3383 ) 3384 id: str | None = Field( 3385 default=None, 3386 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 3387 ) 3388 kind: str = Field( 3389 ..., 3390 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 3391 ) 3392 lookup_key: str | None = Field( 3393 default=None, 3394 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 3395 ) 3396 name: str | None = Field( 3397 default=None, 3398 description="Canonical name from the template body. For `AgentTemplate` this doubles as the human-facing label; for `AgentToolTemplate` it's the LLM-facing tool function identifier (snake_case); for `AgentRoutineTemplate` it's the routine identifier (kebab-case). Clients rendering carousels should prefer `display_name` and fall back to humanizing `name`.", 3399 ) 3400 readme_url: str | None = Field( 3401 default=None, 3402 description="Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. `null` when the Solution body's `templates[].readme_path` is unset for this entry. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3403 ) 3404 virtual_path: str | None = Field( 3405 default=None, 3406 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 3407 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short prose blurb from the template body's description: field. null when the body doesn't set one. Used as the card subhead in the Library carousel.
Template-kind-specific details selected by the type discriminator. null when this template kind has no additional details.
Human-facing label from the template body's display_name: field. null when the body doesn't set one. Library carousels use this for the card title, falling back to a humanized name.
Template config kind, or SolutionTemplateRef / SolutionTemplatePath when unresolved.
Lookup key stamped on the template config at import time. null when no lookup key was assigned.
Canonical name from the template body. For AgentTemplate this doubles as the human-facing label; for AgentToolTemplate it's the LLM-facing tool function identifier (snake_case); for AgentRoutineTemplate it's the routine identifier (kebab-case). Clients rendering carousels should prefer display_name and fall back to humanizing name.
Relative path to the public README endpoint with a signed token already embedded, scoped to this template's bundled markdown asset. null when the Solution body's templates[].readme_path is unset for this entry. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
3410class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(BaseModel): 3411 category_keys: list[str] | None = Field( 3412 default=None, 3413 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 3414 ) 3415 created_at: str | None = Field( 3416 default=None, description="When the Solution config was first imported (ISO 8601)." 3417 ) 3418 description: str | None = Field( 3419 default=None, 3420 description="Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. `null` when the Solution body does not set one.", 3421 ) 3422 events: dict[str, Any] | None = Field( 3423 default=None, 3424 description="Custom analytics events declared in the Solution body's `events:` manifest a map of event key (snake_case) to its definition (`label`, optional `description`, optional typed `fields`). Dashboards use the `label` as the event's display name. Present as an empty object when the body declares none.", 3425 ) 3426 id: str = Field(..., description="Solution config ID (`cfg_...`).") 3427 image_url: str | None = Field( 3428 default=None, 3429 description="Absolute URL of the Solution's cover image the bundled asset the body's `image:` field names. A stable, non-expiring capability URL (like `org_logo.url`), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. `null` when the Solution has no cover image. Org-only rows remain `null`; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.", 3430 ) 3431 installed_config_ids: list[str] = Field( 3432 ..., 3433 description="Config IDs (`cfg_...`) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.", 3434 ) 3435 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 3436 latest_solution: str | None = Field( 3437 default=None, 3438 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 3439 ) 3440 latest_version: str | None = Field( 3441 default=None, 3442 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 3443 ) 3444 lookup_key: str | None = Field( 3445 default=None, 3446 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 3447 ) 3448 metadata: dict[str, Any] | None = Field( 3449 default=None, 3450 description="Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.", 3451 ) 3452 name: str | None = Field( 3453 default=None, 3454 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 3455 ) 3456 org: str | None = Field( 3457 default=None, 3458 description="Organization ID (`org_...`) that owns this Solution config, when the Solution is scoped to a specific org. `null` for system-scope (app-level) Solutions.", 3459 ) 3460 org_logo: ( 3461 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo | None 3462 ) = Field( 3463 default=None, 3464 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. The `url` is a stable, non-expiring capability URL (`refresh_url` is `null` there is nothing to refresh). `null` when `org_slug` is `null` or the org has no logo.", 3465 ) 3466 org_name: str | None = Field( 3467 default=None, 3468 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 3469 ) 3470 org_slug: str | None = Field( 3471 default=None, 3472 description="Resolved slug of the Solution body's `org` (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of `category_keys`. `null` when the body has no `org` or it doesn't resolve.", 3473 ) 3474 owners: list[str] = Field( 3475 ..., 3476 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 3477 ) 3478 readme_url: str | None = Field( 3479 default=None, 3480 description="Relative path to the public README endpoint with a signed token already embedded. `null` when the Solution has no README. Token expires in 1 hour refresh via `GET /api/v1/solutions/:solution`.", 3481 ) 3482 screenshot_urls: list[str] | None = Field( 3483 default=None, 3484 description="Absolute URLs of the Solution's gallery screenshots the bundled assets the body's `screenshots:` field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as `image_url` (one shared token, a `v` cache key, and a `file` param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.", 3485 ) 3486 solution_id: str | None = Field( 3487 default=None, 3488 description="Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. `null` when the body omits it.", 3489 ) 3490 solution_version: str | None = Field( 3491 default=None, 3492 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 3493 ) 3494 tag_keys: list[str] | None = Field( 3495 default=None, 3496 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 3497 ) 3498 template_kind: str | None = Field( 3499 default=None, 3500 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 3501 ) 3502 templates: list[ 3503 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem 3504 ] = Field( 3505 ..., 3506 description="Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.", 3507 ) 3508 updated_at: str | None = Field( 3509 default=None, description="When the Solution config was last modified (ISO 8601)." 3510 ) 3511 upgrade_available: bool = Field( 3512 ..., 3513 description="`true` when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher `solution_version`. Always `false` for system-only rows.", 3514 ) 3515 virtual_path: str | None = Field( 3516 default=None, 3517 description="The stable virtual path assigned to this Solution config, used as the deduplication key when the same Solution appears under multiple owner scopes. `null` when unset.", 3518 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.
Short tagline or summary declared in the Solution body, used as the card subhead in catalog UIs. null when the Solution body does not set one.
Custom analytics events declared in the Solution body's events: manifest a map of event key (snake_case) to its definition (label, optional description, optional typed fields). Dashboards use the label as the event's display name. Present as an empty object when the body declares none.
Absolute URL of the Solution's cover image the bundled asset the body's image: field names. A stable, non-expiring capability URL (like org_logo.url), safe to hold in caches and OpenGraph tags; it 404s if the Solution stops declaring a cover. null when the Solution has no cover image. Org-only rows remain null; when a list entry merges an org copy with its system counterpart, it may reuse the system row's public cover URL. Permanent URLs are never minted for private org assets.
Config IDs (cfg_...) of this Solution's installations in the viewer's organization. The array is empty when the Solution is visible only from the system catalog.
When upgrade_available is true, the system-scope Solution config ID (cfg_...) that should be used as the upgrade source. null otherwise.
When upgrade_available is true, the higher system-scope solution_version available to upgrade to. null otherwise.
The lookup key stored on the Solution config, if one was assigned during import. null when no lookup key was set.
Arbitrary key-value metadata declared in the Solution body (e.g. category or display hints). Present as an empty object when the body declares none.
Human-facing display name declared in the Solution body. null when the Solution body does not set one.
Organization ID (org_...) that owns this Solution config, when the Solution is scoped to a specific org. null for system-scope (app-level) Solutions.
Resolved slug of the Solution body's org (the publishing organization), when set and it resolves to a real org visible to the viewer. When present this is the Solution's principal catalog category key clients group the Solution under this org ahead of category_keys. null when the body has no org or it doesn't resolve.
Owner scopes this Solution appears under. Members: "system" (app-level system scope) and/or "org" (viewer's org scope).
Relative path to the public README endpoint with a signed token already embedded. null when the Solution has no README. Token expires in 1 hour refresh via GET /api/v1/solutions/:solution.
Absolute URLs of the Solution's gallery screenshots the bundled assets the body's screenshots: field names, in declared order. Each is a stable, non-expiring capability URL with the same cacheability contract as image_url (one shared token, a v cache key, and a file param selecting the screenshot); a URL 404s if the Solution stops declaring its screenshot. An empty array when the Solution declares none, and always empty for org-scoped rows the permanent URLs are minted for system-scope (catalog) Solutions only.
Stable UUID declared in the Solution body, used to identify the same logical Solution across multiple installed copies and owner scopes. null when the body omits it.
Semver string declared in the Solution body (e.g. "1.2.0"). null when the body does not declare a version.
Freeform tag keys declared in the Solution body. An empty array when the body declares none.
Wrapped template kind "AgentTemplate", "AutomationTemplate", "AgentRoutineTemplate", "AgentToolTemplate", "AgentComputerTemplate", or "SolutionTemplateRef" for ref-mode bundles.
Template configs bundled by this Solution, in declaration order the first entry is the deployable template the Solution wraps; the rest are sibling templates the wrapped template references.
true when this Solution is installed at the viewer's org scope and the app-level system scope carries a higher solution_version. Always false for system-only rows.
3521class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(BaseModel): 3522 created_at: datetime | None = Field( 3523 default=None, description="When this template config was created (ISO 8601)." 3524 ) 3525 description: str | None = Field( 3526 default=None, 3527 description="Description of the template from the config body. `null` if the current version has no `description` field.", 3528 ) 3529 display_name: str | None = Field( 3530 default=None, 3531 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 3532 ) 3533 id: str = Field(..., description="Template config ID (`cfg_...`).") 3534 kind: str = Field( 3535 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 3536 ) 3537 lookup_key: str | None = Field( 3538 default=None, 3539 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 3540 ) 3541 name: str | None = Field( 3542 default=None, 3543 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 3544 ) 3545 updated_at: datetime | None = Field( 3546 default=None, description="When this template config was last modified (ISO 8601)." 3547 ) 3548 virtual_path: str | None = Field( 3549 default=None, 3550 description="Virtual filesystem path for this template config. `null` if not set.", 3551 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Description of the template from the config body. null if the current version has no description field.
Human-readable display name from the config body. null if the current version has no display_name field.
Config kind identifier for this template (e.g. "agent_tool_template").
Stable lookup key assigned to this template config. null if no lookup key is set.
Template name as stored in the config body. null if the current version has no name field.
3554class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(BaseModel): 3555 current_solution: ( 3556 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionCurrentSolution | None 3557 ) = Field( 3558 default=None, 3559 description="Summary of the current parent Solution config row. `solution` is the pinned Solution version the agent points at; `current_solution` is the source Solution config row as it exists now.", 3560 ) 3561 solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution = Field( 3562 ..., 3563 description="Summary of the parent Solution, including `upgrade_available`, `latest_version`, and `latest_solution` when a newer system-scoped version is available for the agent's org-scoped Solution.", 3564 ) 3565 template: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate = Field( 3566 ..., 3567 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 3568 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Summary of the current parent Solution config row. solution is the pinned Solution version the agent points at; current_solution is the source Solution config row as it exists now.
Summary of the parent Solution, including upgrade_available, latest_version, and latest_solution when a newer system-scoped version is available for the agent's org-scoped Solution.
Summary of the AgentTemplate config (cfg_...) the agent was last provisioned or updated from.
3571class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel): 3572 acl: TeamThreadListResponseDataItemParticipatingAgentsItemAcl | None = Field( 3573 default=None, 3574 description="Access control list for the agent. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions`. `null` when no ACL restrictions are applied and the agent is accessible to all members of its scope.", 3575 ) 3576 app: str | None = Field( 3577 default=None, description="ID of the application that owns this agent (`dap_...`)." 3578 ) 3579 created_at: str | None = Field( 3580 default=None, description="When the agent was created (ISO 8601)." 3581 ) 3582 default_model: str | None = Field( 3583 default=None, 3584 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 3585 ) 3586 description: str | None = Field( 3587 default=None, 3588 description="Human-readable description of what the agent does. `null` if not set.", 3589 ) 3590 email: str | None = Field( 3591 default=None, 3592 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 3593 ) 3594 id: str = Field(..., description="Agent ID (`agi_...`).") 3595 identity: str | None = Field( 3596 default=None, 3597 description="System-level identity prompt that shapes the agent's persona and behavior.", 3598 ) 3599 last_applied_template_config: str | None = Field( 3600 default=None, 3601 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 3602 ) 3603 lookup_key: str | None = Field( 3604 default=None, 3605 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 3606 ) 3607 metadata: dict[str, Any] | None = Field( 3608 default=None, 3609 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 3610 ) 3611 name: str | None = Field( 3612 default=None, description="Human-readable display name for the agent. `null` if not set." 3613 ) 3614 org: str | None = Field( 3615 default=None, 3616 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 3617 ) 3618 org_name: str | None = Field( 3619 default=None, 3620 description="Display name of the organization this agent belongs to. `null` when the agent is not org-scoped or when the org association was not preloaded.", 3621 ) 3622 originator: str | None = Field( 3623 default=None, 3624 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 3625 ) 3626 phone_number: str | None = Field( 3627 default=None, 3628 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 3629 ) 3630 sandbox: str | None = Field( 3631 default=None, 3632 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 3633 ) 3634 source_solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution | None = ( 3635 Field( 3636 default=None, 3637 description="Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes `upgrade_available`, `latest_version`, and `latest_solution` so you can render an upgrade badge without a separate dry-run call. `null` for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.", 3638 ) 3639 ) 3640 team: str | None = Field( 3641 default=None, 3642 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 3643 ) 3644 template_upgrade_available: bool | None = Field( 3645 default=None, 3646 description="True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from `source_solution.upgrade_available`, which compares Solution *versions*: an agent can lag its template (`template_upgrade_available: true`) while the org already holds the latest Solution version (`upgrade_available: false`).", 3647 ) 3648 updated_at: str | None = Field( 3649 default=None, description="When the agent was last modified (ISO 8601)." 3650 ) 3651 user: str | None = Field( 3652 default=None, 3653 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 3654 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Access control list for the agent. Contains a grants array where each entry specifies principal_type, principal, and actions. null when no ACL restrictions are applied and the agent is accessible to all members of its scope.
Default LLM model identifier used by this agent when no model is specified at runtime (e.g. "claude-3-7-sonnet-latest").
Email address provisioned for this agent. null if email delivery is not configured.
System-level identity prompt that shapes the agent's persona and behavior.
ID of the AgentTemplate config (cfg_...) this agent was last provisioned or updated from. null for manually created agents.
Stable, user-defined identifier for this agent within the application. Unique per app.
Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.
ID of the organization this agent belongs to (org_...). null if the agent is not org-scoped.
Display name of the organization this agent belongs to. null when the agent is not org-scoped or when the org association was not preloaded.
Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).
Phone number provisioned for this agent. null if SMS is not configured.
ID of the sandbox environment this agent is scoped to (dsb_...). null in production deployments.
Source Solution and AgentTemplate summary for agents provisioned from a Solution. Includes upgrade_available, latest_version, and latest_solution so you can render an upgrade badge without a separate dry-run call. null for hand-built agents and agents whose tracked template or parent Solution has been deleted. Populated only on single-agent GET responses, never on list endpoints.
ID of the team that owns this agent (tem_...). null if the agent is not team-scoped.
True when the agent's last-applied template version is behind the current version of its AgentTemplate config i.e. reapplying the template (a per-agent upgrade) would bring it newer Solution content. Self-clears once the agent is reapplied. Computed on both the list endpoints and single-agent GET. Distinct from source_solution.upgrade_available, which compares Solution versions: an agent can lag its template (template_upgrade_available: true) while the org already holds the latest Solution version (upgrade_available: false).
3657class TeamThreadListResponseDataItemSettings(BaseModel): 3658 agent_enabled: bool | None = Field( 3659 default=None, 3660 description="Whether the AI agent is active for this thread. `true` enables AI responses; `false` disables them. Defaults to `true` when settings have not been explicitly configured. `null` when a client explicitly cleared the setting.", 3661 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
3664class TeamThreadListResponseDataItem(BaseModel): 3665 agent_user: str | None = Field( 3666 default=None, 3667 description="ID of the agent that owns this thread (`agt_...`). `null` for user-owned or team-owned threads.", 3668 ) 3669 created_at: str | None = Field( 3670 default=None, description="When the thread was created (ISO 8601)." 3671 ) 3672 creator: str | dict[str, Any] | None = Field( 3673 default=None, 3674 description="User who created this thread. Returns a user ID (`usr_...`) by default, or an expanded user object when the association is loaded. `null` if the creator is unknown.", 3675 ) 3676 description: str | None = Field( 3677 default=None, 3678 description="Optional description or purpose statement for the thread. `null` if not set.", 3679 ) 3680 id: str = Field(..., description="Thread ID (`thr_...`).") 3681 is_channel: bool | None = Field( 3682 default=None, 3683 description="Whether this thread operates as a channel a multi-member broadcast-style conversation.", 3684 ) 3685 is_default: bool | None = Field( 3686 default=None, 3687 description="Whether this is the default thread for its owner. Each user or team has at most one default thread.", 3688 ) 3689 is_transient: bool | None = Field( 3690 default=None, 3691 description="Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.", 3692 ) 3693 is_unlisted: bool | None = Field( 3694 default=None, 3695 description="Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.", 3696 ) 3697 key: str | None = Field( 3698 default=None, 3699 description="Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. `null` if not set.", 3700 ) 3701 kind: str | None = Field( 3702 default=None, 3703 description='Thread subtype: `"standard"` for ordinary threads, `"personal"` for a user-and-owned-agents roster, `"feed"` for a post feed with inline replies, `"slack_mirror"` for the membership-strict mirror of a Slack channel, or `"slashwork_mirror"` for the membership-strict mirror of a Slashwork group. `personal` and `feed` are explicit creation options; mirror kinds are server-derived.', 3704 ) 3705 last_activity: str | None = Field( 3706 default=None, 3707 description="When the most recent message was posted in this thread, falling back to the thread's creation time if it has no messages. Always populated on thread list endpoints (which order by it, after default threads); `null` on endpoints that don't compute activity enrichment.", 3708 ) 3709 last_message_preview: str | None = Field( 3710 default=None, 3711 description="Single-line snippet of the most recent message's text content (first non-empty line, truncated to 140 characters). Populated on thread list endpoints alongside `last_activity`; `null` when the thread has no messages, the latest message has no text content (e.g. attachment-only), or the endpoint doesn't compute activity enrichment.", 3712 ) 3713 last_message_sender: str | None = Field( 3714 default=None, 3715 description="Display name of the sender of the most recent message the same message `last_message_preview` snippets. Populated on thread list endpoints; `null` when the thread has no messages or the endpoint doesn't compute activity enrichment.", 3716 ) 3717 metadata: dict[str, Any] | None = Field( 3718 default=None, 3719 description="Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set.", 3720 ) 3721 muted: bool | None = Field( 3722 default=None, 3723 description="Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery.", 3724 ) 3725 org: str | None = Field( 3726 default=None, 3727 description="ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context.", 3728 ) 3729 parent_message: TeamThreadListResponseDataItemParentMessage | None = Field( 3730 default=None, 3731 description="The message that spawned this thread as a sub-thread. `null` for top-level threads.", 3732 ) 3733 participant: list[str] | None = Field( 3734 default=None, 3735 description="Array of participant user IDs (`usr_...`) who are members of this thread.", 3736 ) 3737 participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = Field( 3738 default=None, 3739 description="Expanded participant user objects for each member of this thread. Populated only when the association is loaded.", 3740 ) 3741 participating_actor: list[str] | None = Field( 3742 default=None, 3743 description="Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.", 3744 ) 3745 participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = ( 3746 Field( 3747 default=None, 3748 description="Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.", 3749 ) 3750 ) 3751 role: str | None = Field( 3752 default=None, 3753 description='The authenticated user\'s membership role in this thread, e.g. `"owner"`, `"member"`, or `"viewer"`. `null` if the user is not a member.', 3754 ) 3755 sandbox: str | None = Field( 3756 default=None, 3757 description="ID of the developer sandbox this thread is scoped to (`dsb_...`). `null` for production threads.", 3758 ) 3759 settings: TeamThreadListResponseDataItemSettings | None = Field( 3760 default=None, 3761 description="Per-thread configuration settings controlling AI agent behavior for this thread.", 3762 ) 3763 slug: str | None = Field( 3764 default=None, 3765 description="URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned.", 3766 ) 3767 sub_threads: list[dict[str, Any]] | None = Field( 3768 default=None, 3769 description="Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.", 3770 ) 3771 tags: list[str] | None = Field( 3772 default=None, 3773 description='Status tags on the thread (e.g. `"blocked"`, `"needs-review"`). Edited by any thread participant via the `/threads/:thread/tags` endpoints and filterable on the thread list endpoints. Empty array if none set.', 3774 ) 3775 team: str | None = Field( 3776 default=None, 3777 description="ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads.", 3778 ) 3779 title: str | None = Field( 3780 default=None, 3781 description="Human-readable name of the thread. `null` if no title has been set.", 3782 ) 3783 ttl: str | None = Field( 3784 default=None, 3785 description="Offset-free expiry timestamp after which the thread may be automatically cleaned up. `null` if the thread does not expire.", 3786 ) 3787 unread_count: int | None = Field( 3788 default=None, 3789 description="Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.", 3790 ) 3791 updated_at: str | None = Field( 3792 default=None, description="When the thread was last modified (ISO 8601)." 3793 ) 3794 user: str | None = Field( 3795 default=None, 3796 description="ID of the user who owns this thread (`usr_...`). `null` for team-owned or agent-owned threads.", 3797 ) 3798 visibility: Literal["team", "restricted", "private", "org"] = Field( 3799 ..., 3800 description="Who can read the thread: `team` for every owning-team member, `restricted` for team-readable threads with an explicit roster, `private` for roster-only access, or `org` for every member of the owning organization.", 3801 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the agent that owns this thread (agt_...). null for user-owned or team-owned threads.
User who created this thread. Returns a user ID (usr_...) by default, or an expanded user object when the association is loaded. null if the creator is unknown.
Optional description or purpose statement for the thread. null if not set.
Whether this thread operates as a channel a multi-member broadcast-style conversation.
Whether this is the default thread for its owner. Each user or team has at most one default thread.
Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.
Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.
Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. null if not set.
Thread subtype: "standard" for ordinary threads, "personal" for a user-and-owned-agents roster, "feed" for a post feed with inline replies, "slack_mirror" for the membership-strict mirror of a Slack channel, or "slashwork_mirror" for the membership-strict mirror of a Slashwork group. personal and feed are explicit creation options; mirror kinds are server-derived.
When the most recent message was posted in this thread, falling back to the thread's creation time if it has no messages. Always populated on thread list endpoints (which order by it, after default threads); null on endpoints that don't compute activity enrichment.
Single-line snippet of the most recent message's text content (first non-empty line, truncated to 140 characters). Populated on thread list endpoints alongside last_activity; null when the thread has no messages, the latest message has no text content (e.g. attachment-only), or the endpoint doesn't compute activity enrichment.
Display name of the sender of the most recent message the same message last_message_preview snippets. Populated on thread list endpoints; null when the thread has no messages or the endpoint doesn't compute activity enrichment.
Arbitrary key-value metadata attached to the thread. Shape is application-defined; null if no metadata has been set.
Whether the authenticated user has muted notifications for this thread. true suppresses all notification delivery.
ID of the organization this thread belongs to (org_...). null for threads outside an org context.
Array of participant user IDs (usr_...) who are members of this thread.
Expanded participant user objects for each member of this thread. Populated only when the association is loaded.
Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.
Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.
The authenticated user's membership role in this thread, e.g. "owner", "member", or "viewer". null if the user is not a member.
ID of the developer sandbox this thread is scoped to (dsb_...). null for production threads.
URL-safe slug for the thread, used in human-readable permalinks. null if not assigned.
Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.
ID of the team that owns this thread (team_...). null for user-owned or agent-owned threads.
Offset-free expiry timestamp after which the thread may be automatically cleaned up. null if the thread does not expire.
Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.
3804class TeamThreadListResponse(BaseModel): 3805 """ 3806 Successful response 3807 """ 3808 3809 data: list[TeamThreadListResponseDataItem] = Field( 3810 ..., description="Array of thread objects belonging to the team." 3811 )
Successful response
3814class TeamThreadMetricsResponse(BaseModel): 3815 """ 3816 Successful response 3817 """ 3818 3819 days: int 3820 end_at: datetime 3821 opened: int 3822 start_at: datetime
Successful response
3825class TeamListResponseDataItemAclAddItem(BaseModel): 3826 actions: list[str] = Field( 3827 ..., 3828 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3829 ) 3830 principal: str | None = Field( 3831 default=None, 3832 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3833 ) 3834 principal_type: str = Field( 3835 ..., 3836 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3837 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
3840class TeamListResponseDataItemAclGrantsItem(BaseModel): 3841 actions: list[str] = Field( 3842 ..., 3843 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3844 ) 3845 principal: str | None = Field( 3846 default=None, 3847 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3848 ) 3849 principal_type: str = Field( 3850 ..., 3851 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3852 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
3855class TeamListResponseDataItemAclRemoveItem(BaseModel): 3856 principal: str | None = Field( 3857 default=None, 3858 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 3859 ) 3860 principal_type: str = Field( 3861 ..., 3862 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3863 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
3866class TeamListResponseDataItemAcl(BaseModel): 3867 add: list[TeamListResponseDataItemAclAddItem] | None = Field( 3868 default=None, 3869 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 3870 ) 3871 grants: list[TeamListResponseDataItemAclGrantsItem] | None = Field( 3872 default=None, 3873 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 3874 ) 3875 remove: list[TeamListResponseDataItemAclRemoveItem] | None = Field( 3876 default=None, 3877 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 3878 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
3881class TeamListResponseDataItem(BaseModel): 3882 acl: TeamListResponseDataItemAcl | None = Field( 3883 default=None, 3884 description="Access control list governing visibility and join permissions for this team. `null` when no ACL restrictions are applied and the team inherits default access rules.", 3885 ) 3886 app: str | None = Field( 3887 default=None, 3888 description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.", 3889 ) 3890 badges: dict[str, Any] | None = Field( 3891 default=None, 3892 description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.", 3893 ) 3894 created_at: datetime | None = Field( 3895 default=None, description="When this team was created (ISO 8601)." 3896 ) 3897 description: str | None = Field( 3898 default=None, 3899 description="Human-readable description of the team's purpose. `null` if not set.", 3900 ) 3901 id: str = Field(..., description="Team ID (`tem_...`).") 3902 membership_status: str | None = Field( 3903 default=None, 3904 description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.', 3905 ) 3906 metadata: dict[str, Any] | None = Field( 3907 default=None, 3908 description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.", 3909 ) 3910 name: str | None = Field(default=None, description="Display name of the team.") 3911 org: str | None = Field( 3912 default=None, 3913 description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.", 3914 ) 3915 sandbox: str | None = Field( 3916 default=None, 3917 description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.", 3918 ) 3919 slug: str | None = Field( 3920 default=None, 3921 description="URL-safe slug for the team, derived from the team name. `null` if not set.", 3922 ) 3923 updated_at: datetime | None = Field( 3924 default=None, description="When this team was last updated (ISO 8601)." 3925 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Access control list governing visibility and join permissions for this team. null when no ACL restrictions are applied and the team inherits default access rules.
ID of the developer application this team belongs to (dap_...). null if the team is not scoped to an app.
Aggregated badge counts for the team, keyed by category. null when badge data is not loaded.
The authenticated viewer's role on this team. One of "owner", "admin", or "member". null if the viewer is not a member.
Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.
ID of the organization this team belongs to (org_...). null if the team is not org-scoped.
3928class TeamListResponse(BaseModel): 3929 """ 3930 Successful response 3931 """ 3932 3933 data: list[TeamListResponseDataItem] = Field( 3934 ..., description="Array of team objects for the current page." 3935 ) 3936 has_next: bool = Field(..., description="`true` if there is a subsequent page of results.") 3937 has_prev: bool = Field(..., description="`true` if there is a preceding page of results.") 3938 page: int = Field(..., description="The current page number.") 3939 page_size: int = Field(..., description="The number of results per page.") 3940 total_entries: int = Field( 3941 ..., description="Total number of teams matching the query across all pages." 3942 ) 3943 total_pages: int = Field( 3944 ..., description="Total number of pages given the current `page_size`." 3945 )
Successful response
3948class TeamArtifactsResponseDataItemAclAddItem(BaseModel): 3949 actions: list[str] = Field( 3950 ..., 3951 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3952 ) 3953 principal: str | None = Field( 3954 default=None, 3955 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3956 ) 3957 principal_type: str = Field( 3958 ..., 3959 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3960 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
3963class TeamArtifactsResponseDataItemAclGrantsItem(BaseModel): 3964 actions: list[str] = Field( 3965 ..., 3966 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 3967 ) 3968 principal: str | None = Field( 3969 default=None, 3970 description='The identifier of the principal. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`; omit entirely when `principal_type` is `"everyone"`.', 3971 ) 3972 principal_type: str = Field( 3973 ..., 3974 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3975 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Array of action strings the principal is permitted to perform, e.g. ["read", "write"]. Must contain at least one entry.
The identifier of the principal. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role"; omit entirely when principal_type is "everyone".
3978class TeamArtifactsResponseDataItemAclRemoveItem(BaseModel): 3979 principal: str | None = Field( 3980 default=None, 3981 description='The identifier of the principal to remove. A string ID for `"user"`, `"team"`, `"org"`, and `"agent"` types; one of `"admin"`, `"member"`, or `"viewer"` for `"org_role"`. Omit when `principal_type` is `"everyone"`.', 3982 ) 3983 principal_type: str = Field( 3984 ..., 3985 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 3986 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
The identifier of the principal to remove. A string ID for "user", "team", "org", and "agent" types; one of "admin", "member", or "viewer" for "org_role". Omit when principal_type is "everyone".
3989class TeamArtifactsResponseDataItemAcl(BaseModel): 3990 add: list[TeamArtifactsResponseDataItemAclAddItem] | None = Field( 3991 default=None, 3992 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 3993 ) 3994 grants: list[TeamArtifactsResponseDataItemAclGrantsItem] | None = Field( 3995 default=None, 3996 description="Replace mode: the complete new list of grants that replaces all existing entries. Send an empty array (`[]`) to clear all grants. Cannot be combined with `add` or `remove`.", 3997 ) 3998 remove: list[TeamArtifactsResponseDataItemAclRemoveItem] | None = Field( 3999 default=None, 4000 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 4001 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Patch mode: grants to add or merge into the existing list. Cannot be combined with grants.
Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with grants.
4004class TeamArtifactsResponseDataItemImageSource(BaseModel): 4005 file: str | None = Field( 4006 default=None, 4007 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 4008 ) 4009 height: int | None = Field( 4010 default=None, description="Height of the image in pixels. `null` if not known." 4011 ) 4012 media: str | None = Field( 4013 default=None, 4014 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 4015 ) 4016 mime_type: str | None = Field( 4017 default=None, 4018 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 4019 ) 4020 refresh_url: str | None = Field( 4021 default=None, 4022 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 4023 ) 4024 url: str | None = Field( 4025 default=None, 4026 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 4027 ) 4028 width: int | None = Field( 4029 default=None, description="Width of the image in pixels. `null` if not known." 4030 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
4033class TeamArtifactsResponseDataItem(BaseModel): 4034 acl: TeamArtifactsResponseDataItemAcl | None = Field( 4035 default=None, 4036 description="Access control list for the artifact. Contains a `grants` array where each entry specifies `principal_type`, `principal`, and `actions` (`read`, `write`). `null` when the artifact has no grants or the viewer is not its owner.", 4037 ) 4038 agent: str | None = Field( 4039 default=None, 4040 description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.", 4041 ) 4042 content_type: str | None = Field( 4043 default=None, 4044 description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.', 4045 ) 4046 created_at: datetime | None = Field( 4047 default=None, description="When the artifact was first created (ISO 8601)." 4048 ) 4049 current_version: str | None = Field( 4050 default=None, 4051 description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.", 4052 ) 4053 description: str | None = Field( 4054 default=None, 4055 description="Optional longer description of the artifact's contents or purpose. `null` if not set.", 4056 ) 4057 file: str | None = Field( 4058 default=None, 4059 description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.", 4060 ) 4061 file_name: str | None = Field( 4062 default=None, 4063 description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.', 4064 ) 4065 file_url: str | None = Field( 4066 default=None, 4067 description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.", 4068 ) 4069 group_key: str | None = Field( 4070 default=None, 4071 description="Optional nonunique, case-sensitive grouping key, limited to 1024 UTF-8 bytes. Null when unset; belongs to the artifact, not a content version.", 4072 ) 4073 id: str = Field(..., description="Artifact ID (`art_...`).") 4074 image_source: TeamArtifactsResponseDataItemImageSource | None = Field( 4075 default=None, 4076 description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.', 4077 ) 4078 name: str | None = Field( 4079 default=None, 4080 description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.', 4081 ) 4082 org: str | None = Field( 4083 default=None, description="ID of the organization this artifact belongs to (`org_...`)." 4084 ) 4085 sandbox: str | None = Field( 4086 default=None, 4087 description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.", 4088 ) 4089 system: bool | None = Field( 4090 default=None, 4091 description="True when the artifact has no user, team, or agent owner. An organization may own a system artifact.", 4092 ) 4093 team: str | None = Field( 4094 default=None, 4095 description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.", 4096 ) 4097 thread: str | None = Field( 4098 default=None, 4099 description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.", 4100 ) 4101 updated_at: datetime | None = Field( 4102 default=None, description="When the artifact record was last modified (ISO 8601)." 4103 ) 4104 user: str | None = Field( 4105 default=None, 4106 description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.", 4107 ) 4108 version: int | None = Field( 4109 default=None, 4110 description="Current version number of the artifact. Increments each time a new version is published.", 4111 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Access control list for the artifact. Contains a grants array where each entry specifies principal_type, principal, and actions (read, write). null when the artifact has no grants or the viewer is not its owner.
ID of the agent that produced this artifact (agt_...). null if not agent-produced.
MIME type of the current version's file, e.g. "text/csv" or "image/png". null if no file is attached.
ID of the current (latest published) artifact version (artv_...). null if no version has been published.
Optional longer description of the artifact's contents or purpose. null if not set.
Storage file ID for the current version (fil_...). null if no file is attached.
Original filename of the current version's file, e.g. "output.csv". null if no file is attached.
Short-lived signed URL for downloading the current version's file. null if no file is attached.
Optional nonunique, case-sensitive grouping key, limited to 1024 UTF-8 bytes. Null when unset; belongs to the artifact, not a content version.
Image source metadata for rendering the current version's file inline. Present only when content_type starts with "image/". null otherwise.
Identifier of the sandbox environment associated with this artifact. null if not sandbox-scoped.
True when the artifact has no user, team, or agent owner. An organization may own a system artifact.
ID of the thread in which this artifact was created (thr_...). null if not thread-scoped.
4114class TeamArtifactsResponse(BaseModel): 4115 """ 4116 Successful response 4117 """ 4118 4119 data: list[TeamArtifactsResponseDataItem] = Field( 4120 ..., description="Array of artifact objects belonging to the team." 4121 )
Successful response
4124class TeamInvitesResponse(BaseModel): 4125 """ 4126 Successful response 4127 """ 4128 4129 code: str = Field( 4130 ..., 4131 description="Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.", 4132 )
Successful response
4135class TeamTaskAssigneesResponseDataItemActorProfilePicture(BaseModel): 4136 file: str | None = Field( 4137 default=None, 4138 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 4139 ) 4140 height: int | None = Field( 4141 default=None, description="Height of the image in pixels. `null` if not known." 4142 ) 4143 media: str | None = Field( 4144 default=None, 4145 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 4146 ) 4147 mime_type: str | None = Field( 4148 default=None, 4149 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 4150 ) 4151 refresh_url: str | None = Field( 4152 default=None, 4153 description="Endpoint URL you can call to obtain a fresh signed `url` when the current one has expired. `null` if the URL does not require refreshing.", 4154 ) 4155 url: str | None = Field( 4156 default=None, 4157 description="Signed or public URL for downloading the image. May be time-limited; use `refresh_url` to obtain a new URL when this one expires.", 4158 ) 4159 width: int | None = Field( 4160 default=None, description="Width of the image in pixels. `null` if not known." 4161 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
ID of the underlying storage file (fil_...). null when the image is not backed by a platform storage file.
ID of the associated media record (med_...). null when the image is not linked to a media entity.
MIME type of the image, e.g. "image/png" or "image/jpeg". null if not known.
Endpoint URL you can call to obtain a fresh signed url when the current one has expired. null if the URL does not require refreshing.
Signed or public URL for downloading the image. May be time-limited; use refresh_url to obtain a new URL when this one expires.
4164class TeamTaskAssigneesResponseDataItemActor(BaseModel): 4165 alias: str | None = Field( 4166 default=None, 4167 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 4168 ) 4169 id: str | None = Field( 4170 default=None, 4171 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 4172 ) 4173 name: str | None = Field( 4174 default=None, 4175 description="Display name of the actor shown in the UI. `null` if no name is set.", 4176 ) 4177 profile_picture: TeamTaskAssigneesResponseDataItemActorProfilePicture | None = Field( 4178 default=None, 4179 description="Profile picture for the actor. `null` if the actor has no profile picture.", 4180 )
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Short handle or alias for the actor, used as an alternate display identifier. null if not configured.
Composite actor identifier. Format is "user-<usr_...>" for human users or "agent-<agi_...>" for agents.
4183class TeamTaskAssigneesResponseDataItem(BaseModel): 4184 actor: TeamTaskAssigneesResponseDataItemActor = Field( 4185 ..., description="Resolved display details for the assignable principal." 4186 ) 4187 id: str = Field(..., description="User (`usr_...`) or agent (`agi_...`) ID.") 4188 type: Literal["user", "agent"] = Field(..., description="Principal type: `user` or `agent`.")
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
4191class TeamTaskAssigneesResponse(BaseModel): 4192 """ 4193 Successful response 4194 """ 4195 4196 data: list[TeamTaskAssigneesResponseDataItem] = Field( 4197 ..., description="Users and agents that can be assigned to tasks owned by the team." 4198 )
Successful response
4201class TeamTaskEpicsResponseDataItemNextReadyItem(BaseModel): 4202 id: str 4203 name: str 4204 priority: int 4205 status: str
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
4208class TeamTaskEpicsResponseDataItemRootBlockersItem(BaseModel): 4209 downstream_count: int 4210 id: str 4211 name: str 4212 priority: int 4213 status: str
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
4216class TeamTaskEpicsResponseDataItem(BaseModel): 4217 blocked_count: int 4218 counts: dict[str, Any] = Field( 4219 ..., description="Task counts keyed by status, including closed tasks." 4220 ) 4221 epic: str 4222 next_ready: list[TeamTaskEpicsResponseDataItemNextReadyItem] 4223 root_blockers: list[TeamTaskEpicsResponseDataItemRootBlockersItem] 4224 root_blockers_partial: bool = Field( 4225 ..., description="True when root ranking used a truncated in-epic graph." 4226 ) 4227 top_open_priority: int | None = None 4228 updated_at: datetime
!!! abstract "Usage Documentation" Models
A base class for creating Pydantic models.
Attributes:
- __class_vars__: The names of the class variables defined on the model.
- __private_attributes__: Metadata about the private attributes of the model.
- __signature__: The synthesized
__init__[Signature][inspect.Signature] of the model. - __pydantic_complete__: Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__: The core schema of the model.
- __pydantic_custom_init__: Whether the model has a custom
__init__function. - __pydantic_decorators__: Metadata containing the decorators defined on the model.
This replaces
Model.__validators__andModel.__root_validators__from Pydantic V1. - __pydantic_generic_metadata__: A dictionary containing metadata about generic Pydantic models.
The
originandargsitems map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and theparameteritem maps to the__parameter__attribute of generic classes. - __pydantic_parent_namespace__: Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__: The name of the post-init method for the model, if defined.
- __pydantic_root_model__: Whether the model is a [
RootModel][pydantic.root_model.RootModel]. - __pydantic_serializer__: The
pydantic-coreSchemaSerializerused to dump instances of the model. - __pydantic_validator__: The
pydantic-coreSchemaValidatorused to validate instances of the model. - __pydantic_fields__: A dictionary of field names and their corresponding [
FieldInfo][pydantic.fields.FieldInfo] objects. - __pydantic_computed_fields__: A dictionary of computed field names and their corresponding [
ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects. - __pydantic_extra__: A dictionary containing extra values, if [
extra][pydantic.config.ConfigDict.extra] is set to'allow'. - __pydantic_fields_set__: The names of fields explicitly set during instantiation.
- __pydantic_private__: Values of private attributes set on the model instance.
Task counts keyed by status, including closed tasks.
4231class TeamTaskEpicsResponse(BaseModel): 4232 """ 4233 Successful response 4234 """ 4235 4236 after_cursor: str | None = None 4237 before_cursor: str | None = None 4238 data: list[TeamTaskEpicsResponseDataItem] 4239 has_more: bool 4240 no_epic_open_count: int
Successful response
4243class AsyncTeamCustomObjectResource: 4244 def __init__(self, http: HttpClient): 4245 self._http = http 4246 4247 async def list( 4248 self, 4249 team: str, 4250 type: str, 4251 *, 4252 limit: int | None = None, 4253 offset: int | None = None, 4254 row_key: str | None = None, 4255 sort_key: str | None = None, 4256 query: str | None = None, 4257 ) -> TeamCustomObjectListResponse: 4258 """ 4259 List a team's custom objects 4260 Returns a paginated list of custom objects owned by the specified team, 4261 filtered to a single schema type. Results are ordered by creation time 4262 descending unless `query` is provided, in which case they are ordered by 4263 full-text relevance score descending. 4264 Use `limit` and `offset` for page-based pagination. Use `row_key` or 4265 `sort_key` to narrow results to objects matching those index values. 4266 Full-text search via `query` operates only against the fields configured 4267 as `search_fields` on the schema. 4268 The authenticated user must be a member of the team with sufficient 4269 access. Returns 404 if the team is not found, the caller lacks access, 4270 or `type` does not match a registered schema for the team's organization. 4271 4272 Args: 4273 team: Team ID (`team_...`). Scopes results to objects owned by this team. 4274 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 4275 limit: Maximum number of objects to return per page. 4276 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 4277 row_key: Filter results to objects whose `row_key` exactly matches this value. 4278 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 4279 query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending. 4280 4281 Returns: 4282 Successful response 4283 """ 4284 query: dict[str, object] = {} 4285 query["type"] = type 4286 if limit is not None: 4287 query["limit"] = limit 4288 if offset is not None: 4289 query["offset"] = offset 4290 if row_key is not None: 4291 query["row_key"] = row_key 4292 if sort_key is not None: 4293 query["sort_key"] = sort_key 4294 if query is not None: 4295 query["query"] = query 4296 return await self._http.request( 4297 f"/api/v1/teams/{team}/custom_objects", 4298 query=query, 4299 response_type=TeamCustomObjectListResponse, 4300 ) 4301 4302 async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 4303 """ 4304 Create a team custom object 4305 Creates a new custom object owned by the specified team. The object is 4306 instantiated against the schema identified by `type` (the schema's 4307 `lookup_key`). All field values are validated against that schema's 4308 field definitions before the object is persisted. 4309 The authenticated user must be a member of the team with sufficient 4310 access. If the team is not found or the caller lacks access, the endpoint 4311 returns 404. If `type` does not match a registered schema for the team's 4312 organization, the endpoint also returns 404. 4313 4314 Args: 4315 team: Team ID (`team_...`). Scopes results to objects owned by this team. 4316 input: Request body. 4317 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 4318 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 4319 4320 Returns: 4321 The newly created custom object. 4322 """ 4323 return await self._http.request( 4324 f"/api/v1/teams/{team}/custom_objects", 4325 method="POST", 4326 body=input, 4327 response_type=CustomObject, 4328 )
4247 async def list( 4248 self, 4249 team: str, 4250 type: str, 4251 *, 4252 limit: int | None = None, 4253 offset: int | None = None, 4254 row_key: str | None = None, 4255 sort_key: str | None = None, 4256 query: str | None = None, 4257 ) -> TeamCustomObjectListResponse: 4258 """ 4259 List a team's custom objects 4260 Returns a paginated list of custom objects owned by the specified team, 4261 filtered to a single schema type. Results are ordered by creation time 4262 descending unless `query` is provided, in which case they are ordered by 4263 full-text relevance score descending. 4264 Use `limit` and `offset` for page-based pagination. Use `row_key` or 4265 `sort_key` to narrow results to objects matching those index values. 4266 Full-text search via `query` operates only against the fields configured 4267 as `search_fields` on the schema. 4268 The authenticated user must be a member of the team with sufficient 4269 access. Returns 404 if the team is not found, the caller lacks access, 4270 or `type` does not match a registered schema for the team's organization. 4271 4272 Args: 4273 team: Team ID (`team_...`). Scopes results to objects owned by this team. 4274 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 4275 limit: Maximum number of objects to return per page. 4276 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 4277 row_key: Filter results to objects whose `row_key` exactly matches this value. 4278 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 4279 query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending. 4280 4281 Returns: 4282 Successful response 4283 """ 4284 query: dict[str, object] = {} 4285 query["type"] = type 4286 if limit is not None: 4287 query["limit"] = limit 4288 if offset is not None: 4289 query["offset"] = offset 4290 if row_key is not None: 4291 query["row_key"] = row_key 4292 if sort_key is not None: 4293 query["sort_key"] = sort_key 4294 if query is not None: 4295 query["query"] = query 4296 return await self._http.request( 4297 f"/api/v1/teams/{team}/custom_objects", 4298 query=query, 4299 response_type=TeamCustomObjectListResponse, 4300 )
List a team's custom objects
Returns a paginated list of custom objects owned by the specified team,
filtered to a single schema type. Results are ordered by creation time
descending unless query is provided, in which case they are ordered by
full-text relevance score descending.
Use limit and offset for page-based pagination. Use row_key or
sort_key to narrow results to objects matching those index values.
Full-text search via query operates only against the fields configured
as search_fields on the schema.
The authenticated user must be a member of the team with sufficient
access. Returns 404 if the team is not found, the caller lacks access,
or type does not match a registered schema for the team's organization.
Arguments:
- team: Team ID (
team_...). Scopes results to objects owned by this team. - type: Schema type identifier (
lookup_key) that filters results to objects of this schema. - limit: Maximum number of objects to return per page.
- offset: Number of objects to skip before returning results. Use with
limitfor page-based pagination. - row_key: Filter results to objects whose
row_keyexactly matches this value. - sort_key: Filter results to objects whose
sort_keyexactly matches this value. - query: Full-text search string matched against the schema's configured
search_fields. When provided, results are ordered by relevance score descending instead of creation time descending.
Returns:
Successful response
4302 async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 4303 """ 4304 Create a team custom object 4305 Creates a new custom object owned by the specified team. The object is 4306 instantiated against the schema identified by `type` (the schema's 4307 `lookup_key`). All field values are validated against that schema's 4308 field definitions before the object is persisted. 4309 The authenticated user must be a member of the team with sufficient 4310 access. If the team is not found or the caller lacks access, the endpoint 4311 returns 404. If `type` does not match a registered schema for the team's 4312 organization, the endpoint also returns 404. 4313 4314 Args: 4315 team: Team ID (`team_...`). Scopes results to objects owned by this team. 4316 input: Request body. 4317 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 4318 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 4319 4320 Returns: 4321 The newly created custom object. 4322 """ 4323 return await self._http.request( 4324 f"/api/v1/teams/{team}/custom_objects", 4325 method="POST", 4326 body=input, 4327 response_type=CustomObject, 4328 )
Create a team custom object
Creates a new custom object owned by the specified team. The object is
instantiated against the schema identified by type (the schema's
lookup_key). All field values are validated against that schema's
field definitions before the object is persisted.
The authenticated user must be a member of the team with sufficient
access. If the team is not found or the caller lacks access, the endpoint
returns 404. If type does not match a registered schema for the team's
organization, the endpoint also returns 404.
Arguments:
- team: Team ID (
team_...). Scopes results to objects owned by this team. - input: Request body.
- input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by
type. - input.type: Schema type identifier (
lookup_key) that defines the object's fields and validation rules.
Returns:
The newly created custom object.
4331class AsyncTeamInviteResource: 4332 def __init__(self, http: HttpClient): 4333 self._http = http 4334 4335 async def create(self, team: str) -> TeamInvite: 4336 """ 4337 Create a team invite 4338 Generates a new invite code for the specified team. The authenticated user 4339 must be a member of the team with the `owner` or `admin` role. 4340 The returned code is a short alphanumeric string that other users can 4341 present to join the team. Each call produces a new code; previously issued 4342 codes are not invalidated by this request. Codes expire after seven days. 4343 Sharing a code intentionally grants membership across organizations within 4344 the same application, including access to objects shared with team members. 4345 Treat it as a bearer credential. Revoke an individual code with 4346 DELETE /api/v1/teams/:team/invite/:code before issuing a replacement. 4347 Revocation does not remove existing members or their access. 4348 4349 Args: 4350 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 4351 4352 Returns: 4353 The newly created team invite containing the join code. 4354 """ 4355 return await self._http.request( 4356 f"/api/v1/teams/{team}/invite", 4357 method="POST", 4358 response_type=TeamInvite, 4359 ) 4360 4361 async def delete(self, team: str, code: str) -> None: 4362 """ 4363 Revoke a team invite code 4364 Deletes one invite code for this team. Requires an owner or admin membership. 4365 Future redemption returns 404, as for an unknown or expired code. Existing 4366 memberships and their access are unchanged; remove members separately to end 4367 their access. Redemption already in flight is not cancelled. 4368 To replace a code, revoke it and then create a new invite. Creating a new 4369 invite alone does not invalidate any previous code. Other codes remain valid. 4370 4371 Args: 4372 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 4373 code: The invite code to revoke. 4374 4375 Returns: 4376 No content 4377 """ 4378 await self._http.request(f"/api/v1/teams/{team}/invite/{code}", method="DELETE")
4335 async def create(self, team: str) -> TeamInvite: 4336 """ 4337 Create a team invite 4338 Generates a new invite code for the specified team. The authenticated user 4339 must be a member of the team with the `owner` or `admin` role. 4340 The returned code is a short alphanumeric string that other users can 4341 present to join the team. Each call produces a new code; previously issued 4342 codes are not invalidated by this request. Codes expire after seven days. 4343 Sharing a code intentionally grants membership across organizations within 4344 the same application, including access to objects shared with team members. 4345 Treat it as a bearer credential. Revoke an individual code with 4346 DELETE /api/v1/teams/:team/invite/:code before issuing a replacement. 4347 Revocation does not remove existing members or their access. 4348 4349 Args: 4350 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 4351 4352 Returns: 4353 The newly created team invite containing the join code. 4354 """ 4355 return await self._http.request( 4356 f"/api/v1/teams/{team}/invite", 4357 method="POST", 4358 response_type=TeamInvite, 4359 )
Create a team invite
Generates a new invite code for the specified team. The authenticated user
must be a member of the team with the owner or admin role.
The returned code is a short alphanumeric string that other users can
present to join the team. Each call produces a new code; previously issued
codes are not invalidated by this request. Codes expire after seven days.
Sharing a code intentionally grants membership across organizations within
the same application, including access to objects shared with team members.
Treat it as a bearer credential. Revoke an individual code with
DELETE /api/v1/teams/:team/invite/:code before issuing a replacement.
Revocation does not remove existing members or their access.
Arguments:
- team: Team ID (
tm_...) identifying the team for which to generate the invite code.
Returns:
The newly created team invite containing the join code.
4361 async def delete(self, team: str, code: str) -> None: 4362 """ 4363 Revoke a team invite code 4364 Deletes one invite code for this team. Requires an owner or admin membership. 4365 Future redemption returns 404, as for an unknown or expired code. Existing 4366 memberships and their access are unchanged; remove members separately to end 4367 their access. Redemption already in flight is not cancelled. 4368 To replace a code, revoke it and then create a new invite. Creating a new 4369 invite alone does not invalidate any previous code. Other codes remain valid. 4370 4371 Args: 4372 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 4373 code: The invite code to revoke. 4374 4375 Returns: 4376 No content 4377 """ 4378 await self._http.request(f"/api/v1/teams/{team}/invite/{code}", method="DELETE")
Revoke a team invite code Deletes one invite code for this team. Requires an owner or admin membership. Future redemption returns 404, as for an unknown or expired code. Existing memberships and their access are unchanged; remove members separately to end their access. Redemption already in flight is not cancelled. To replace a code, revoke it and then create a new invite. Creating a new invite alone does not invalidate any previous code. Other codes remain valid.
Arguments:
- team: Team ID (
tm_...) identifying the team for which to generate the invite code. - code: The invite code to revoke.
Returns:
No content
4381class AsyncMemberResource: 4382 def __init__(self, http: HttpClient): 4383 self._http = http 4384 4385 async def remove(self, team: str) -> None: 4386 """ 4387 Remove a member or org from a team 4388 Removes a user, agent, or all members of an organization from the specified 4389 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 4390 one or none returns a 400 error. On success, returns 204 No Content. 4391 When `org` is provided, every user and agent membership belonging to that org 4392 is removed in a single call. The caller must be a member of the team's owning 4393 org to perform an org-scoped removal. You cannot target the team's owning org 4394 itself with this parameter. 4395 The caller must have permission to manage the team. When `app` is present, the 4396 request is scoped to that app and requires a valid app-scoped token. 4397 4398 Args: 4399 team: Team ID (`team_...`). The team to remove the member from. 4400 4401 Returns: 4402 Empty response. Returns 204 No Content on success. 4403 """ 4404 await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 4405 4406 async def list(self, team: str) -> MemberListResponse: 4407 """ 4408 List members of a team 4409 Returns all members of the specified team, including both users and agents. 4410 Members are returned in a single non-paginated array ordered by join time. 4411 Bearer-authenticated users must be a member of the team to retrieve its 4412 member list. Developer and server-to-server callers can retrieve members for 4413 any team visible to their app scope. When `app` is provided, the request is 4414 scoped to that app and requires a valid app-scoped token. 4415 4416 Args: 4417 team: Team ID (`team_...`). The team to remove the member from. 4418 4419 Returns: 4420 Successful response 4421 """ 4422 return await self._http.request( 4423 f"/api/v1/teams/{team}/members", 4424 response_type=MemberListResponse, 4425 ) 4426 4427 async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 4428 """ 4429 Add a member to a team 4430 Adds a user or agent as a member of the specified team and returns the new 4431 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 4432 both or neither returns a 400 error. 4433 Adding a user requires permission to manage the team (team owner, team 4434 admin, or org admin). Adding an agent with the default `"member"` role is 4435 also open to any existing member of the team; assigning an elevated role to 4436 an agent still requires team-manage permission. When an `app` is provided, 4437 the request is scoped to that app and the caller must hold a valid app-scoped 4438 token. The default role is `"member"` when `role` is omitted. 4439 4440 Args: 4441 team: Team ID (`team_...`). The team to remove the member from. 4442 input: Request body. 4443 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 4444 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 4445 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 4446 4447 Returns: 4448 The newly created team membership. 4449 """ 4450 return await self._http.request( 4451 f"/api/v1/teams/{team}/members", 4452 method="POST", 4453 body=input, 4454 response_type=TeamMembership, 4455 ) 4456 4457 async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 4458 """ 4459 Update a team member's role 4460 Changes the role of an existing user member on the specified team. Returns the 4461 updated membership on success. 4462 Only user memberships are supported by this endpoint. Attempting to update an 4463 agent membership returns 404. To change an agent's role, remove the existing 4464 membership and re-add the agent with the desired role. 4465 The caller must have permission to modify the team. You cannot change a member's 4466 role across organization boundaries. Demoting the last owner of a team returns 4467 409. An invalid `role` value returns 422. When `app` is provided, the request 4468 is scoped to that app and requires a valid app-scoped token. 4469 4470 Args: 4471 team: Team ID (`team_...`). The team to remove the member from. 4472 user: User ID (`usr_...`) of the existing member whose role should be changed. 4473 input: Request body. 4474 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 4475 4476 Returns: 4477 The updated team membership reflecting the new role. 4478 """ 4479 return await self._http.request( 4480 f"/api/v1/teams/{team}/members/{user}", 4481 method="PATCH", 4482 body=input, 4483 response_type=TeamMembership, 4484 )
4385 async def remove(self, team: str) -> None: 4386 """ 4387 Remove a member or org from a team 4388 Removes a user, agent, or all members of an organization from the specified 4389 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 4390 one or none returns a 400 error. On success, returns 204 No Content. 4391 When `org` is provided, every user and agent membership belonging to that org 4392 is removed in a single call. The caller must be a member of the team's owning 4393 org to perform an org-scoped removal. You cannot target the team's owning org 4394 itself with this parameter. 4395 The caller must have permission to manage the team. When `app` is present, the 4396 request is scoped to that app and requires a valid app-scoped token. 4397 4398 Args: 4399 team: Team ID (`team_...`). The team to remove the member from. 4400 4401 Returns: 4402 Empty response. Returns 204 No Content on success. 4403 """ 4404 await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")
Remove a member or org from a team
Removes a user, agent, or all members of an organization from the specified
team. Provide exactly one of user, agent, or org supplying more than
one or none returns a 400 error. On success, returns 204 No Content.
When org is provided, every user and agent membership belonging to that org
is removed in a single call. The caller must be a member of the team's owning
org to perform an org-scoped removal. You cannot target the team's owning org
itself with this parameter.
The caller must have permission to manage the team. When app is present, the
request is scoped to that app and requires a valid app-scoped token.
Arguments:
- team: Team ID (
team_...). The team to remove the member from.
Returns:
Empty response. Returns 204 No Content on success.
4406 async def list(self, team: str) -> MemberListResponse: 4407 """ 4408 List members of a team 4409 Returns all members of the specified team, including both users and agents. 4410 Members are returned in a single non-paginated array ordered by join time. 4411 Bearer-authenticated users must be a member of the team to retrieve its 4412 member list. Developer and server-to-server callers can retrieve members for 4413 any team visible to their app scope. When `app` is provided, the request is 4414 scoped to that app and requires a valid app-scoped token. 4415 4416 Args: 4417 team: Team ID (`team_...`). The team to remove the member from. 4418 4419 Returns: 4420 Successful response 4421 """ 4422 return await self._http.request( 4423 f"/api/v1/teams/{team}/members", 4424 response_type=MemberListResponse, 4425 )
List members of a team
Returns all members of the specified team, including both users and agents.
Members are returned in a single non-paginated array ordered by join time.
Bearer-authenticated users must be a member of the team to retrieve its
member list. Developer and server-to-server callers can retrieve members for
any team visible to their app scope. When app is provided, the request is
scoped to that app and requires a valid app-scoped token.
Arguments:
- team: Team ID (
team_...). The team to remove the member from.
Returns:
Successful response
4427 async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 4428 """ 4429 Add a member to a team 4430 Adds a user or agent as a member of the specified team and returns the new 4431 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 4432 both or neither returns a 400 error. 4433 Adding a user requires permission to manage the team (team owner, team 4434 admin, or org admin). Adding an agent with the default `"member"` role is 4435 also open to any existing member of the team; assigning an elevated role to 4436 an agent still requires team-manage permission. When an `app` is provided, 4437 the request is scoped to that app and the caller must hold a valid app-scoped 4438 token. The default role is `"member"` when `role` is omitted. 4439 4440 Args: 4441 team: Team ID (`team_...`). The team to remove the member from. 4442 input: Request body. 4443 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 4444 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 4445 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 4446 4447 Returns: 4448 The newly created team membership. 4449 """ 4450 return await self._http.request( 4451 f"/api/v1/teams/{team}/members", 4452 method="POST", 4453 body=input, 4454 response_type=TeamMembership, 4455 )
Add a member to a team
Adds a user or agent as a member of the specified team and returns the new
membership with HTTP 201. Provide exactly one of user or agent supplying
both or neither returns a 400 error.
Adding a user requires permission to manage the team (team owner, team
admin, or org admin). Adding an agent with the default "member" role is
also open to any existing member of the team; assigning an elevated role to
an agent still requires team-manage permission. When an app is provided,
the request is scoped to that app and the caller must hold a valid app-scoped
token. The default role is "member" when role is omitted.
Arguments:
- team: Team ID (
team_...). The team to remove the member from. - input: Request body.
- input.agent: Agent ID (
agt_...) to add as a member. Provide exactly one ofuseroragent. - input.role: Role to assign. One of
"owner","admin", or"member". Defaults to"member"when omitted. - input.user: User ID (
usr_...) to add as a member. Provide exactly one ofuseroragent.
Returns:
The newly created team membership.
4457 async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 4458 """ 4459 Update a team member's role 4460 Changes the role of an existing user member on the specified team. Returns the 4461 updated membership on success. 4462 Only user memberships are supported by this endpoint. Attempting to update an 4463 agent membership returns 404. To change an agent's role, remove the existing 4464 membership and re-add the agent with the desired role. 4465 The caller must have permission to modify the team. You cannot change a member's 4466 role across organization boundaries. Demoting the last owner of a team returns 4467 409. An invalid `role` value returns 422. When `app` is provided, the request 4468 is scoped to that app and requires a valid app-scoped token. 4469 4470 Args: 4471 team: Team ID (`team_...`). The team to remove the member from. 4472 user: User ID (`usr_...`) of the existing member whose role should be changed. 4473 input: Request body. 4474 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 4475 4476 Returns: 4477 The updated team membership reflecting the new role. 4478 """ 4479 return await self._http.request( 4480 f"/api/v1/teams/{team}/members/{user}", 4481 method="PATCH", 4482 body=input, 4483 response_type=TeamMembership, 4484 )
Update a team member's role Changes the role of an existing user member on the specified team. Returns the updated membership on success. Only user memberships are supported by this endpoint. Attempting to update an agent membership returns 404. To change an agent's role, remove the existing membership and re-add the agent with the desired role. The caller must have permission to modify the team. You cannot change a member's role across organization boundaries. Demoting the last owner of a team returns
- An invalid
rolevalue returns 422. Whenappis provided, the request is scoped to that app and requires a valid app-scoped token.
Arguments:
- team: Team ID (
team_...). The team to remove the member from. - user: User ID (
usr_...) of the existing member whose role should be changed. - input: Request body.
- input.role: New role to assign. One of
"owner","admin", or"member".
Returns:
The updated team membership reflecting the new role.
4487class AsyncTeamTaskResource: 4488 def __init__(self, http: HttpClient): 4489 self._http = http 4490 4491 async def list( 4492 self, 4493 team: str, 4494 *, 4495 user: str | None = None, 4496 org: str | None = None, 4497 status: str | None = None, 4498 owner_user: str | None = None, 4499 owner_agent: str | None = None, 4500 priority: int | None = None, 4501 tag: str | None = None, 4502 parent: str | None = None, 4503 source_scope: str | None = None, 4504 source_type: str | None = None, 4505 source_id: str | None = None, 4506 epic: str | None = None, 4507 search: str | None = None, 4508 sort: str | None = None, 4509 order: str | None = None, 4510 due_before: str | None = None, 4511 due_after: str | None = None, 4512 overdue: bool | None = None, 4513 ready: bool | None = None, 4514 attention: bool | None = None, 4515 limit: int | None = None, 4516 after_cursor: str | None = None, 4517 ) -> TeamTaskListResponse: 4518 """ 4519 List an owner's tasks 4520 Returns tasks owned by the specified user or team. You can narrow results using the 4521 optional filters below. By default results are returned in reverse chronological 4522 order (most recently created first); use `sort` and `order` to sort by due date or 4523 priority instead. 4524 User-authenticated callers may list their personal tasks or tasks for teams they 4525 have joined. Privileged callers provide the owner in the route; the owner's 4526 organization is implied by that principal. An explicit `org` is optional and, 4527 when set, must match the owner's organization. 4528 4529 Args: 4530 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4531 user: User ID (`usr_...`) for user-scoped tasks. 4532 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 4533 status: Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses. 4534 owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`). 4535 owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`). 4536 priority: Filter tasks by priority, from 0 (highest) to 4 (lowest). 4537 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 4538 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 4539 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4540 source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters. 4541 source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters. 4542 epic: Return only tasks with this exact epic label. 4543 search: Restrict results to tasks whose name or description contains this string. 4544 sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created. 4545 order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`. 4546 due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded. 4547 due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded. 4548 overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue. 4549 ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work. 4550 attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry. 4551 limit: Maximum number of tasks to return. Capped at 100. 4552 after_cursor: Opaque cursor returned by the previous page. 4553 4554 Returns: 4555 Successful response 4556 """ 4557 query: dict[str, object] = {} 4558 if user is not None: 4559 query["user"] = user 4560 if org is not None: 4561 query["org"] = org 4562 if status is not None: 4563 query["status"] = status 4564 if owner_user is not None: 4565 query["owner_user"] = owner_user 4566 if owner_agent is not None: 4567 query["owner_agent"] = owner_agent 4568 if priority is not None: 4569 query["priority"] = priority 4570 if tag is not None: 4571 query["tag"] = tag 4572 if parent is not None: 4573 query["parent"] = parent 4574 if source_scope is not None: 4575 query["source_scope"] = source_scope 4576 if source_type is not None: 4577 query["source_type"] = source_type 4578 if source_id is not None: 4579 query["source_id"] = source_id 4580 if epic is not None: 4581 query["epic"] = epic 4582 if search is not None: 4583 query["search"] = search 4584 if sort is not None: 4585 query["sort"] = sort 4586 if order is not None: 4587 query["order"] = order 4588 if due_before is not None: 4589 query["due_before"] = due_before 4590 if due_after is not None: 4591 query["due_after"] = due_after 4592 if overdue is not None: 4593 query["overdue"] = overdue 4594 if ready is not None: 4595 query["ready"] = ready 4596 if attention is not None: 4597 query["attention"] = attention 4598 if limit is not None: 4599 query["limit"] = limit 4600 if after_cursor is not None: 4601 query["after_cursor"] = after_cursor 4602 return await self._http.request( 4603 f"/api/v1/teams/{team}/tasks", 4604 query=query, 4605 response_type=TeamTaskListResponse, 4606 ) 4607 4608 async def create(self, team: str, input: TeamTaskCreateInput) -> Task: 4609 """ 4610 Create a task for an owner 4611 Creates a new task owned by the specified user or team and returns the full 4612 task object. User-authenticated calls are attributed to the authenticated 4613 user or agent. App-scoped developer and server-to-server callers must provide 4614 the task's explicit `org` scope and an explicit `user` or `agent` actor for 4615 team tasks; a user-owned task reuses the user in the route unless an explicit 4616 agent is supplied. Every referenced principal is validated against the app, 4617 owner, and team membership before creation. 4618 4619 Args: 4620 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4621 input: Request body. 4622 input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner. 4623 input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. 4624 input.task: Attributes for the task to create. `name` is required; all other fields are optional. 4625 input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call. 4626 4627 Returns: 4628 The newly created task. 4629 """ 4630 return await self._http.request( 4631 f"/api/v1/teams/{team}/tasks", 4632 method="POST", 4633 body=input, 4634 response_type=Task, 4635 ) 4636 4637 async def blocker_cycles( 4638 self, 4639 team: str, 4640 *, 4641 user: str | None = None, 4642 org: str | None = None, 4643 limit: int | None = None, 4644 after_cursor: str | None = None, 4645 ) -> TeamTaskBlockerCyclesResponse: 4646 """ 4647 List task blocker cycles 4648 Runs an on-demand diagnostic over unfinished tasks owned by the specified 4649 team or user and returns a forward cursor-paginated page of complete cyclic 4650 blocker components. Detection is bounded to owners with at most 100 4651 unfinished tasks. This endpoint is read-only: cycles do not prevent task 4652 updates, lease acquisition, or completion. 4653 4654 Args: 4655 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4656 user: User ID (`usr_...`) owning the tasks. 4657 org: Optional organization context for privileged callers. 4658 limit: Maximum cycle components to return. Defaults to 50; maximum is 100. 4659 after_cursor: Opaque cursor returned by the preceding page. 4660 4661 Returns: 4662 Successful response 4663 """ 4664 query: dict[str, object] = {} 4665 if user is not None: 4666 query["user"] = user 4667 if org is not None: 4668 query["org"] = org 4669 if limit is not None: 4670 query["limit"] = limit 4671 if after_cursor is not None: 4672 query["after_cursor"] = after_cursor 4673 return await self._http.request( 4674 f"/api/v1/teams/{team}/tasks/blocker_cycles", 4675 query=query, 4676 response_type=TeamTaskBlockerCyclesResponse, 4677 ) 4678 4679 async def by_source(self, team: str, input: TeamTaskBySourceInput) -> TaskEnsureResult: 4680 """ 4681 Find or create a task by source 4682 Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted. 4683 4684 Args: 4685 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4686 input: Request body. 4687 input.agent: Explicit acting agent for privileged callers. 4688 input.description: Initial task description. 4689 input.epic: Initial epic grouping. 4690 input.name: Initial task name. 4691 input.org: Explicit organization for privileged callers. 4692 input.source_id: Source identity, for example owner/repo#123. 4693 input.source_scope: Source scope, for example github. 4694 input.source_type: Source type, for example pull_request. 4695 input.status: Initial task status. 4696 input.user: User owner, or explicit acting user on a team route. 4697 4698 Returns: 4699 The task and whether this request created it. 4700 """ 4701 return await self._http.request( 4702 f"/api/v1/teams/{team}/tasks/by-source", 4703 method="PUT", 4704 body=input, 4705 response_type=TaskEnsureResult, 4706 ) 4707 4708 async def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse: 4709 """ 4710 Get task activity metrics for a team 4711 Returns task activity metrics scoped to one team (the Network in ArchAgents). 4712 `open` counts currently open or in-progress team tasks, `created` counts 4713 tasks inserted in the UTC-day window, and `completed` counts tasks whose 4714 `closed_at` falls in that window while still in a closed status. Hard-deleted 4715 tasks are absent from the projection and therefore omitted. The daily series 4716 is zero-filled across the requested window and includes reconstructed 4717 end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at). 4718 Any authenticated team member may read this count-only Network summary. 4719 Requests from callers without team access return 404 so team existence is 4720 not disclosed. 4721 4722 Args: 4723 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4724 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 4725 4726 Returns: 4727 Successful response 4728 """ 4729 query: dict[str, object] = {} 4730 if days is not None: 4731 query["days"] = days 4732 return await self._http.request( 4733 f"/api/v1/teams/{team}/tasks/metrics", 4734 query=query, 4735 response_type=TeamTaskMetricsResponse, 4736 ) 4737 4738 async def ready( 4739 self, 4740 team: str, 4741 *, 4742 user: str | None = None, 4743 org: str | None = None, 4744 explain: bool | None = None, 4745 assigned_to_me: bool | None = None, 4746 source_scope: str | None = None, 4747 source_type: str | None = None, 4748 source_id: str | None = None, 4749 epic: str | None = None, 4750 limit: int | None = None, 4751 after_cursor: str | None = None, 4752 ) -> TeamTaskReadyResponse: 4753 """ 4754 List an owner's ready tasks 4755 Returns open tasks with no unfinished blockers and no active session lease. 4756 Readiness is calculated by the server from the current task projection. It is 4757 a snapshot, not a reservation; claim a task lease before starting work. 4758 Results are ordered by priority (0, the most urgent, first), then oldest 4759 first, so the first page is always the most urgent ready work. 4760 Pass `explain=true` to include every open task with a stable readiness reason. 4761 4762 Args: 4763 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4764 user: User ID (`usr_...`) owning the tasks. 4765 org: Optional organization context for privileged callers. 4766 explain: Include blocked and actively leased open tasks with exclusion reasons. 4767 assigned_to_me: Only include tasks assigned to the authenticated user. 4768 source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4769 source_type: Only include tasks whose source matches this object kind. 4770 source_id: Only include tasks whose source matches this object identity. 4771 epic: Only include tasks with this exact epic label. 4772 limit: Maximum number of readiness entries to return. Capped at 100. 4773 after_cursor: Opaque cursor returned by the previous page. 4774 4775 Returns: 4776 Successful response 4777 """ 4778 query: dict[str, object] = {} 4779 if user is not None: 4780 query["user"] = user 4781 if org is not None: 4782 query["org"] = org 4783 if explain is not None: 4784 query["explain"] = explain 4785 if assigned_to_me is not None: 4786 query["assigned_to_me"] = assigned_to_me 4787 if source_scope is not None: 4788 query["source_scope"] = source_scope 4789 if source_type is not None: 4790 query["source_type"] = source_type 4791 if source_id is not None: 4792 query["source_id"] = source_id 4793 if epic is not None: 4794 query["epic"] = epic 4795 if limit is not None: 4796 query["limit"] = limit 4797 if after_cursor is not None: 4798 query["after_cursor"] = after_cursor 4799 return await self._http.request( 4800 f"/api/v1/teams/{team}/tasks/ready", 4801 query=query, 4802 response_type=TeamTaskReadyResponse, 4803 ) 4804 4805 async def search( 4806 self, 4807 team: str, 4808 *, 4809 user: str | None = None, 4810 org: str | None = None, 4811 q: str | None = None, 4812 query: str | None = None, 4813 status: str | None = None, 4814 owner_user: str | None = None, 4815 owner_agent: str | None = None, 4816 priority: int | None = None, 4817 tag: str | None = None, 4818 parent: str | None = None, 4819 source_scope: str | None = None, 4820 source_type: str | None = None, 4821 source_id: str | None = None, 4822 epic: str | None = None, 4823 limit: int | None = None, 4824 after_cursor: str | None = None, 4825 ) -> TeamTaskSearchResponse: 4826 """ 4827 Search an owner's tasks 4828 Performs a full-text search over tasks owned by the specified user or team and returns 4829 matching results. Combine `q` with the optional filters to narrow the result set 4830 further. When no query is provided, the endpoint behaves like a filtered list. 4831 The `query` field in the response echoes the effective search query. 4832 User-authenticated callers may search their personal tasks or tasks for teams 4833 they have joined. Privileged callers provide the owner in the route; the owner's 4834 organization is implied by that principal. An explicit `org` is optional and, 4835 when set, must match the owner's organization. 4836 4837 Args: 4838 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4839 user: User ID (`usr_...`) whose tasks are searched. 4840 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 4841 q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided. 4842 query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility. 4843 status: Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses. 4844 owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`). 4845 owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`). 4846 priority: Filter results by priority, from 0 (highest) to 4 (lowest). 4847 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 4848 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 4849 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4850 source_type: Return only tasks whose source matches this object kind. 4851 source_id: Return only tasks whose source matches this object identity. 4852 epic: Return only tasks with this exact epic label. 4853 limit: Maximum number of tasks to return. Capped at 100. 4854 after_cursor: Opaque cursor returned by the previous page. 4855 4856 Returns: 4857 Successful response 4858 """ 4859 query: dict[str, object] = {} 4860 if user is not None: 4861 query["user"] = user 4862 if org is not None: 4863 query["org"] = org 4864 if q is not None: 4865 query["q"] = q 4866 if query is not None: 4867 query["query"] = query 4868 if status is not None: 4869 query["status"] = status 4870 if owner_user is not None: 4871 query["owner_user"] = owner_user 4872 if owner_agent is not None: 4873 query["owner_agent"] = owner_agent 4874 if priority is not None: 4875 query["priority"] = priority 4876 if tag is not None: 4877 query["tag"] = tag 4878 if parent is not None: 4879 query["parent"] = parent 4880 if source_scope is not None: 4881 query["source_scope"] = source_scope 4882 if source_type is not None: 4883 query["source_type"] = source_type 4884 if source_id is not None: 4885 query["source_id"] = source_id 4886 if epic is not None: 4887 query["epic"] = epic 4888 if limit is not None: 4889 query["limit"] = limit 4890 if after_cursor is not None: 4891 query["after_cursor"] = after_cursor 4892 return await self._http.request( 4893 f"/api/v1/teams/{team}/tasks/search", 4894 query=query, 4895 response_type=TeamTaskSearchResponse, 4896 )
4491 async def list( 4492 self, 4493 team: str, 4494 *, 4495 user: str | None = None, 4496 org: str | None = None, 4497 status: str | None = None, 4498 owner_user: str | None = None, 4499 owner_agent: str | None = None, 4500 priority: int | None = None, 4501 tag: str | None = None, 4502 parent: str | None = None, 4503 source_scope: str | None = None, 4504 source_type: str | None = None, 4505 source_id: str | None = None, 4506 epic: str | None = None, 4507 search: str | None = None, 4508 sort: str | None = None, 4509 order: str | None = None, 4510 due_before: str | None = None, 4511 due_after: str | None = None, 4512 overdue: bool | None = None, 4513 ready: bool | None = None, 4514 attention: bool | None = None, 4515 limit: int | None = None, 4516 after_cursor: str | None = None, 4517 ) -> TeamTaskListResponse: 4518 """ 4519 List an owner's tasks 4520 Returns tasks owned by the specified user or team. You can narrow results using the 4521 optional filters below. By default results are returned in reverse chronological 4522 order (most recently created first); use `sort` and `order` to sort by due date or 4523 priority instead. 4524 User-authenticated callers may list their personal tasks or tasks for teams they 4525 have joined. Privileged callers provide the owner in the route; the owner's 4526 organization is implied by that principal. An explicit `org` is optional and, 4527 when set, must match the owner's organization. 4528 4529 Args: 4530 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4531 user: User ID (`usr_...`) for user-scoped tasks. 4532 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 4533 status: Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses. 4534 owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`). 4535 owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`). 4536 priority: Filter tasks by priority, from 0 (highest) to 4 (lowest). 4537 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 4538 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 4539 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4540 source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters. 4541 source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters. 4542 epic: Return only tasks with this exact epic label. 4543 search: Restrict results to tasks whose name or description contains this string. 4544 sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created. 4545 order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`. 4546 due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded. 4547 due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded. 4548 overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue. 4549 ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work. 4550 attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry. 4551 limit: Maximum number of tasks to return. Capped at 100. 4552 after_cursor: Opaque cursor returned by the previous page. 4553 4554 Returns: 4555 Successful response 4556 """ 4557 query: dict[str, object] = {} 4558 if user is not None: 4559 query["user"] = user 4560 if org is not None: 4561 query["org"] = org 4562 if status is not None: 4563 query["status"] = status 4564 if owner_user is not None: 4565 query["owner_user"] = owner_user 4566 if owner_agent is not None: 4567 query["owner_agent"] = owner_agent 4568 if priority is not None: 4569 query["priority"] = priority 4570 if tag is not None: 4571 query["tag"] = tag 4572 if parent is not None: 4573 query["parent"] = parent 4574 if source_scope is not None: 4575 query["source_scope"] = source_scope 4576 if source_type is not None: 4577 query["source_type"] = source_type 4578 if source_id is not None: 4579 query["source_id"] = source_id 4580 if epic is not None: 4581 query["epic"] = epic 4582 if search is not None: 4583 query["search"] = search 4584 if sort is not None: 4585 query["sort"] = sort 4586 if order is not None: 4587 query["order"] = order 4588 if due_before is not None: 4589 query["due_before"] = due_before 4590 if due_after is not None: 4591 query["due_after"] = due_after 4592 if overdue is not None: 4593 query["overdue"] = overdue 4594 if ready is not None: 4595 query["ready"] = ready 4596 if attention is not None: 4597 query["attention"] = attention 4598 if limit is not None: 4599 query["limit"] = limit 4600 if after_cursor is not None: 4601 query["after_cursor"] = after_cursor 4602 return await self._http.request( 4603 f"/api/v1/teams/{team}/tasks", 4604 query=query, 4605 response_type=TeamTaskListResponse, 4606 )
List an owner's tasks
Returns tasks owned by the specified user or team. You can narrow results using the
optional filters below. By default results are returned in reverse chronological
order (most recently created first); use sort and order to sort by due date or
priority instead.
User-authenticated callers may list their personal tasks or tasks for teams they
have joined. Privileged callers provide the owner in the route; the owner's
organization is implied by that principal. An explicit org is optional and,
when set, must match the owner's organization.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) for user-scoped tasks. - org: Optional organization (
org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. - status: Filter tasks by status. One of
"open","in_progress","in_review", or"done". Omit to return tasks in all statuses. - owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (
usr_...). - owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (
agi_...). - priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
- tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
- parent: Return only subtasks of the given task (
tsk_...), or passnoneto return only top-level tasks. - source_scope: Return only tasks whose source matches this container. Must be supplied with
source_typeandsource_id. - source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
- source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
- epic: Return only tasks with this exact epic label.
- search: Restrict results to tasks whose name or description contains this string.
- sort: Sort key. One of
"created"(default most recently created first),"due_date"(soonest due first; tasks without a due date always sort last), or"priority"(most urgent first). Ties break by most recently created. - order: Sort direction,
"asc"or"desc". Defaults to"desc"forcreatedand"asc"fordue_dateandpriority. - due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (
2026-08-01T00:00:00Z) or date (2026-08-01, meaning midnight UTC). Tasks without a due date are excluded. - due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
- overdue: When
true, return only overdue tasks: a due date before the current UTC day and a status other than"done". A task due today is not overdue. - ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
- attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry.
- limit: Maximum number of tasks to return. Capped at 100.
- after_cursor: Opaque cursor returned by the previous page.
Returns:
Successful response
4608 async def create(self, team: str, input: TeamTaskCreateInput) -> Task: 4609 """ 4610 Create a task for an owner 4611 Creates a new task owned by the specified user or team and returns the full 4612 task object. User-authenticated calls are attributed to the authenticated 4613 user or agent. App-scoped developer and server-to-server callers must provide 4614 the task's explicit `org` scope and an explicit `user` or `agent` actor for 4615 team tasks; a user-owned task reuses the user in the route unless an explicit 4616 agent is supplied. Every referenced principal is validated against the app, 4617 owner, and team membership before creation. 4618 4619 Args: 4620 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4621 input: Request body. 4622 input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner. 4623 input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. 4624 input.task: Attributes for the task to create. `name` is required; all other fields are optional. 4625 input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call. 4626 4627 Returns: 4628 The newly created task. 4629 """ 4630 return await self._http.request( 4631 f"/api/v1/teams/{team}/tasks", 4632 method="POST", 4633 body=input, 4634 response_type=Task, 4635 )
Create a task for an owner
Creates a new task owned by the specified user or team and returns the full
task object. User-authenticated calls are attributed to the authenticated
user or agent. App-scoped developer and server-to-server callers must provide
the task's explicit org scope and an explicit user or agent actor for
team tasks; a user-owned task reuses the user in the route unless an explicit
agent is supplied. Every referenced principal is validated against the app,
owner, and team membership before creation.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - input: Request body.
- input.agent: Explicit acting agent (
agi_...) for a developer or server-to-server call. Mutually exclusive with an actinguser; the agent must belong to the task owner. - input.org: Explicit organization (
org_...) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. - input.task: Attributes for the task to create.
nameis required; all other fields are optional. - input.user: User ID (
usr_...). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
Returns:
The newly created task.
4637 async def blocker_cycles( 4638 self, 4639 team: str, 4640 *, 4641 user: str | None = None, 4642 org: str | None = None, 4643 limit: int | None = None, 4644 after_cursor: str | None = None, 4645 ) -> TeamTaskBlockerCyclesResponse: 4646 """ 4647 List task blocker cycles 4648 Runs an on-demand diagnostic over unfinished tasks owned by the specified 4649 team or user and returns a forward cursor-paginated page of complete cyclic 4650 blocker components. Detection is bounded to owners with at most 100 4651 unfinished tasks. This endpoint is read-only: cycles do not prevent task 4652 updates, lease acquisition, or completion. 4653 4654 Args: 4655 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4656 user: User ID (`usr_...`) owning the tasks. 4657 org: Optional organization context for privileged callers. 4658 limit: Maximum cycle components to return. Defaults to 50; maximum is 100. 4659 after_cursor: Opaque cursor returned by the preceding page. 4660 4661 Returns: 4662 Successful response 4663 """ 4664 query: dict[str, object] = {} 4665 if user is not None: 4666 query["user"] = user 4667 if org is not None: 4668 query["org"] = org 4669 if limit is not None: 4670 query["limit"] = limit 4671 if after_cursor is not None: 4672 query["after_cursor"] = after_cursor 4673 return await self._http.request( 4674 f"/api/v1/teams/{team}/tasks/blocker_cycles", 4675 query=query, 4676 response_type=TeamTaskBlockerCyclesResponse, 4677 )
List task blocker cycles Runs an on-demand diagnostic over unfinished tasks owned by the specified team or user and returns a forward cursor-paginated page of complete cyclic blocker components. Detection is bounded to owners with at most 100 unfinished tasks. This endpoint is read-only: cycles do not prevent task updates, lease acquisition, or completion.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) owning the tasks. - org: Optional organization context for privileged callers.
- limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
- after_cursor: Opaque cursor returned by the preceding page.
Returns:
Successful response
4679 async def by_source(self, team: str, input: TeamTaskBySourceInput) -> TaskEnsureResult: 4680 """ 4681 Find or create a task by source 4682 Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted. 4683 4684 Args: 4685 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4686 input: Request body. 4687 input.agent: Explicit acting agent for privileged callers. 4688 input.description: Initial task description. 4689 input.epic: Initial epic grouping. 4690 input.name: Initial task name. 4691 input.org: Explicit organization for privileged callers. 4692 input.source_id: Source identity, for example owner/repo#123. 4693 input.source_scope: Source scope, for example github. 4694 input.source_type: Source type, for example pull_request. 4695 input.status: Initial task status. 4696 input.user: User owner, or explicit acting user on a team route. 4697 4698 Returns: 4699 The task and whether this request created it. 4700 """ 4701 return await self._http.request( 4702 f"/api/v1/teams/{team}/tasks/by-source", 4703 method="PUT", 4704 body=input, 4705 response_type=TaskEnsureResult, 4706 )
Find or create a task by source Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - input: Request body.
- input.agent: Explicit acting agent for privileged callers.
- input.description: Initial task description.
- input.epic: Initial epic grouping.
- input.name: Initial task name.
- input.org: Explicit organization for privileged callers.
- input.source_id: Source identity, for example owner/repo#123.
- input.source_scope: Source scope, for example github.
- input.source_type: Source type, for example pull_request.
- input.status: Initial task status.
- input.user: User owner, or explicit acting user on a team route.
Returns:
The task and whether this request created it.
4708 async def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse: 4709 """ 4710 Get task activity metrics for a team 4711 Returns task activity metrics scoped to one team (the Network in ArchAgents). 4712 `open` counts currently open or in-progress team tasks, `created` counts 4713 tasks inserted in the UTC-day window, and `completed` counts tasks whose 4714 `closed_at` falls in that window while still in a closed status. Hard-deleted 4715 tasks are absent from the projection and therefore omitted. The daily series 4716 is zero-filled across the requested window and includes reconstructed 4717 end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at). 4718 Any authenticated team member may read this count-only Network summary. 4719 Requests from callers without team access return 404 so team existence is 4720 not disclosed. 4721 4722 Args: 4723 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4724 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 4725 4726 Returns: 4727 Successful response 4728 """ 4729 query: dict[str, object] = {} 4730 if days is not None: 4731 query["days"] = days 4732 return await self._http.request( 4733 f"/api/v1/teams/{team}/tasks/metrics", 4734 query=query, 4735 response_type=TeamTaskMetricsResponse, 4736 )
Get task activity metrics for a team
Returns task activity metrics scoped to one team (the Network in ArchAgents).
open counts currently open or in-progress team tasks, created counts
tasks inserted in the UTC-day window, and completed counts tasks whose
closed_at falls in that window while still in a closed status. Hard-deleted
tasks are absent from the projection and therefore omitted. The daily series
is zero-filled across the requested window and includes reconstructed
end-of-day open stock (from remaining projection rows' inserted_at/closed_at).
Any authenticated team member may read this count-only Network summary.
Requests from callers without team access return 404 so team existence is
not disclosed.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:
Successful response
4738 async def ready( 4739 self, 4740 team: str, 4741 *, 4742 user: str | None = None, 4743 org: str | None = None, 4744 explain: bool | None = None, 4745 assigned_to_me: bool | None = None, 4746 source_scope: str | None = None, 4747 source_type: str | None = None, 4748 source_id: str | None = None, 4749 epic: str | None = None, 4750 limit: int | None = None, 4751 after_cursor: str | None = None, 4752 ) -> TeamTaskReadyResponse: 4753 """ 4754 List an owner's ready tasks 4755 Returns open tasks with no unfinished blockers and no active session lease. 4756 Readiness is calculated by the server from the current task projection. It is 4757 a snapshot, not a reservation; claim a task lease before starting work. 4758 Results are ordered by priority (0, the most urgent, first), then oldest 4759 first, so the first page is always the most urgent ready work. 4760 Pass `explain=true` to include every open task with a stable readiness reason. 4761 4762 Args: 4763 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4764 user: User ID (`usr_...`) owning the tasks. 4765 org: Optional organization context for privileged callers. 4766 explain: Include blocked and actively leased open tasks with exclusion reasons. 4767 assigned_to_me: Only include tasks assigned to the authenticated user. 4768 source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4769 source_type: Only include tasks whose source matches this object kind. 4770 source_id: Only include tasks whose source matches this object identity. 4771 epic: Only include tasks with this exact epic label. 4772 limit: Maximum number of readiness entries to return. Capped at 100. 4773 after_cursor: Opaque cursor returned by the previous page. 4774 4775 Returns: 4776 Successful response 4777 """ 4778 query: dict[str, object] = {} 4779 if user is not None: 4780 query["user"] = user 4781 if org is not None: 4782 query["org"] = org 4783 if explain is not None: 4784 query["explain"] = explain 4785 if assigned_to_me is not None: 4786 query["assigned_to_me"] = assigned_to_me 4787 if source_scope is not None: 4788 query["source_scope"] = source_scope 4789 if source_type is not None: 4790 query["source_type"] = source_type 4791 if source_id is not None: 4792 query["source_id"] = source_id 4793 if epic is not None: 4794 query["epic"] = epic 4795 if limit is not None: 4796 query["limit"] = limit 4797 if after_cursor is not None: 4798 query["after_cursor"] = after_cursor 4799 return await self._http.request( 4800 f"/api/v1/teams/{team}/tasks/ready", 4801 query=query, 4802 response_type=TeamTaskReadyResponse, 4803 )
List an owner's ready tasks
Returns open tasks with no unfinished blockers and no active session lease.
Readiness is calculated by the server from the current task projection. It is
a snapshot, not a reservation; claim a task lease before starting work.
Results are ordered by priority (0, the most urgent, first), then oldest
first, so the first page is always the most urgent ready work.
Pass explain=true to include every open task with a stable readiness reason.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) owning the tasks. - org: Optional organization context for privileged callers.
- explain: Include blocked and actively leased open tasks with exclusion reasons.
- assigned_to_me: Only include tasks assigned to the authenticated user.
- source_scope: Only include tasks whose source matches this container. Must be supplied with
source_typeandsource_id. - source_type: Only include tasks whose source matches this object kind.
- source_id: Only include tasks whose source matches this object identity.
- epic: Only include tasks with this exact epic label.
- limit: Maximum number of readiness entries to return. Capped at 100.
- after_cursor: Opaque cursor returned by the previous page.
Returns:
Successful response
4805 async def search( 4806 self, 4807 team: str, 4808 *, 4809 user: str | None = None, 4810 org: str | None = None, 4811 q: str | None = None, 4812 query: str | None = None, 4813 status: str | None = None, 4814 owner_user: str | None = None, 4815 owner_agent: str | None = None, 4816 priority: int | None = None, 4817 tag: str | None = None, 4818 parent: str | None = None, 4819 source_scope: str | None = None, 4820 source_type: str | None = None, 4821 source_id: str | None = None, 4822 epic: str | None = None, 4823 limit: int | None = None, 4824 after_cursor: str | None = None, 4825 ) -> TeamTaskSearchResponse: 4826 """ 4827 Search an owner's tasks 4828 Performs a full-text search over tasks owned by the specified user or team and returns 4829 matching results. Combine `q` with the optional filters to narrow the result set 4830 further. When no query is provided, the endpoint behaves like a filtered list. 4831 The `query` field in the response echoes the effective search query. 4832 User-authenticated callers may search their personal tasks or tasks for teams 4833 they have joined. Privileged callers provide the owner in the route; the owner's 4834 organization is implied by that principal. An explicit `org` is optional and, 4835 when set, must match the owner's organization. 4836 4837 Args: 4838 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 4839 user: User ID (`usr_...`) whose tasks are searched. 4840 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 4841 q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided. 4842 query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility. 4843 status: Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses. 4844 owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`). 4845 owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`). 4846 priority: Filter results by priority, from 0 (highest) to 4 (lowest). 4847 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 4848 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 4849 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 4850 source_type: Return only tasks whose source matches this object kind. 4851 source_id: Return only tasks whose source matches this object identity. 4852 epic: Return only tasks with this exact epic label. 4853 limit: Maximum number of tasks to return. Capped at 100. 4854 after_cursor: Opaque cursor returned by the previous page. 4855 4856 Returns: 4857 Successful response 4858 """ 4859 query: dict[str, object] = {} 4860 if user is not None: 4861 query["user"] = user 4862 if org is not None: 4863 query["org"] = org 4864 if q is not None: 4865 query["q"] = q 4866 if query is not None: 4867 query["query"] = query 4868 if status is not None: 4869 query["status"] = status 4870 if owner_user is not None: 4871 query["owner_user"] = owner_user 4872 if owner_agent is not None: 4873 query["owner_agent"] = owner_agent 4874 if priority is not None: 4875 query["priority"] = priority 4876 if tag is not None: 4877 query["tag"] = tag 4878 if parent is not None: 4879 query["parent"] = parent 4880 if source_scope is not None: 4881 query["source_scope"] = source_scope 4882 if source_type is not None: 4883 query["source_type"] = source_type 4884 if source_id is not None: 4885 query["source_id"] = source_id 4886 if epic is not None: 4887 query["epic"] = epic 4888 if limit is not None: 4889 query["limit"] = limit 4890 if after_cursor is not None: 4891 query["after_cursor"] = after_cursor 4892 return await self._http.request( 4893 f"/api/v1/teams/{team}/tasks/search", 4894 query=query, 4895 response_type=TeamTaskSearchResponse, 4896 )
Search an owner's tasks
Performs a full-text search over tasks owned by the specified user or team and returns
matching results. Combine q with the optional filters to narrow the result set
further. When no query is provided, the endpoint behaves like a filtered list.
The query field in the response echoes the effective search query.
User-authenticated callers may search their personal tasks or tasks for teams
they have joined. Privileged callers provide the owner in the route; the owner's
organization is implied by that principal. An explicit org is optional and,
when set, must match the owner's organization.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) whose tasks are searched. - org: Optional organization (
org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. - q: Full-text search query matched against task names and descriptions. Takes precedence over
querywhen both are provided. - query: Alias for
q. Useqwhen possible; this parameter exists for compatibility. - status: Filter results by status. One of
"open","in_progress","in_review", or"done". Omit to include all statuses. - owner_user: Restrict results to tasks assigned to the user with this public ID (
usr_...). - owner_agent: Restrict results to tasks assigned to the agent with this public ID (
agi_...). - priority: Filter results by priority, from 0 (highest) to 4 (lowest).
- tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
- parent: Return only subtasks of the given task (
tsk_...), or passnoneto return only top-level tasks. - source_scope: Return only tasks whose source matches this container. Must be supplied with
source_typeandsource_id. - source_type: Return only tasks whose source matches this object kind.
- source_id: Return only tasks whose source matches this object identity.
- epic: Return only tasks with this exact epic label.
- limit: Maximum number of tasks to return. Capped at 100.
- after_cursor: Opaque cursor returned by the previous page.
Returns:
Successful response
4899class AsyncTeamThreadResource: 4900 def __init__(self, http: HttpClient): 4901 self._http = http 4902 4903 async def list( 4904 self, team: str, *, tags: builtins.list[str] | None = None 4905 ) -> TeamThreadListResponse: 4906 """ 4907 List threads for a team 4908 Returns all threads owned by the specified team that the authenticated caller 4909 has permission to view. The caller must have access to the team; requests 4910 without team access are rejected with 404. 4911 Threads are returned in a single `data` array, ordered with the team's 4912 default thread first, then by most recent activity (newest first). Each 4913 thread carries a `last_activity` timestamp the most recent message's 4914 creation time, falling back to the thread's own creation time. Use the 4915 team-scoped thread endpoints to create, update, or delete individual 4916 threads. 4917 4918 Args: 4919 team: Team ID (`tem_...`) whose threads should be listed. 4920 tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`. 4921 4922 Returns: 4923 Successful response 4924 """ 4925 query: dict[str, object] = {} 4926 if tags is not None: 4927 query["tags"] = tags 4928 return await self._http.request( 4929 f"/api/v1/teams/{team}/threads", 4930 query=query, 4931 response_type=TeamThreadListResponse, 4932 ) 4933 4934 async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 4935 """ 4936 Create a thread for a team 4937 Creates a new thread owned by the specified team. The authenticated caller must 4938 have access to the team; requests from callers without team access are rejected 4939 with 404. 4940 If a `profile_picture` is provided in the thread params, it must be 4941 base64-encoded image data. The image is uploaded and associated with the thread 4942 before creation completes. Omit `profile_picture` to skip this step. 4943 By default the platform sends an automatic welcome message into the new thread. 4944 Pass `skip_welcome_message: true` to suppress this behavior, for example when 4945 creating threads programmatically in bulk or seeding test data. 4946 4947 Args: 4948 team: Team ID (`tem_...`) whose threads should be listed. 4949 input: Request body. 4950 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 4951 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 4952 4953 Returns: 4954 The newly created thread. 4955 """ 4956 return await self._http.request( 4957 f"/api/v1/teams/{team}/threads", 4958 method="POST", 4959 body=input, 4960 response_type=Thread, 4961 ) 4962 4963 async def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse: 4964 """ 4965 Get threads-created count for a team 4966 Returns how many **network-public** team threads were created in the UTC-day 4967 window. Counts come from realtime SQL aggregation over append-only 4968 `network_activity_events` (`thread.created` rows co-committed with create): 4969 team- or restricted-visibility threads (plus legacy open-team rows), never 4970 private or mirror. Every Network member sees the same number. Hard-delete 4971 co-commits a separate `thread.deleted` transition event and does not remove 4972 create events (metric is "created", not "still present"). Visibility flips 4973 after insert are ignored in v1. 4974 Any authenticated team member may read this count-only Network summary. 4975 Requests from callers without team access return 404 so team existence is 4976 not disclosed. 4977 4978 Args: 4979 team: Team ID (`tem_...`) whose threads should be listed. 4980 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 4981 4982 Returns: 4983 Successful response 4984 """ 4985 query: dict[str, object] = {} 4986 if days is not None: 4987 query["days"] = days 4988 return await self._http.request( 4989 f"/api/v1/teams/{team}/threads/metrics", 4990 query=query, 4991 response_type=TeamThreadMetricsResponse, 4992 )
4903 async def list( 4904 self, team: str, *, tags: builtins.list[str] | None = None 4905 ) -> TeamThreadListResponse: 4906 """ 4907 List threads for a team 4908 Returns all threads owned by the specified team that the authenticated caller 4909 has permission to view. The caller must have access to the team; requests 4910 without team access are rejected with 404. 4911 Threads are returned in a single `data` array, ordered with the team's 4912 default thread first, then by most recent activity (newest first). Each 4913 thread carries a `last_activity` timestamp the most recent message's 4914 creation time, falling back to the thread's own creation time. Use the 4915 team-scoped thread endpoints to create, update, or delete individual 4916 threads. 4917 4918 Args: 4919 team: Team ID (`tem_...`) whose threads should be listed. 4920 tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`. 4921 4922 Returns: 4923 Successful response 4924 """ 4925 query: dict[str, object] = {} 4926 if tags is not None: 4927 query["tags"] = tags 4928 return await self._http.request( 4929 f"/api/v1/teams/{team}/threads", 4930 query=query, 4931 response_type=TeamThreadListResponse, 4932 )
List threads for a team
Returns all threads owned by the specified team that the authenticated caller
has permission to view. The caller must have access to the team; requests
without team access are rejected with 404.
Threads are returned in a single data array, ordered with the team's
default thread first, then by most recent activity (newest first). Each
thread carries a last_activity timestamp the most recent message's
creation time, falling back to the thread's own creation time. Use the
team-scoped thread endpoints to create, update, or delete individual
threads.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed. - tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g.
?tags[]=blocked&tags[]=needs-review.
Returns:
Successful response
4934 async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 4935 """ 4936 Create a thread for a team 4937 Creates a new thread owned by the specified team. The authenticated caller must 4938 have access to the team; requests from callers without team access are rejected 4939 with 404. 4940 If a `profile_picture` is provided in the thread params, it must be 4941 base64-encoded image data. The image is uploaded and associated with the thread 4942 before creation completes. Omit `profile_picture` to skip this step. 4943 By default the platform sends an automatic welcome message into the new thread. 4944 Pass `skip_welcome_message: true` to suppress this behavior, for example when 4945 creating threads programmatically in bulk or seeding test data. 4946 4947 Args: 4948 team: Team ID (`tem_...`) whose threads should be listed. 4949 input: Request body. 4950 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 4951 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 4952 4953 Returns: 4954 The newly created thread. 4955 """ 4956 return await self._http.request( 4957 f"/api/v1/teams/{team}/threads", 4958 method="POST", 4959 body=input, 4960 response_type=Thread, 4961 )
Create a thread for a team
Creates a new thread owned by the specified team. The authenticated caller must
have access to the team; requests from callers without team access are rejected
with 404.
If a profile_picture is provided in the thread params, it must be
base64-encoded image data. The image is uploaded and associated with the thread
before creation completes. Omit profile_picture to skip this step.
By default the platform sends an automatic welcome message into the new thread.
Pass skip_welcome_message: true to suppress this behavior, for example when
creating threads programmatically in bulk or seeding test data.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed. - input: Request body.
- input.skip_welcome_message: When
true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults tofalse. - input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
Returns:
The newly created thread.
4963 async def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse: 4964 """ 4965 Get threads-created count for a team 4966 Returns how many **network-public** team threads were created in the UTC-day 4967 window. Counts come from realtime SQL aggregation over append-only 4968 `network_activity_events` (`thread.created` rows co-committed with create): 4969 team- or restricted-visibility threads (plus legacy open-team rows), never 4970 private or mirror. Every Network member sees the same number. Hard-delete 4971 co-commits a separate `thread.deleted` transition event and does not remove 4972 create events (metric is "created", not "still present"). Visibility flips 4973 after insert are ignored in v1. 4974 Any authenticated team member may read this count-only Network summary. 4975 Requests from callers without team access return 404 so team existence is 4976 not disclosed. 4977 4978 Args: 4979 team: Team ID (`tem_...`) whose threads should be listed. 4980 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 4981 4982 Returns: 4983 Successful response 4984 """ 4985 query: dict[str, object] = {} 4986 if days is not None: 4987 query["days"] = days 4988 return await self._http.request( 4989 f"/api/v1/teams/{team}/threads/metrics", 4990 query=query, 4991 response_type=TeamThreadMetricsResponse, 4992 )
Get threads-created count for a team
Returns how many network-public team threads were created in the UTC-day
window. Counts come from realtime SQL aggregation over append-only
network_activity_events (thread.created rows co-committed with create):
team- or restricted-visibility threads (plus legacy open-team rows), never
private or mirror. Every Network member sees the same number. Hard-delete
co-commits a separate thread.deleted transition event and does not remove
create events (metric is "created", not "still present"). Visibility flips
after insert are ignored in v1.
Any authenticated team member may read this count-only Network summary.
Requests from callers without team access return 404 so team existence is
not disclosed.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed. - days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:
Successful response
4995class AsyncTeamResource: 4996 def __init__(self, http: HttpClient): 4997 self._http = http 4998 self.custom_objects = AsyncTeamCustomObjectResource(http) 4999 self.invite = AsyncTeamInviteResource(http) 5000 self.members = AsyncMemberResource(http) 5001 self.tasks = AsyncTeamTaskResource(http) 5002 self.threads = AsyncTeamThreadResource(http) 5003 5004 async def list( 5005 self, 5006 *, 5007 page: int | None = None, 5008 page_size: int | None = None, 5009 search: str | None = None, 5010 metadata: dict[str, Any] | None = None, 5011 membership: str | None = None, 5012 ) -> TeamListResponse: 5013 """ 5014 List teams 5015 Returns a paginated list of teams visible to the authenticated user, ordered 5016 by creation time descending. Use `membership` to narrow results to teams the 5017 caller has joined or teams they are eligible to join based on their ACL 5018 visibility. 5019 Supports full-text search across team name and description via `search`, and 5020 structured metadata filtering via `metadata`. When `app` is present, results 5021 are scoped to that app and the caller must hold the corresponding app scope. 5022 5023 Args: 5024 page: Page number to retrieve, starting at 1. Defaults to 1. 5025 page_size: Number of teams to return per page. Defaults to 25. 5026 search: Full-text search string matched against team name and description. 5027 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 5028 membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams. 5029 5030 Returns: 5031 Successful response 5032 """ 5033 query: dict[str, object] = {} 5034 if page is not None: 5035 query["page"] = page 5036 if page_size is not None: 5037 query["page_size"] = page_size 5038 if search is not None: 5039 query["search"] = search 5040 if metadata is not None: 5041 query["metadata"] = metadata 5042 if membership is not None: 5043 query["membership"] = membership 5044 return await self._http.request( 5045 "/api/v1/teams", 5046 query=query, 5047 response_type=TeamListResponse, 5048 ) 5049 5050 async def create(self, input: TeamCreateInput) -> Team: 5051 """ 5052 Create a team 5053 Creates a new team and returns the created team object. The authenticated 5054 user becomes the team's owner. 5055 When `app` is supplied, the request is scoped to that app and the caller 5056 must hold the corresponding app scope. Omit `org` unless you want the team 5057 pinned to a specific organization. A default chat thread is provisioned for 5058 the team automatically after creation. 5059 5060 Args: 5061 input: Request body. 5062 input.acl: Access control configuration for the team. Controls who can discover and join the team. 5063 input.description: Optional human-readable description of the team's purpose. 5064 input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team. 5065 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 5066 input.name: Display name for the team. 5067 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 5068 5069 Returns: 5070 The newly created team. 5071 """ 5072 return await self._http.request( 5073 "/api/v1/teams", 5074 method="POST", 5075 body=input, 5076 response_type=Team, 5077 ) 5078 5079 async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 5080 """ 5081 Join a team with an invite code 5082 Adds a principal to a team using a 12-character invite code. The invite 5083 code can be supplied as either `join_code` or `invite_code`; both are 5084 accepted for backwards compatibility. 5085 For user-authenticated requests, the currently authenticated user is added 5086 to the team. For server-to-server requests, you must supply either `agent` 5087 (to add an agent) or `user` (to add a specific user by ID). If the user 5088 is already a member of the team, the request succeeds without creating a 5089 duplicate membership. 5090 This endpoint is rate-limited to 10 requests per minute per IP address to 5091 prevent invite-code enumeration. 5092 5093 Args: 5094 input: Request body. 5095 input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. 5096 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 5097 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 5098 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 5099 5100 Returns: 5101 The team the principal has joined. 5102 """ 5103 return await self._http.request( 5104 "/api/v1/teams/join_by_code", 5105 method="POST", 5106 body=input, 5107 response_type=Team, 5108 ) 5109 5110 async def delete(self, team: str) -> None: 5111 """ 5112 Delete a team 5113 Permanently deletes the team identified by `team`. This action is 5114 irreversible all team memberships, settings, and associated data are 5115 removed. 5116 The caller must be the team owner or an org admin. When `app` is present, 5117 the caller must also hold the corresponding app scope. 5118 5119 Args: 5120 team: Team ID (`team_...`) of the team to delete. 5121 5122 Returns: 5123 Empty response the team has been deleted. 5124 """ 5125 await self._http.request(f"/api/v1/teams/{team}", method="DELETE") 5126 5127 async def get(self, team: str) -> Team: 5128 """ 5129 Retrieve a team 5130 Returns the full team object for the given `team` ID, including its current 5131 member list and all associated threads. 5132 The authenticated user must be a member of the team or hold a role that 5133 grants visibility (org admin, app scope). When `app` is supplied, the 5134 caller must hold the corresponding app scope. 5135 5136 Args: 5137 team: Team ID (`team_...`) of the team to retrieve. 5138 5139 Returns: 5140 The requested team, including its members and threads. 5141 """ 5142 return await self._http.request(f"/api/v1/teams/{team}", response_type=Team) 5143 5144 async def update(self, team: str, input: TeamUpdateInput) -> Team: 5145 """ 5146 Update a team 5147 Updates one or more attributes of the team identified by `team`. Only the 5148 fields you provide are changed; omitted fields are left as-is. 5149 To replace the team's profile picture, supply the `profile_picture` object 5150 with base64-encoded image data. The previous picture is deleted after the 5151 new one is successfully uploaded. When `app` is present, the caller must hold 5152 the corresponding app scope. The caller must be a team owner or org admin. 5153 5154 Args: 5155 team: Team ID (`team_...`) of the team to update. 5156 input: Request body. 5157 input.acl: New access control configuration for the team. Replaces the existing ACL. 5158 input.description: New human-readable description of the team's purpose. 5159 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 5160 input.name: New display name for the team. 5161 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 5162 5163 Returns: 5164 The updated team with all changes applied. 5165 """ 5166 return await self._http.request( 5167 f"/api/v1/teams/{team}", 5168 method="PATCH", 5169 body=input, 5170 response_type=Team, 5171 ) 5172 5173 async def artifacts( 5174 self, team: str, *, group_key: str | None = None, group_key_prefix: str | None = None 5175 ) -> TeamArtifactsResponse: 5176 """ 5177 List a team's artifacts 5178 Returns all artifacts owned by the specified team. Artifacts represent 5179 AI-generated or user-uploaded files associated with agent sessions, 5180 threads, or sandboxes such as images, documents, and code outputs. 5181 The authenticated user must be a member of the team. Attempting to list 5182 artifacts for a team the caller does not have access to returns 404 5183 rather than 403 to avoid leaking team existence. 5184 Results are returned in a single page without cursor pagination. Each 5185 artifact in the response reflects the state of its current version, 5186 including a short-lived signed `file_url` for direct download. 5187 5188 Args: 5189 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 5190 group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match. 5191 group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key. 5192 5193 Returns: 5194 Successful response 5195 """ 5196 query: dict[str, object] = {} 5197 if group_key is not None: 5198 query["group_key"] = group_key 5199 if group_key_prefix is not None: 5200 query["group_key_prefix"] = group_key_prefix 5201 return await self._http.request( 5202 f"/api/v1/teams/{team}/artifacts", 5203 query=query, 5204 response_type=TeamArtifactsResponse, 5205 ) 5206 5207 async def dependents(self, team: str) -> TeamDeleteImpactResponse: 5208 """ 5209 Preview Team deletion impact 5210 Returns the number of stored custom-object rows that deleting this Team will 5211 physically delete. The count includes rows hidden after ordinary soft 5212 deletion. This read-only preview does not delete or restore data. 5213 5214 Args: 5215 team: Team ID (`team_...`) to inspect. 5216 5217 Returns: 5218 Stored custom-object rows and the existing physical-deletion contract. 5219 """ 5220 return await self._http.request( 5221 f"/api/v1/teams/{team}/dependents", 5222 response_type=TeamDeleteImpactResponse, 5223 ) 5224 5225 async def invites(self, team: str) -> TeamInvitesResponse: 5226 """ 5227 Create a team invite (server-to-server) 5228 Generates a new invite code for the specified team using server-to-server 5229 authentication. Unlike the user-facing create endpoint, this variant does not 5230 require the caller to be a team member it is intended for privileged 5231 back-end services acting on behalf of your platform. 5232 The returned code is a short alphanumeric string that users can present to 5233 join the team. Each call produces a new code; previously issued codes are 5234 not invalidated by this request. 5235 5236 Args: 5237 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5238 5239 Returns: 5240 Successful response 5241 """ 5242 return await self._http.request( 5243 f"/api/v1/teams/{team}/invites", 5244 method="POST", 5245 response_type=TeamInvitesResponse, 5246 ) 5247 5248 async def join(self, team: str, input: TeamJoinInput) -> None: 5249 """ 5250 Join a team 5251 Adds a principal to a team that is visible to the authenticated user. 5252 By default, the currently authenticated user joins the team. Provide `agent` 5253 to add an agent to the team instead the caller must already be a member of 5254 the team to do so. Provide `user` (by ID) or `email` to add another user from 5255 your organization the caller must be a team owner, team admin, or org admin. 5256 Only one of `agent`, `user`, or `email` may be supplied per request. 5257 If the target principal is already a member of the team, the request succeeds 5258 without creating a duplicate membership. Server-to-server callers are not 5259 permitted to use this endpoint; use the invite-code endpoint instead. 5260 5261 Args: 5262 team: Team ID (`team_...`) to join. 5263 input: Request body. 5264 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 5265 input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 5266 input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 5267 5268 Returns: 5269 Empty response the principal is now a member of the team. 5270 """ 5271 await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 5272 5273 async def leave(self, team: str) -> None: 5274 """ 5275 Leave a team 5276 Removes a principal from a team. By default, the authenticated user removes 5277 themselves from the team. Provide `agent` to remove an agent instead the 5278 caller must be a member of the team to do so. 5279 Team owners cannot leave their own team. To transfer ownership first, use 5280 the update-membership endpoint, then call this endpoint. 5281 For server-to-server requests, `user` is required to identify which user 5282 should be removed. 5283 5284 Args: 5285 team: Team ID (`team_...`) to leave. 5286 5287 Returns: 5288 Empty response the principal has been removed from the team. 5289 """ 5290 await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE") 5291 5292 async def task_assignees( 5293 self, team: str, *, org: str | None = None 5294 ) -> TeamTaskAssigneesResponse: 5295 """ 5296 List task assignees for a team 5297 Returns the list of principals users and agents that can be assigned 5298 to tasks within the team. Results include both human members and AI agents 5299 and are sorted alphabetically by display name. 5300 This endpoint is only available for team-scoped contexts. Calling it with a 5301 user-scoped owner returns a 400 error. The authenticated user must be a 5302 member of the team or hold org-admin access. App-scoped developer and 5303 server-to-server callers may list assignees for teams in their app so they 5304 can select the explicit user or agent actor required by privileged task 5305 mutations. 5306 5307 Args: 5308 team: Team ID (`tem_...`). 5309 org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization. 5310 5311 Returns: 5312 Successful response 5313 """ 5314 query: dict[str, object] = {} 5315 if org is not None: 5316 query["org"] = org 5317 return await self._http.request( 5318 f"/api/v1/teams/{team}/task_assignees", 5319 query=query, 5320 response_type=TeamTaskAssigneesResponse, 5321 ) 5322 5323 async def task_epics( 5324 self, 5325 team: str, 5326 *, 5327 user: str | None = None, 5328 org: str | None = None, 5329 source_scope: str | None = None, 5330 source_type: str | None = None, 5331 source_id: str | None = None, 5332 top_priority: int | None = None, 5333 include_closed: bool | None = None, 5334 limit: int | None = None, 5335 after_cursor: str | None = None, 5336 ) -> TeamTaskEpicsResponse: 5337 """ 5338 List an owner's epic summaries 5339 Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created. 5340 5341 Args: 5342 source_scope: Exact source scope; supply all three source fields. 5343 source_type: Exact source type. 5344 source_id: Exact source ID. 5345 top_priority: Exact highest open priority, from 0 to 4. 5346 include_closed: Include epics with no non-closed tasks; defaults to false. 5347 limit: Maximum epics; defaults to 50, capped at 100. 5348 after_cursor: Opaque forward cursor from the preceding page. 5349 5350 Returns: 5351 Successful response 5352 """ 5353 query: dict[str, object] = {} 5354 if user is not None: 5355 query["user"] = user 5356 if org is not None: 5357 query["org"] = org 5358 if source_scope is not None: 5359 query["source_scope"] = source_scope 5360 if source_type is not None: 5361 query["source_type"] = source_type 5362 if source_id is not None: 5363 query["source_id"] = source_id 5364 if top_priority is not None: 5365 query["top_priority"] = top_priority 5366 if include_closed is not None: 5367 query["include_closed"] = include_closed 5368 if limit is not None: 5369 query["limit"] = limit 5370 if after_cursor is not None: 5371 query["after_cursor"] = after_cursor 5372 return await self._http.request( 5373 f"/api/v1/teams/{team}/task_epics", 5374 query=query, 5375 response_type=TeamTaskEpicsResponse, 5376 )
4996 def __init__(self, http: HttpClient): 4997 self._http = http 4998 self.custom_objects = AsyncTeamCustomObjectResource(http) 4999 self.invite = AsyncTeamInviteResource(http) 5000 self.members = AsyncMemberResource(http) 5001 self.tasks = AsyncTeamTaskResource(http) 5002 self.threads = AsyncTeamThreadResource(http)
5004 async def list( 5005 self, 5006 *, 5007 page: int | None = None, 5008 page_size: int | None = None, 5009 search: str | None = None, 5010 metadata: dict[str, Any] | None = None, 5011 membership: str | None = None, 5012 ) -> TeamListResponse: 5013 """ 5014 List teams 5015 Returns a paginated list of teams visible to the authenticated user, ordered 5016 by creation time descending. Use `membership` to narrow results to teams the 5017 caller has joined or teams they are eligible to join based on their ACL 5018 visibility. 5019 Supports full-text search across team name and description via `search`, and 5020 structured metadata filtering via `metadata`. When `app` is present, results 5021 are scoped to that app and the caller must hold the corresponding app scope. 5022 5023 Args: 5024 page: Page number to retrieve, starting at 1. Defaults to 1. 5025 page_size: Number of teams to return per page. Defaults to 25. 5026 search: Full-text search string matched against team name and description. 5027 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 5028 membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams. 5029 5030 Returns: 5031 Successful response 5032 """ 5033 query: dict[str, object] = {} 5034 if page is not None: 5035 query["page"] = page 5036 if page_size is not None: 5037 query["page_size"] = page_size 5038 if search is not None: 5039 query["search"] = search 5040 if metadata is not None: 5041 query["metadata"] = metadata 5042 if membership is not None: 5043 query["membership"] = membership 5044 return await self._http.request( 5045 "/api/v1/teams", 5046 query=query, 5047 response_type=TeamListResponse, 5048 )
List teams
Returns a paginated list of teams visible to the authenticated user, ordered
by creation time descending. Use membership to narrow results to teams the
caller has joined or teams they are eligible to join based on their ACL
visibility.
Supports full-text search across team name and description via search, and
structured metadata filtering via metadata. When app is present, results
are scoped to that app and the caller must hold the corresponding app scope.
Arguments:
- page: Page number to retrieve, starting at 1. Defaults to 1.
- page_size: Number of teams to return per page. Defaults to 25.
- search: Full-text search string matched against team name and description.
- metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
- membership: Filter teams by membership status.
"joined"returns only teams the caller is a member of."joinable"returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
Returns:
Successful response
5050 async def create(self, input: TeamCreateInput) -> Team: 5051 """ 5052 Create a team 5053 Creates a new team and returns the created team object. The authenticated 5054 user becomes the team's owner. 5055 When `app` is supplied, the request is scoped to that app and the caller 5056 must hold the corresponding app scope. Omit `org` unless you want the team 5057 pinned to a specific organization. A default chat thread is provisioned for 5058 the team automatically after creation. 5059 5060 Args: 5061 input: Request body. 5062 input.acl: Access control configuration for the team. Controls who can discover and join the team. 5063 input.description: Optional human-readable description of the team's purpose. 5064 input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team. 5065 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 5066 input.name: Display name for the team. 5067 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 5068 5069 Returns: 5070 The newly created team. 5071 """ 5072 return await self._http.request( 5073 "/api/v1/teams", 5074 method="POST", 5075 body=input, 5076 response_type=Team, 5077 )
Create a team
Creates a new team and returns the created team object. The authenticated
user becomes the team's owner.
When app is supplied, the request is scoped to that app and the caller
must hold the corresponding app scope. Omit org unless you want the team
pinned to a specific organization. A default chat thread is provisioned for
the team automatically after creation.
Arguments:
- input: Request body.
- input.acl: Access control configuration for the team. Controls who can discover and join the team.
- input.description: Optional human-readable description of the team's purpose.
- input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
- input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
- input.name: Display name for the team.
- input.org: Organization ID (
org_...) to associate the team with. Omit to create the team without an org affiliation.
Returns:
The newly created team.
5079 async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 5080 """ 5081 Join a team with an invite code 5082 Adds a principal to a team using a 12-character invite code. The invite 5083 code can be supplied as either `join_code` or `invite_code`; both are 5084 accepted for backwards compatibility. 5085 For user-authenticated requests, the currently authenticated user is added 5086 to the team. For server-to-server requests, you must supply either `agent` 5087 (to add an agent) or `user` (to add a specific user by ID). If the user 5088 is already a member of the team, the request succeeds without creating a 5089 duplicate membership. 5090 This endpoint is rate-limited to 10 requests per minute per IP address to 5091 prevent invite-code enumeration. 5092 5093 Args: 5094 input: Request body. 5095 input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. 5096 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 5097 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 5098 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 5099 5100 Returns: 5101 The team the principal has joined. 5102 """ 5103 return await self._http.request( 5104 "/api/v1/teams/join_by_code", 5105 method="POST", 5106 body=input, 5107 response_type=Team, 5108 )
Join a team with an invite code
Adds a principal to a team using a 12-character invite code. The invite
code can be supplied as either join_code or invite_code; both are
accepted for backwards compatibility.
For user-authenticated requests, the currently authenticated user is added
to the team. For server-to-server requests, you must supply either agent
(to add an agent) or user (to add a specific user by ID). If the user
is already a member of the team, the request succeeds without creating a
duplicate membership.
This endpoint is rate-limited to 10 requests per minute per IP address to
prevent invite-code enumeration.
Arguments:
- input: Request body.
- input.agent: Agent ID (
agent_...) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. - input.invite_code: 12-character invite code alias for
join_codeaccepted for backwards compatibility. - input.join_code: 12-character invite code that identifies the team. Mutually usable with
invite_code. - input.user: User ID (
user_...) to add to the team. Required for server-to-server requests whenagentis not supplied.
Returns:
The team the principal has joined.
5110 async def delete(self, team: str) -> None: 5111 """ 5112 Delete a team 5113 Permanently deletes the team identified by `team`. This action is 5114 irreversible all team memberships, settings, and associated data are 5115 removed. 5116 The caller must be the team owner or an org admin. When `app` is present, 5117 the caller must also hold the corresponding app scope. 5118 5119 Args: 5120 team: Team ID (`team_...`) of the team to delete. 5121 5122 Returns: 5123 Empty response the team has been deleted. 5124 """ 5125 await self._http.request(f"/api/v1/teams/{team}", method="DELETE")
Delete a team
Permanently deletes the team identified by team. This action is
irreversible all team memberships, settings, and associated data are
removed.
The caller must be the team owner or an org admin. When app is present,
the caller must also hold the corresponding app scope.
Arguments:
- team: Team ID (
team_...) of the team to delete.
Returns:
Empty response the team has been deleted.
5127 async def get(self, team: str) -> Team: 5128 """ 5129 Retrieve a team 5130 Returns the full team object for the given `team` ID, including its current 5131 member list and all associated threads. 5132 The authenticated user must be a member of the team or hold a role that 5133 grants visibility (org admin, app scope). When `app` is supplied, the 5134 caller must hold the corresponding app scope. 5135 5136 Args: 5137 team: Team ID (`team_...`) of the team to retrieve. 5138 5139 Returns: 5140 The requested team, including its members and threads. 5141 """ 5142 return await self._http.request(f"/api/v1/teams/{team}", response_type=Team)
Retrieve a team
Returns the full team object for the given team ID, including its current
member list and all associated threads.
The authenticated user must be a member of the team or hold a role that
grants visibility (org admin, app scope). When app is supplied, the
caller must hold the corresponding app scope.
Arguments:
- team: Team ID (
team_...) of the team to retrieve.
Returns:
The requested team, including its members and threads.
5144 async def update(self, team: str, input: TeamUpdateInput) -> Team: 5145 """ 5146 Update a team 5147 Updates one or more attributes of the team identified by `team`. Only the 5148 fields you provide are changed; omitted fields are left as-is. 5149 To replace the team's profile picture, supply the `profile_picture` object 5150 with base64-encoded image data. The previous picture is deleted after the 5151 new one is successfully uploaded. When `app` is present, the caller must hold 5152 the corresponding app scope. The caller must be a team owner or org admin. 5153 5154 Args: 5155 team: Team ID (`team_...`) of the team to update. 5156 input: Request body. 5157 input.acl: New access control configuration for the team. Replaces the existing ACL. 5158 input.description: New human-readable description of the team's purpose. 5159 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 5160 input.name: New display name for the team. 5161 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 5162 5163 Returns: 5164 The updated team with all changes applied. 5165 """ 5166 return await self._http.request( 5167 f"/api/v1/teams/{team}", 5168 method="PATCH", 5169 body=input, 5170 response_type=Team, 5171 )
Update a team
Updates one or more attributes of the team identified by team. Only the
fields you provide are changed; omitted fields are left as-is.
To replace the team's profile picture, supply the profile_picture object
with base64-encoded image data. The previous picture is deleted after the
new one is successfully uploaded. When app is present, the caller must hold
the corresponding app scope. The caller must be a team owner or org admin.
Arguments:
- team: Team ID (
team_...) of the team to update. - input: Request body.
- input.acl: New access control configuration for the team. Replaces the existing ACL.
- input.description: New human-readable description of the team's purpose.
- input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
- input.name: New display name for the team.
- input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
Returns:
The updated team with all changes applied.
5173 async def artifacts( 5174 self, team: str, *, group_key: str | None = None, group_key_prefix: str | None = None 5175 ) -> TeamArtifactsResponse: 5176 """ 5177 List a team's artifacts 5178 Returns all artifacts owned by the specified team. Artifacts represent 5179 AI-generated or user-uploaded files associated with agent sessions, 5180 threads, or sandboxes such as images, documents, and code outputs. 5181 The authenticated user must be a member of the team. Attempting to list 5182 artifacts for a team the caller does not have access to returns 404 5183 rather than 403 to avoid leaking team existence. 5184 Results are returned in a single page without cursor pagination. Each 5185 artifact in the response reflects the state of its current version, 5186 including a short-lived signed `file_url` for direct download. 5187 5188 Args: 5189 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 5190 group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match. 5191 group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key. 5192 5193 Returns: 5194 Successful response 5195 """ 5196 query: dict[str, object] = {} 5197 if group_key is not None: 5198 query["group_key"] = group_key 5199 if group_key_prefix is not None: 5200 query["group_key_prefix"] = group_key_prefix 5201 return await self._http.request( 5202 f"/api/v1/teams/{team}/artifacts", 5203 query=query, 5204 response_type=TeamArtifactsResponse, 5205 )
List a team's artifacts
Returns all artifacts owned by the specified team. Artifacts represent
AI-generated or user-uploaded files associated with agent sessions,
threads, or sandboxes such as images, documents, and code outputs.
The authenticated user must be a member of the team. Attempting to list
artifacts for a team the caller does not have access to returns 404
rather than 403 to avoid leaking team existence.
Results are returned in a single page without cursor pagination. Each
artifact in the response reflects the state of its current version,
including a short-lived signed file_url for direct download.
Arguments:
- team: Team ID (
tea_...). The authenticated user must be a member of this team. - group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match.
- group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key.
Returns:
Successful response
5207 async def dependents(self, team: str) -> TeamDeleteImpactResponse: 5208 """ 5209 Preview Team deletion impact 5210 Returns the number of stored custom-object rows that deleting this Team will 5211 physically delete. The count includes rows hidden after ordinary soft 5212 deletion. This read-only preview does not delete or restore data. 5213 5214 Args: 5215 team: Team ID (`team_...`) to inspect. 5216 5217 Returns: 5218 Stored custom-object rows and the existing physical-deletion contract. 5219 """ 5220 return await self._http.request( 5221 f"/api/v1/teams/{team}/dependents", 5222 response_type=TeamDeleteImpactResponse, 5223 )
Preview Team deletion impact Returns the number of stored custom-object rows that deleting this Team will physically delete. The count includes rows hidden after ordinary soft deletion. This read-only preview does not delete or restore data.
Arguments:
- team: Team ID (
team_...) to inspect.
Returns:
Stored custom-object rows and the existing physical-deletion contract.
5225 async def invites(self, team: str) -> TeamInvitesResponse: 5226 """ 5227 Create a team invite (server-to-server) 5228 Generates a new invite code for the specified team using server-to-server 5229 authentication. Unlike the user-facing create endpoint, this variant does not 5230 require the caller to be a team member it is intended for privileged 5231 back-end services acting on behalf of your platform. 5232 The returned code is a short alphanumeric string that users can present to 5233 join the team. Each call produces a new code; previously issued codes are 5234 not invalidated by this request. 5235 5236 Args: 5237 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5238 5239 Returns: 5240 Successful response 5241 """ 5242 return await self._http.request( 5243 f"/api/v1/teams/{team}/invites", 5244 method="POST", 5245 response_type=TeamInvitesResponse, 5246 )
Create a team invite (server-to-server) Generates a new invite code for the specified team using server-to-server authentication. Unlike the user-facing create endpoint, this variant does not require the caller to be a team member it is intended for privileged back-end services acting on behalf of your platform. The returned code is a short alphanumeric string that users can present to join the team. Each call produces a new code; previously issued codes are not invalidated by this request.
Arguments:
- team: Team ID (
tm_...) identifying the team for which to generate the invite code.
Returns:
Successful response
5248 async def join(self, team: str, input: TeamJoinInput) -> None: 5249 """ 5250 Join a team 5251 Adds a principal to a team that is visible to the authenticated user. 5252 By default, the currently authenticated user joins the team. Provide `agent` 5253 to add an agent to the team instead the caller must already be a member of 5254 the team to do so. Provide `user` (by ID) or `email` to add another user from 5255 your organization the caller must be a team owner, team admin, or org admin. 5256 Only one of `agent`, `user`, or `email` may be supplied per request. 5257 If the target principal is already a member of the team, the request succeeds 5258 without creating a duplicate membership. Server-to-server callers are not 5259 permitted to use this endpoint; use the invite-code endpoint instead. 5260 5261 Args: 5262 team: Team ID (`team_...`) to join. 5263 input: Request body. 5264 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 5265 input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 5266 input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 5267 5268 Returns: 5269 Empty response the principal is now a member of the team. 5270 """ 5271 await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)
Join a team
Adds a principal to a team that is visible to the authenticated user.
By default, the currently authenticated user joins the team. Provide agent
to add an agent to the team instead the caller must already be a member of
the team to do so. Provide user (by ID) or email to add another user from
your organization the caller must be a team owner, team admin, or org admin.
Only one of agent, user, or email may be supplied per request.
If the target principal is already a member of the team, the request succeeds
without creating a duplicate membership. Server-to-server callers are not
permitted to use this endpoint; use the invite-code endpoint instead.
Arguments:
- team: Team ID (
team_...) to join. - input: Request body.
- input.agent: Agent ID (
agent_...) to add to the team. The caller must already be a member of the team. - input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
- input.user: User ID (
user_...) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
Returns:
Empty response the principal is now a member of the team.
5273 async def leave(self, team: str) -> None: 5274 """ 5275 Leave a team 5276 Removes a principal from a team. By default, the authenticated user removes 5277 themselves from the team. Provide `agent` to remove an agent instead the 5278 caller must be a member of the team to do so. 5279 Team owners cannot leave their own team. To transfer ownership first, use 5280 the update-membership endpoint, then call this endpoint. 5281 For server-to-server requests, `user` is required to identify which user 5282 should be removed. 5283 5284 Args: 5285 team: Team ID (`team_...`) to leave. 5286 5287 Returns: 5288 Empty response the principal has been removed from the team. 5289 """ 5290 await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
Leave a team
Removes a principal from a team. By default, the authenticated user removes
themselves from the team. Provide agent to remove an agent instead the
caller must be a member of the team to do so.
Team owners cannot leave their own team. To transfer ownership first, use
the update-membership endpoint, then call this endpoint.
For server-to-server requests, user is required to identify which user
should be removed.
Arguments:
- team: Team ID (
team_...) to leave.
Returns:
Empty response the principal has been removed from the team.
5292 async def task_assignees( 5293 self, team: str, *, org: str | None = None 5294 ) -> TeamTaskAssigneesResponse: 5295 """ 5296 List task assignees for a team 5297 Returns the list of principals users and agents that can be assigned 5298 to tasks within the team. Results include both human members and AI agents 5299 and are sorted alphabetically by display name. 5300 This endpoint is only available for team-scoped contexts. Calling it with a 5301 user-scoped owner returns a 400 error. The authenticated user must be a 5302 member of the team or hold org-admin access. App-scoped developer and 5303 server-to-server callers may list assignees for teams in their app so they 5304 can select the explicit user or agent actor required by privileged task 5305 mutations. 5306 5307 Args: 5308 team: Team ID (`tem_...`). 5309 org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization. 5310 5311 Returns: 5312 Successful response 5313 """ 5314 query: dict[str, object] = {} 5315 if org is not None: 5316 query["org"] = org 5317 return await self._http.request( 5318 f"/api/v1/teams/{team}/task_assignees", 5319 query=query, 5320 response_type=TeamTaskAssigneesResponse, 5321 )
List task assignees for a team Returns the list of principals users and agents that can be assigned to tasks within the team. Results include both human members and AI agents and are sorted alphabetically by display name. This endpoint is only available for team-scoped contexts. Calling it with a user-scoped owner returns a 400 error. The authenticated user must be a member of the team or hold org-admin access. App-scoped developer and server-to-server callers may list assignees for teams in their app so they can select the explicit user or agent actor required by privileged task mutations.
Arguments:
- team: Team ID (
tem_...). - org: Explicit organization (
org_...) for developer and server-to-server calls. Pass null for a team outside an organization.
Returns:
Successful response
5323 async def task_epics( 5324 self, 5325 team: str, 5326 *, 5327 user: str | None = None, 5328 org: str | None = None, 5329 source_scope: str | None = None, 5330 source_type: str | None = None, 5331 source_id: str | None = None, 5332 top_priority: int | None = None, 5333 include_closed: bool | None = None, 5334 limit: int | None = None, 5335 after_cursor: str | None = None, 5336 ) -> TeamTaskEpicsResponse: 5337 """ 5338 List an owner's epic summaries 5339 Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created. 5340 5341 Args: 5342 source_scope: Exact source scope; supply all three source fields. 5343 source_type: Exact source type. 5344 source_id: Exact source ID. 5345 top_priority: Exact highest open priority, from 0 to 4. 5346 include_closed: Include epics with no non-closed tasks; defaults to false. 5347 limit: Maximum epics; defaults to 50, capped at 100. 5348 after_cursor: Opaque forward cursor from the preceding page. 5349 5350 Returns: 5351 Successful response 5352 """ 5353 query: dict[str, object] = {} 5354 if user is not None: 5355 query["user"] = user 5356 if org is not None: 5357 query["org"] = org 5358 if source_scope is not None: 5359 query["source_scope"] = source_scope 5360 if source_type is not None: 5361 query["source_type"] = source_type 5362 if source_id is not None: 5363 query["source_id"] = source_id 5364 if top_priority is not None: 5365 query["top_priority"] = top_priority 5366 if include_closed is not None: 5367 query["include_closed"] = include_closed 5368 if limit is not None: 5369 query["limit"] = limit 5370 if after_cursor is not None: 5371 query["after_cursor"] = after_cursor 5372 return await self._http.request( 5373 f"/api/v1/teams/{team}/task_epics", 5374 query=query, 5375 response_type=TeamTaskEpicsResponse, 5376 )
List an owner's epic summaries Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created.
Arguments:
- source_scope: Exact source scope; supply all three source fields.
- source_type: Exact source type.
- source_id: Exact source ID.
- top_priority: Exact highest open priority, from 0 to 4.
- include_closed: Include epics with no non-closed tasks; defaults to false.
- limit: Maximum epics; defaults to 50, capped at 100.
- after_cursor: Opaque forward cursor from the preceding page.
Returns:
Successful response
5379class TeamCustomObjectResource: 5380 def __init__(self, http: SyncHttpClient): 5381 self._http = http 5382 5383 def list( 5384 self, 5385 team: str, 5386 type: str, 5387 *, 5388 limit: int | None = None, 5389 offset: int | None = None, 5390 row_key: str | None = None, 5391 sort_key: str | None = None, 5392 query: str | None = None, 5393 ) -> TeamCustomObjectListResponse: 5394 """ 5395 List a team's custom objects 5396 Returns a paginated list of custom objects owned by the specified team, 5397 filtered to a single schema type. Results are ordered by creation time 5398 descending unless `query` is provided, in which case they are ordered by 5399 full-text relevance score descending. 5400 Use `limit` and `offset` for page-based pagination. Use `row_key` or 5401 `sort_key` to narrow results to objects matching those index values. 5402 Full-text search via `query` operates only against the fields configured 5403 as `search_fields` on the schema. 5404 The authenticated user must be a member of the team with sufficient 5405 access. Returns 404 if the team is not found, the caller lacks access, 5406 or `type` does not match a registered schema for the team's organization. 5407 5408 Args: 5409 team: Team ID (`team_...`). Scopes results to objects owned by this team. 5410 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 5411 limit: Maximum number of objects to return per page. 5412 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 5413 row_key: Filter results to objects whose `row_key` exactly matches this value. 5414 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 5415 query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending. 5416 5417 Returns: 5418 Successful response 5419 """ 5420 query: dict[str, object] = {} 5421 query["type"] = type 5422 if limit is not None: 5423 query["limit"] = limit 5424 if offset is not None: 5425 query["offset"] = offset 5426 if row_key is not None: 5427 query["row_key"] = row_key 5428 if sort_key is not None: 5429 query["sort_key"] = sort_key 5430 if query is not None: 5431 query["query"] = query 5432 return self._http.request( 5433 f"/api/v1/teams/{team}/custom_objects", 5434 query=query, 5435 response_type=TeamCustomObjectListResponse, 5436 ) 5437 5438 def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 5439 """ 5440 Create a team custom object 5441 Creates a new custom object owned by the specified team. The object is 5442 instantiated against the schema identified by `type` (the schema's 5443 `lookup_key`). All field values are validated against that schema's 5444 field definitions before the object is persisted. 5445 The authenticated user must be a member of the team with sufficient 5446 access. If the team is not found or the caller lacks access, the endpoint 5447 returns 404. If `type` does not match a registered schema for the team's 5448 organization, the endpoint also returns 404. 5449 5450 Args: 5451 team: Team ID (`team_...`). Scopes results to objects owned by this team. 5452 input: Request body. 5453 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 5454 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 5455 5456 Returns: 5457 The newly created custom object. 5458 """ 5459 return self._http.request( 5460 f"/api/v1/teams/{team}/custom_objects", 5461 method="POST", 5462 body=input, 5463 response_type=CustomObject, 5464 )
5383 def list( 5384 self, 5385 team: str, 5386 type: str, 5387 *, 5388 limit: int | None = None, 5389 offset: int | None = None, 5390 row_key: str | None = None, 5391 sort_key: str | None = None, 5392 query: str | None = None, 5393 ) -> TeamCustomObjectListResponse: 5394 """ 5395 List a team's custom objects 5396 Returns a paginated list of custom objects owned by the specified team, 5397 filtered to a single schema type. Results are ordered by creation time 5398 descending unless `query` is provided, in which case they are ordered by 5399 full-text relevance score descending. 5400 Use `limit` and `offset` for page-based pagination. Use `row_key` or 5401 `sort_key` to narrow results to objects matching those index values. 5402 Full-text search via `query` operates only against the fields configured 5403 as `search_fields` on the schema. 5404 The authenticated user must be a member of the team with sufficient 5405 access. Returns 404 if the team is not found, the caller lacks access, 5406 or `type` does not match a registered schema for the team's organization. 5407 5408 Args: 5409 team: Team ID (`team_...`). Scopes results to objects owned by this team. 5410 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 5411 limit: Maximum number of objects to return per page. 5412 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 5413 row_key: Filter results to objects whose `row_key` exactly matches this value. 5414 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 5415 query: Full-text search string matched against the schema's configured `search_fields`. When provided, results are ordered by relevance score descending instead of creation time descending. 5416 5417 Returns: 5418 Successful response 5419 """ 5420 query: dict[str, object] = {} 5421 query["type"] = type 5422 if limit is not None: 5423 query["limit"] = limit 5424 if offset is not None: 5425 query["offset"] = offset 5426 if row_key is not None: 5427 query["row_key"] = row_key 5428 if sort_key is not None: 5429 query["sort_key"] = sort_key 5430 if query is not None: 5431 query["query"] = query 5432 return self._http.request( 5433 f"/api/v1/teams/{team}/custom_objects", 5434 query=query, 5435 response_type=TeamCustomObjectListResponse, 5436 )
List a team's custom objects
Returns a paginated list of custom objects owned by the specified team,
filtered to a single schema type. Results are ordered by creation time
descending unless query is provided, in which case they are ordered by
full-text relevance score descending.
Use limit and offset for page-based pagination. Use row_key or
sort_key to narrow results to objects matching those index values.
Full-text search via query operates only against the fields configured
as search_fields on the schema.
The authenticated user must be a member of the team with sufficient
access. Returns 404 if the team is not found, the caller lacks access,
or type does not match a registered schema for the team's organization.
Arguments:
- team: Team ID (
team_...). Scopes results to objects owned by this team. - type: Schema type identifier (
lookup_key) that filters results to objects of this schema. - limit: Maximum number of objects to return per page.
- offset: Number of objects to skip before returning results. Use with
limitfor page-based pagination. - row_key: Filter results to objects whose
row_keyexactly matches this value. - sort_key: Filter results to objects whose
sort_keyexactly matches this value. - query: Full-text search string matched against the schema's configured
search_fields. When provided, results are ordered by relevance score descending instead of creation time descending.
Returns:
Successful response
5438 def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 5439 """ 5440 Create a team custom object 5441 Creates a new custom object owned by the specified team. The object is 5442 instantiated against the schema identified by `type` (the schema's 5443 `lookup_key`). All field values are validated against that schema's 5444 field definitions before the object is persisted. 5445 The authenticated user must be a member of the team with sufficient 5446 access. If the team is not found or the caller lacks access, the endpoint 5447 returns 404. If `type` does not match a registered schema for the team's 5448 organization, the endpoint also returns 404. 5449 5450 Args: 5451 team: Team ID (`team_...`). Scopes results to objects owned by this team. 5452 input: Request body. 5453 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 5454 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 5455 5456 Returns: 5457 The newly created custom object. 5458 """ 5459 return self._http.request( 5460 f"/api/v1/teams/{team}/custom_objects", 5461 method="POST", 5462 body=input, 5463 response_type=CustomObject, 5464 )
Create a team custom object
Creates a new custom object owned by the specified team. The object is
instantiated against the schema identified by type (the schema's
lookup_key). All field values are validated against that schema's
field definitions before the object is persisted.
The authenticated user must be a member of the team with sufficient
access. If the team is not found or the caller lacks access, the endpoint
returns 404. If type does not match a registered schema for the team's
organization, the endpoint also returns 404.
Arguments:
- team: Team ID (
team_...). Scopes results to objects owned by this team. - input: Request body.
- input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by
type. - input.type: Schema type identifier (
lookup_key) that defines the object's fields and validation rules.
Returns:
The newly created custom object.
5467class TeamInviteResource: 5468 def __init__(self, http: SyncHttpClient): 5469 self._http = http 5470 5471 def create(self, team: str) -> TeamInvite: 5472 """ 5473 Create a team invite 5474 Generates a new invite code for the specified team. The authenticated user 5475 must be a member of the team with the `owner` or `admin` role. 5476 The returned code is a short alphanumeric string that other users can 5477 present to join the team. Each call produces a new code; previously issued 5478 codes are not invalidated by this request. Codes expire after seven days. 5479 Sharing a code intentionally grants membership across organizations within 5480 the same application, including access to objects shared with team members. 5481 Treat it as a bearer credential. Revoke an individual code with 5482 DELETE /api/v1/teams/:team/invite/:code before issuing a replacement. 5483 Revocation does not remove existing members or their access. 5484 5485 Args: 5486 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5487 5488 Returns: 5489 The newly created team invite containing the join code. 5490 """ 5491 return self._http.request( 5492 f"/api/v1/teams/{team}/invite", 5493 method="POST", 5494 response_type=TeamInvite, 5495 ) 5496 5497 def delete(self, team: str, code: str) -> None: 5498 """ 5499 Revoke a team invite code 5500 Deletes one invite code for this team. Requires an owner or admin membership. 5501 Future redemption returns 404, as for an unknown or expired code. Existing 5502 memberships and their access are unchanged; remove members separately to end 5503 their access. Redemption already in flight is not cancelled. 5504 To replace a code, revoke it and then create a new invite. Creating a new 5505 invite alone does not invalidate any previous code. Other codes remain valid. 5506 5507 Args: 5508 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5509 code: The invite code to revoke. 5510 5511 Returns: 5512 No content 5513 """ 5514 self._http.request(f"/api/v1/teams/{team}/invite/{code}", method="DELETE")
5471 def create(self, team: str) -> TeamInvite: 5472 """ 5473 Create a team invite 5474 Generates a new invite code for the specified team. The authenticated user 5475 must be a member of the team with the `owner` or `admin` role. 5476 The returned code is a short alphanumeric string that other users can 5477 present to join the team. Each call produces a new code; previously issued 5478 codes are not invalidated by this request. Codes expire after seven days. 5479 Sharing a code intentionally grants membership across organizations within 5480 the same application, including access to objects shared with team members. 5481 Treat it as a bearer credential. Revoke an individual code with 5482 DELETE /api/v1/teams/:team/invite/:code before issuing a replacement. 5483 Revocation does not remove existing members or their access. 5484 5485 Args: 5486 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5487 5488 Returns: 5489 The newly created team invite containing the join code. 5490 """ 5491 return self._http.request( 5492 f"/api/v1/teams/{team}/invite", 5493 method="POST", 5494 response_type=TeamInvite, 5495 )
Create a team invite
Generates a new invite code for the specified team. The authenticated user
must be a member of the team with the owner or admin role.
The returned code is a short alphanumeric string that other users can
present to join the team. Each call produces a new code; previously issued
codes are not invalidated by this request. Codes expire after seven days.
Sharing a code intentionally grants membership across organizations within
the same application, including access to objects shared with team members.
Treat it as a bearer credential. Revoke an individual code with
DELETE /api/v1/teams/:team/invite/:code before issuing a replacement.
Revocation does not remove existing members or their access.
Arguments:
- team: Team ID (
tm_...) identifying the team for which to generate the invite code.
Returns:
The newly created team invite containing the join code.
5497 def delete(self, team: str, code: str) -> None: 5498 """ 5499 Revoke a team invite code 5500 Deletes one invite code for this team. Requires an owner or admin membership. 5501 Future redemption returns 404, as for an unknown or expired code. Existing 5502 memberships and their access are unchanged; remove members separately to end 5503 their access. Redemption already in flight is not cancelled. 5504 To replace a code, revoke it and then create a new invite. Creating a new 5505 invite alone does not invalidate any previous code. Other codes remain valid. 5506 5507 Args: 5508 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 5509 code: The invite code to revoke. 5510 5511 Returns: 5512 No content 5513 """ 5514 self._http.request(f"/api/v1/teams/{team}/invite/{code}", method="DELETE")
Revoke a team invite code Deletes one invite code for this team. Requires an owner or admin membership. Future redemption returns 404, as for an unknown or expired code. Existing memberships and their access are unchanged; remove members separately to end their access. Redemption already in flight is not cancelled. To replace a code, revoke it and then create a new invite. Creating a new invite alone does not invalidate any previous code. Other codes remain valid.
Arguments:
- team: Team ID (
tm_...) identifying the team for which to generate the invite code. - code: The invite code to revoke.
Returns:
No content
5517class MemberResource: 5518 def __init__(self, http: SyncHttpClient): 5519 self._http = http 5520 5521 def remove(self, team: str) -> None: 5522 """ 5523 Remove a member or org from a team 5524 Removes a user, agent, or all members of an organization from the specified 5525 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 5526 one or none returns a 400 error. On success, returns 204 No Content. 5527 When `org` is provided, every user and agent membership belonging to that org 5528 is removed in a single call. The caller must be a member of the team's owning 5529 org to perform an org-scoped removal. You cannot target the team's owning org 5530 itself with this parameter. 5531 The caller must have permission to manage the team. When `app` is present, the 5532 request is scoped to that app and requires a valid app-scoped token. 5533 5534 Args: 5535 team: Team ID (`team_...`). The team to remove the member from. 5536 5537 Returns: 5538 Empty response. Returns 204 No Content on success. 5539 """ 5540 self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 5541 5542 def list(self, team: str) -> MemberListResponse: 5543 """ 5544 List members of a team 5545 Returns all members of the specified team, including both users and agents. 5546 Members are returned in a single non-paginated array ordered by join time. 5547 Bearer-authenticated users must be a member of the team to retrieve its 5548 member list. Developer and server-to-server callers can retrieve members for 5549 any team visible to their app scope. When `app` is provided, the request is 5550 scoped to that app and requires a valid app-scoped token. 5551 5552 Args: 5553 team: Team ID (`team_...`). The team to remove the member from. 5554 5555 Returns: 5556 Successful response 5557 """ 5558 return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse) 5559 5560 def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 5561 """ 5562 Add a member to a team 5563 Adds a user or agent as a member of the specified team and returns the new 5564 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 5565 both or neither returns a 400 error. 5566 Adding a user requires permission to manage the team (team owner, team 5567 admin, or org admin). Adding an agent with the default `"member"` role is 5568 also open to any existing member of the team; assigning an elevated role to 5569 an agent still requires team-manage permission. When an `app` is provided, 5570 the request is scoped to that app and the caller must hold a valid app-scoped 5571 token. The default role is `"member"` when `role` is omitted. 5572 5573 Args: 5574 team: Team ID (`team_...`). The team to remove the member from. 5575 input: Request body. 5576 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 5577 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 5578 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 5579 5580 Returns: 5581 The newly created team membership. 5582 """ 5583 return self._http.request( 5584 f"/api/v1/teams/{team}/members", 5585 method="POST", 5586 body=input, 5587 response_type=TeamMembership, 5588 ) 5589 5590 def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 5591 """ 5592 Update a team member's role 5593 Changes the role of an existing user member on the specified team. Returns the 5594 updated membership on success. 5595 Only user memberships are supported by this endpoint. Attempting to update an 5596 agent membership returns 404. To change an agent's role, remove the existing 5597 membership and re-add the agent with the desired role. 5598 The caller must have permission to modify the team. You cannot change a member's 5599 role across organization boundaries. Demoting the last owner of a team returns 5600 409. An invalid `role` value returns 422. When `app` is provided, the request 5601 is scoped to that app and requires a valid app-scoped token. 5602 5603 Args: 5604 team: Team ID (`team_...`). The team to remove the member from. 5605 user: User ID (`usr_...`) of the existing member whose role should be changed. 5606 input: Request body. 5607 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 5608 5609 Returns: 5610 The updated team membership reflecting the new role. 5611 """ 5612 return self._http.request( 5613 f"/api/v1/teams/{team}/members/{user}", 5614 method="PATCH", 5615 body=input, 5616 response_type=TeamMembership, 5617 )
5521 def remove(self, team: str) -> None: 5522 """ 5523 Remove a member or org from a team 5524 Removes a user, agent, or all members of an organization from the specified 5525 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 5526 one or none returns a 400 error. On success, returns 204 No Content. 5527 When `org` is provided, every user and agent membership belonging to that org 5528 is removed in a single call. The caller must be a member of the team's owning 5529 org to perform an org-scoped removal. You cannot target the team's owning org 5530 itself with this parameter. 5531 The caller must have permission to manage the team. When `app` is present, the 5532 request is scoped to that app and requires a valid app-scoped token. 5533 5534 Args: 5535 team: Team ID (`team_...`). The team to remove the member from. 5536 5537 Returns: 5538 Empty response. Returns 204 No Content on success. 5539 """ 5540 self._http.request(f"/api/v1/teams/{team}/members", method="DELETE")
Remove a member or org from a team
Removes a user, agent, or all members of an organization from the specified
team. Provide exactly one of user, agent, or org supplying more than
one or none returns a 400 error. On success, returns 204 No Content.
When org is provided, every user and agent membership belonging to that org
is removed in a single call. The caller must be a member of the team's owning
org to perform an org-scoped removal. You cannot target the team's owning org
itself with this parameter.
The caller must have permission to manage the team. When app is present, the
request is scoped to that app and requires a valid app-scoped token.
Arguments:
- team: Team ID (
team_...). The team to remove the member from.
Returns:
Empty response. Returns 204 No Content on success.
5542 def list(self, team: str) -> MemberListResponse: 5543 """ 5544 List members of a team 5545 Returns all members of the specified team, including both users and agents. 5546 Members are returned in a single non-paginated array ordered by join time. 5547 Bearer-authenticated users must be a member of the team to retrieve its 5548 member list. Developer and server-to-server callers can retrieve members for 5549 any team visible to their app scope. When `app` is provided, the request is 5550 scoped to that app and requires a valid app-scoped token. 5551 5552 Args: 5553 team: Team ID (`team_...`). The team to remove the member from. 5554 5555 Returns: 5556 Successful response 5557 """ 5558 return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse)
List members of a team
Returns all members of the specified team, including both users and agents.
Members are returned in a single non-paginated array ordered by join time.
Bearer-authenticated users must be a member of the team to retrieve its
member list. Developer and server-to-server callers can retrieve members for
any team visible to their app scope. When app is provided, the request is
scoped to that app and requires a valid app-scoped token.
Arguments:
- team: Team ID (
team_...). The team to remove the member from.
Returns:
Successful response
5560 def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 5561 """ 5562 Add a member to a team 5563 Adds a user or agent as a member of the specified team and returns the new 5564 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 5565 both or neither returns a 400 error. 5566 Adding a user requires permission to manage the team (team owner, team 5567 admin, or org admin). Adding an agent with the default `"member"` role is 5568 also open to any existing member of the team; assigning an elevated role to 5569 an agent still requires team-manage permission. When an `app` is provided, 5570 the request is scoped to that app and the caller must hold a valid app-scoped 5571 token. The default role is `"member"` when `role` is omitted. 5572 5573 Args: 5574 team: Team ID (`team_...`). The team to remove the member from. 5575 input: Request body. 5576 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 5577 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 5578 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 5579 5580 Returns: 5581 The newly created team membership. 5582 """ 5583 return self._http.request( 5584 f"/api/v1/teams/{team}/members", 5585 method="POST", 5586 body=input, 5587 response_type=TeamMembership, 5588 )
Add a member to a team
Adds a user or agent as a member of the specified team and returns the new
membership with HTTP 201. Provide exactly one of user or agent supplying
both or neither returns a 400 error.
Adding a user requires permission to manage the team (team owner, team
admin, or org admin). Adding an agent with the default "member" role is
also open to any existing member of the team; assigning an elevated role to
an agent still requires team-manage permission. When an app is provided,
the request is scoped to that app and the caller must hold a valid app-scoped
token. The default role is "member" when role is omitted.
Arguments:
- team: Team ID (
team_...). The team to remove the member from. - input: Request body.
- input.agent: Agent ID (
agt_...) to add as a member. Provide exactly one ofuseroragent. - input.role: Role to assign. One of
"owner","admin", or"member". Defaults to"member"when omitted. - input.user: User ID (
usr_...) to add as a member. Provide exactly one ofuseroragent.
Returns:
The newly created team membership.
5590 def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 5591 """ 5592 Update a team member's role 5593 Changes the role of an existing user member on the specified team. Returns the 5594 updated membership on success. 5595 Only user memberships are supported by this endpoint. Attempting to update an 5596 agent membership returns 404. To change an agent's role, remove the existing 5597 membership and re-add the agent with the desired role. 5598 The caller must have permission to modify the team. You cannot change a member's 5599 role across organization boundaries. Demoting the last owner of a team returns 5600 409. An invalid `role` value returns 422. When `app` is provided, the request 5601 is scoped to that app and requires a valid app-scoped token. 5602 5603 Args: 5604 team: Team ID (`team_...`). The team to remove the member from. 5605 user: User ID (`usr_...`) of the existing member whose role should be changed. 5606 input: Request body. 5607 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 5608 5609 Returns: 5610 The updated team membership reflecting the new role. 5611 """ 5612 return self._http.request( 5613 f"/api/v1/teams/{team}/members/{user}", 5614 method="PATCH", 5615 body=input, 5616 response_type=TeamMembership, 5617 )
Update a team member's role Changes the role of an existing user member on the specified team. Returns the updated membership on success. Only user memberships are supported by this endpoint. Attempting to update an agent membership returns 404. To change an agent's role, remove the existing membership and re-add the agent with the desired role. The caller must have permission to modify the team. You cannot change a member's role across organization boundaries. Demoting the last owner of a team returns
- An invalid
rolevalue returns 422. Whenappis provided, the request is scoped to that app and requires a valid app-scoped token.
Arguments:
- team: Team ID (
team_...). The team to remove the member from. - user: User ID (
usr_...) of the existing member whose role should be changed. - input: Request body.
- input.role: New role to assign. One of
"owner","admin", or"member".
Returns:
The updated team membership reflecting the new role.
5620class TeamTaskResource: 5621 def __init__(self, http: SyncHttpClient): 5622 self._http = http 5623 5624 def list( 5625 self, 5626 team: str, 5627 *, 5628 user: str | None = None, 5629 org: str | None = None, 5630 status: str | None = None, 5631 owner_user: str | None = None, 5632 owner_agent: str | None = None, 5633 priority: int | None = None, 5634 tag: str | None = None, 5635 parent: str | None = None, 5636 source_scope: str | None = None, 5637 source_type: str | None = None, 5638 source_id: str | None = None, 5639 epic: str | None = None, 5640 search: str | None = None, 5641 sort: str | None = None, 5642 order: str | None = None, 5643 due_before: str | None = None, 5644 due_after: str | None = None, 5645 overdue: bool | None = None, 5646 ready: bool | None = None, 5647 attention: bool | None = None, 5648 limit: int | None = None, 5649 after_cursor: str | None = None, 5650 ) -> TeamTaskListResponse: 5651 """ 5652 List an owner's tasks 5653 Returns tasks owned by the specified user or team. You can narrow results using the 5654 optional filters below. By default results are returned in reverse chronological 5655 order (most recently created first); use `sort` and `order` to sort by due date or 5656 priority instead. 5657 User-authenticated callers may list their personal tasks or tasks for teams they 5658 have joined. Privileged callers provide the owner in the route; the owner's 5659 organization is implied by that principal. An explicit `org` is optional and, 5660 when set, must match the owner's organization. 5661 5662 Args: 5663 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5664 user: User ID (`usr_...`) for user-scoped tasks. 5665 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 5666 status: Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses. 5667 owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`). 5668 owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`). 5669 priority: Filter tasks by priority, from 0 (highest) to 4 (lowest). 5670 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 5671 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 5672 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5673 source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters. 5674 source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters. 5675 epic: Return only tasks with this exact epic label. 5676 search: Restrict results to tasks whose name or description contains this string. 5677 sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created. 5678 order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`. 5679 due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded. 5680 due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded. 5681 overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue. 5682 ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work. 5683 attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry. 5684 limit: Maximum number of tasks to return. Capped at 100. 5685 after_cursor: Opaque cursor returned by the previous page. 5686 5687 Returns: 5688 Successful response 5689 """ 5690 query: dict[str, object] = {} 5691 if user is not None: 5692 query["user"] = user 5693 if org is not None: 5694 query["org"] = org 5695 if status is not None: 5696 query["status"] = status 5697 if owner_user is not None: 5698 query["owner_user"] = owner_user 5699 if owner_agent is not None: 5700 query["owner_agent"] = owner_agent 5701 if priority is not None: 5702 query["priority"] = priority 5703 if tag is not None: 5704 query["tag"] = tag 5705 if parent is not None: 5706 query["parent"] = parent 5707 if source_scope is not None: 5708 query["source_scope"] = source_scope 5709 if source_type is not None: 5710 query["source_type"] = source_type 5711 if source_id is not None: 5712 query["source_id"] = source_id 5713 if epic is not None: 5714 query["epic"] = epic 5715 if search is not None: 5716 query["search"] = search 5717 if sort is not None: 5718 query["sort"] = sort 5719 if order is not None: 5720 query["order"] = order 5721 if due_before is not None: 5722 query["due_before"] = due_before 5723 if due_after is not None: 5724 query["due_after"] = due_after 5725 if overdue is not None: 5726 query["overdue"] = overdue 5727 if ready is not None: 5728 query["ready"] = ready 5729 if attention is not None: 5730 query["attention"] = attention 5731 if limit is not None: 5732 query["limit"] = limit 5733 if after_cursor is not None: 5734 query["after_cursor"] = after_cursor 5735 return self._http.request( 5736 f"/api/v1/teams/{team}/tasks", 5737 query=query, 5738 response_type=TeamTaskListResponse, 5739 ) 5740 5741 def create(self, team: str, input: TeamTaskCreateInput) -> Task: 5742 """ 5743 Create a task for an owner 5744 Creates a new task owned by the specified user or team and returns the full 5745 task object. User-authenticated calls are attributed to the authenticated 5746 user or agent. App-scoped developer and server-to-server callers must provide 5747 the task's explicit `org` scope and an explicit `user` or `agent` actor for 5748 team tasks; a user-owned task reuses the user in the route unless an explicit 5749 agent is supplied. Every referenced principal is validated against the app, 5750 owner, and team membership before creation. 5751 5752 Args: 5753 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5754 input: Request body. 5755 input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner. 5756 input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. 5757 input.task: Attributes for the task to create. `name` is required; all other fields are optional. 5758 input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call. 5759 5760 Returns: 5761 The newly created task. 5762 """ 5763 return self._http.request( 5764 f"/api/v1/teams/{team}/tasks", 5765 method="POST", 5766 body=input, 5767 response_type=Task, 5768 ) 5769 5770 def blocker_cycles( 5771 self, 5772 team: str, 5773 *, 5774 user: str | None = None, 5775 org: str | None = None, 5776 limit: int | None = None, 5777 after_cursor: str | None = None, 5778 ) -> TeamTaskBlockerCyclesResponse: 5779 """ 5780 List task blocker cycles 5781 Runs an on-demand diagnostic over unfinished tasks owned by the specified 5782 team or user and returns a forward cursor-paginated page of complete cyclic 5783 blocker components. Detection is bounded to owners with at most 100 5784 unfinished tasks. This endpoint is read-only: cycles do not prevent task 5785 updates, lease acquisition, or completion. 5786 5787 Args: 5788 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5789 user: User ID (`usr_...`) owning the tasks. 5790 org: Optional organization context for privileged callers. 5791 limit: Maximum cycle components to return. Defaults to 50; maximum is 100. 5792 after_cursor: Opaque cursor returned by the preceding page. 5793 5794 Returns: 5795 Successful response 5796 """ 5797 query: dict[str, object] = {} 5798 if user is not None: 5799 query["user"] = user 5800 if org is not None: 5801 query["org"] = org 5802 if limit is not None: 5803 query["limit"] = limit 5804 if after_cursor is not None: 5805 query["after_cursor"] = after_cursor 5806 return self._http.request( 5807 f"/api/v1/teams/{team}/tasks/blocker_cycles", 5808 query=query, 5809 response_type=TeamTaskBlockerCyclesResponse, 5810 ) 5811 5812 def by_source(self, team: str, input: TeamTaskBySourceInput) -> TaskEnsureResult: 5813 """ 5814 Find or create a task by source 5815 Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted. 5816 5817 Args: 5818 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5819 input: Request body. 5820 input.agent: Explicit acting agent for privileged callers. 5821 input.description: Initial task description. 5822 input.epic: Initial epic grouping. 5823 input.name: Initial task name. 5824 input.org: Explicit organization for privileged callers. 5825 input.source_id: Source identity, for example owner/repo#123. 5826 input.source_scope: Source scope, for example github. 5827 input.source_type: Source type, for example pull_request. 5828 input.status: Initial task status. 5829 input.user: User owner, or explicit acting user on a team route. 5830 5831 Returns: 5832 The task and whether this request created it. 5833 """ 5834 return self._http.request( 5835 f"/api/v1/teams/{team}/tasks/by-source", 5836 method="PUT", 5837 body=input, 5838 response_type=TaskEnsureResult, 5839 ) 5840 5841 def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse: 5842 """ 5843 Get task activity metrics for a team 5844 Returns task activity metrics scoped to one team (the Network in ArchAgents). 5845 `open` counts currently open or in-progress team tasks, `created` counts 5846 tasks inserted in the UTC-day window, and `completed` counts tasks whose 5847 `closed_at` falls in that window while still in a closed status. Hard-deleted 5848 tasks are absent from the projection and therefore omitted. The daily series 5849 is zero-filled across the requested window and includes reconstructed 5850 end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at). 5851 Any authenticated team member may read this count-only Network summary. 5852 Requests from callers without team access return 404 so team existence is 5853 not disclosed. 5854 5855 Args: 5856 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5857 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 5858 5859 Returns: 5860 Successful response 5861 """ 5862 query: dict[str, object] = {} 5863 if days is not None: 5864 query["days"] = days 5865 return self._http.request( 5866 f"/api/v1/teams/{team}/tasks/metrics", 5867 query=query, 5868 response_type=TeamTaskMetricsResponse, 5869 ) 5870 5871 def ready( 5872 self, 5873 team: str, 5874 *, 5875 user: str | None = None, 5876 org: str | None = None, 5877 explain: bool | None = None, 5878 assigned_to_me: bool | None = None, 5879 source_scope: str | None = None, 5880 source_type: str | None = None, 5881 source_id: str | None = None, 5882 epic: str | None = None, 5883 limit: int | None = None, 5884 after_cursor: str | None = None, 5885 ) -> TeamTaskReadyResponse: 5886 """ 5887 List an owner's ready tasks 5888 Returns open tasks with no unfinished blockers and no active session lease. 5889 Readiness is calculated by the server from the current task projection. It is 5890 a snapshot, not a reservation; claim a task lease before starting work. 5891 Results are ordered by priority (0, the most urgent, first), then oldest 5892 first, so the first page is always the most urgent ready work. 5893 Pass `explain=true` to include every open task with a stable readiness reason. 5894 5895 Args: 5896 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5897 user: User ID (`usr_...`) owning the tasks. 5898 org: Optional organization context for privileged callers. 5899 explain: Include blocked and actively leased open tasks with exclusion reasons. 5900 assigned_to_me: Only include tasks assigned to the authenticated user. 5901 source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5902 source_type: Only include tasks whose source matches this object kind. 5903 source_id: Only include tasks whose source matches this object identity. 5904 epic: Only include tasks with this exact epic label. 5905 limit: Maximum number of readiness entries to return. Capped at 100. 5906 after_cursor: Opaque cursor returned by the previous page. 5907 5908 Returns: 5909 Successful response 5910 """ 5911 query: dict[str, object] = {} 5912 if user is not None: 5913 query["user"] = user 5914 if org is not None: 5915 query["org"] = org 5916 if explain is not None: 5917 query["explain"] = explain 5918 if assigned_to_me is not None: 5919 query["assigned_to_me"] = assigned_to_me 5920 if source_scope is not None: 5921 query["source_scope"] = source_scope 5922 if source_type is not None: 5923 query["source_type"] = source_type 5924 if source_id is not None: 5925 query["source_id"] = source_id 5926 if epic is not None: 5927 query["epic"] = epic 5928 if limit is not None: 5929 query["limit"] = limit 5930 if after_cursor is not None: 5931 query["after_cursor"] = after_cursor 5932 return self._http.request( 5933 f"/api/v1/teams/{team}/tasks/ready", 5934 query=query, 5935 response_type=TeamTaskReadyResponse, 5936 ) 5937 5938 def search( 5939 self, 5940 team: str, 5941 *, 5942 user: str | None = None, 5943 org: str | None = None, 5944 q: str | None = None, 5945 query: str | None = None, 5946 status: str | None = None, 5947 owner_user: str | None = None, 5948 owner_agent: str | None = None, 5949 priority: int | None = None, 5950 tag: str | None = None, 5951 parent: str | None = None, 5952 source_scope: str | None = None, 5953 source_type: str | None = None, 5954 source_id: str | None = None, 5955 epic: str | None = None, 5956 limit: int | None = None, 5957 after_cursor: str | None = None, 5958 ) -> TeamTaskSearchResponse: 5959 """ 5960 Search an owner's tasks 5961 Performs a full-text search over tasks owned by the specified user or team and returns 5962 matching results. Combine `q` with the optional filters to narrow the result set 5963 further. When no query is provided, the endpoint behaves like a filtered list. 5964 The `query` field in the response echoes the effective search query. 5965 User-authenticated callers may search their personal tasks or tasks for teams 5966 they have joined. Privileged callers provide the owner in the route; the owner's 5967 organization is implied by that principal. An explicit `org` is optional and, 5968 when set, must match the owner's organization. 5969 5970 Args: 5971 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5972 user: User ID (`usr_...`) whose tasks are searched. 5973 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 5974 q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided. 5975 query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility. 5976 status: Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses. 5977 owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`). 5978 owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`). 5979 priority: Filter results by priority, from 0 (highest) to 4 (lowest). 5980 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 5981 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 5982 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5983 source_type: Return only tasks whose source matches this object kind. 5984 source_id: Return only tasks whose source matches this object identity. 5985 epic: Return only tasks with this exact epic label. 5986 limit: Maximum number of tasks to return. Capped at 100. 5987 after_cursor: Opaque cursor returned by the previous page. 5988 5989 Returns: 5990 Successful response 5991 """ 5992 query: dict[str, object] = {} 5993 if user is not None: 5994 query["user"] = user 5995 if org is not None: 5996 query["org"] = org 5997 if q is not None: 5998 query["q"] = q 5999 if query is not None: 6000 query["query"] = query 6001 if status is not None: 6002 query["status"] = status 6003 if owner_user is not None: 6004 query["owner_user"] = owner_user 6005 if owner_agent is not None: 6006 query["owner_agent"] = owner_agent 6007 if priority is not None: 6008 query["priority"] = priority 6009 if tag is not None: 6010 query["tag"] = tag 6011 if parent is not None: 6012 query["parent"] = parent 6013 if source_scope is not None: 6014 query["source_scope"] = source_scope 6015 if source_type is not None: 6016 query["source_type"] = source_type 6017 if source_id is not None: 6018 query["source_id"] = source_id 6019 if epic is not None: 6020 query["epic"] = epic 6021 if limit is not None: 6022 query["limit"] = limit 6023 if after_cursor is not None: 6024 query["after_cursor"] = after_cursor 6025 return self._http.request( 6026 f"/api/v1/teams/{team}/tasks/search", 6027 query=query, 6028 response_type=TeamTaskSearchResponse, 6029 )
5624 def list( 5625 self, 5626 team: str, 5627 *, 5628 user: str | None = None, 5629 org: str | None = None, 5630 status: str | None = None, 5631 owner_user: str | None = None, 5632 owner_agent: str | None = None, 5633 priority: int | None = None, 5634 tag: str | None = None, 5635 parent: str | None = None, 5636 source_scope: str | None = None, 5637 source_type: str | None = None, 5638 source_id: str | None = None, 5639 epic: str | None = None, 5640 search: str | None = None, 5641 sort: str | None = None, 5642 order: str | None = None, 5643 due_before: str | None = None, 5644 due_after: str | None = None, 5645 overdue: bool | None = None, 5646 ready: bool | None = None, 5647 attention: bool | None = None, 5648 limit: int | None = None, 5649 after_cursor: str | None = None, 5650 ) -> TeamTaskListResponse: 5651 """ 5652 List an owner's tasks 5653 Returns tasks owned by the specified user or team. You can narrow results using the 5654 optional filters below. By default results are returned in reverse chronological 5655 order (most recently created first); use `sort` and `order` to sort by due date or 5656 priority instead. 5657 User-authenticated callers may list their personal tasks or tasks for teams they 5658 have joined. Privileged callers provide the owner in the route; the owner's 5659 organization is implied by that principal. An explicit `org` is optional and, 5660 when set, must match the owner's organization. 5661 5662 Args: 5663 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5664 user: User ID (`usr_...`) for user-scoped tasks. 5665 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 5666 status: Filter tasks by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to return tasks in all statuses. 5667 owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (`usr_...`). 5668 owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (`agi_...`). 5669 priority: Filter tasks by priority, from 0 (highest) to 4 (lowest). 5670 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 5671 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 5672 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5673 source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters. 5674 source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters. 5675 epic: Return only tasks with this exact epic label. 5676 search: Restrict results to tasks whose name or description contains this string. 5677 sort: Sort key. One of `"created"` (default most recently created first), `"due_date"` (soonest due first; tasks without a due date always sort last), or `"priority"` (most urgent first). Ties break by most recently created. 5678 order: Sort direction, `"asc"` or `"desc"`. Defaults to `"desc"` for `created` and `"asc"` for `due_date` and `priority`. 5679 due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (`2026-08-01T00:00:00Z`) or date (`2026-08-01`, meaning midnight UTC). Tasks without a due date are excluded. 5680 due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded. 5681 overdue: When `true`, return only overdue tasks: a due date before the current UTC day and a status other than `"done"`. A task due today is not overdue. 5682 ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work. 5683 attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry. 5684 limit: Maximum number of tasks to return. Capped at 100. 5685 after_cursor: Opaque cursor returned by the previous page. 5686 5687 Returns: 5688 Successful response 5689 """ 5690 query: dict[str, object] = {} 5691 if user is not None: 5692 query["user"] = user 5693 if org is not None: 5694 query["org"] = org 5695 if status is not None: 5696 query["status"] = status 5697 if owner_user is not None: 5698 query["owner_user"] = owner_user 5699 if owner_agent is not None: 5700 query["owner_agent"] = owner_agent 5701 if priority is not None: 5702 query["priority"] = priority 5703 if tag is not None: 5704 query["tag"] = tag 5705 if parent is not None: 5706 query["parent"] = parent 5707 if source_scope is not None: 5708 query["source_scope"] = source_scope 5709 if source_type is not None: 5710 query["source_type"] = source_type 5711 if source_id is not None: 5712 query["source_id"] = source_id 5713 if epic is not None: 5714 query["epic"] = epic 5715 if search is not None: 5716 query["search"] = search 5717 if sort is not None: 5718 query["sort"] = sort 5719 if order is not None: 5720 query["order"] = order 5721 if due_before is not None: 5722 query["due_before"] = due_before 5723 if due_after is not None: 5724 query["due_after"] = due_after 5725 if overdue is not None: 5726 query["overdue"] = overdue 5727 if ready is not None: 5728 query["ready"] = ready 5729 if attention is not None: 5730 query["attention"] = attention 5731 if limit is not None: 5732 query["limit"] = limit 5733 if after_cursor is not None: 5734 query["after_cursor"] = after_cursor 5735 return self._http.request( 5736 f"/api/v1/teams/{team}/tasks", 5737 query=query, 5738 response_type=TeamTaskListResponse, 5739 )
List an owner's tasks
Returns tasks owned by the specified user or team. You can narrow results using the
optional filters below. By default results are returned in reverse chronological
order (most recently created first); use sort and order to sort by due date or
priority instead.
User-authenticated callers may list their personal tasks or tasks for teams they
have joined. Privileged callers provide the owner in the route; the owner's
organization is implied by that principal. An explicit org is optional and,
when set, must match the owner's organization.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) for user-scoped tasks. - org: Optional organization (
org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. - status: Filter tasks by status. One of
"open","in_progress","in_review", or"done". Omit to return tasks in all statuses. - owner_user: Filter tasks assigned to a specific user. Provide the user's public ID (
usr_...). - owner_agent: Filter tasks assigned to a specific agent. Provide the agent's public ID (
agi_...). - priority: Filter tasks by priority, from 0 (highest) to 4 (lowest).
- tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
- parent: Return only subtasks of the given task (
tsk_...), or passnoneto return only top-level tasks. - source_scope: Return only tasks whose source matches this container. Must be supplied with
source_typeandsource_id. - source_type: Return only tasks whose source matches this object kind. Must be supplied with the other source filters.
- source_id: Return only tasks whose source matches this object identity. Must be supplied with the other source filters.
- epic: Return only tasks with this exact epic label.
- search: Restrict results to tasks whose name or description contains this string.
- sort: Sort key. One of
"created"(default most recently created first),"due_date"(soonest due first; tasks without a due date always sort last), or"priority"(most urgent first). Ties break by most recently created. - order: Sort direction,
"asc"or"desc". Defaults to"desc"forcreatedand"asc"fordue_dateandpriority. - due_before: Return only tasks with a due date strictly before this ISO 8601 datetime (
2026-08-01T00:00:00Z) or date (2026-08-01, meaning midnight UTC). Tasks without a due date are excluded. - due_after: Return only tasks with a due date strictly after this ISO 8601 datetime or date. Tasks without a due date are excluded.
- overdue: When
true, return only overdue tasks: a due date before the current UTC day and a status other than"done". A task due today is not overdue. - ready: When true, return only open tasks with no unfinished blockers and no active session lease. This is a projection snapshot; claim a lease before starting work.
- attention: When true, return paused, failed, or in-progress tasks with no lease or a past lease expiry.
- limit: Maximum number of tasks to return. Capped at 100.
- after_cursor: Opaque cursor returned by the previous page.
Returns:
Successful response
5741 def create(self, team: str, input: TeamTaskCreateInput) -> Task: 5742 """ 5743 Create a task for an owner 5744 Creates a new task owned by the specified user or team and returns the full 5745 task object. User-authenticated calls are attributed to the authenticated 5746 user or agent. App-scoped developer and server-to-server callers must provide 5747 the task's explicit `org` scope and an explicit `user` or `agent` actor for 5748 team tasks; a user-owned task reuses the user in the route unless an explicit 5749 agent is supplied. Every referenced principal is validated against the app, 5750 owner, and team membership before creation. 5751 5752 Args: 5753 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5754 input: Request body. 5755 input.agent: Explicit acting agent (`agi_...`) for a developer or server-to-server call. Mutually exclusive with an acting `user`; the agent must belong to the task owner. 5756 input.org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. 5757 input.task: Attributes for the task to create. `name` is required; all other fields are optional. 5758 input.user: User ID (`usr_...`). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call. 5759 5760 Returns: 5761 The newly created task. 5762 """ 5763 return self._http.request( 5764 f"/api/v1/teams/{team}/tasks", 5765 method="POST", 5766 body=input, 5767 response_type=Task, 5768 )
Create a task for an owner
Creates a new task owned by the specified user or team and returns the full
task object. User-authenticated calls are attributed to the authenticated
user or agent. App-scoped developer and server-to-server callers must provide
the task's explicit org scope and an explicit user or agent actor for
team tasks; a user-owned task reuses the user in the route unless an explicit
agent is supplied. Every referenced principal is validated against the app,
owner, and team membership before creation.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - input: Request body.
- input.agent: Explicit acting agent (
agi_...) for a developer or server-to-server call. Mutually exclusive with an actinguser; the agent must belong to the task owner. - input.org: Explicit organization (
org_...) for developer and server-to-server calls. Pass null when the owner is not organization-scoped. The value must match the selected user or team. - input.task: Attributes for the task to create.
nameis required; all other fields are optional. - input.user: User ID (
usr_...). On a user route this is the task owner and creator; on a team route it is the explicit acting user for a developer or server-to-server call.
Returns:
The newly created task.
5770 def blocker_cycles( 5771 self, 5772 team: str, 5773 *, 5774 user: str | None = None, 5775 org: str | None = None, 5776 limit: int | None = None, 5777 after_cursor: str | None = None, 5778 ) -> TeamTaskBlockerCyclesResponse: 5779 """ 5780 List task blocker cycles 5781 Runs an on-demand diagnostic over unfinished tasks owned by the specified 5782 team or user and returns a forward cursor-paginated page of complete cyclic 5783 blocker components. Detection is bounded to owners with at most 100 5784 unfinished tasks. This endpoint is read-only: cycles do not prevent task 5785 updates, lease acquisition, or completion. 5786 5787 Args: 5788 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5789 user: User ID (`usr_...`) owning the tasks. 5790 org: Optional organization context for privileged callers. 5791 limit: Maximum cycle components to return. Defaults to 50; maximum is 100. 5792 after_cursor: Opaque cursor returned by the preceding page. 5793 5794 Returns: 5795 Successful response 5796 """ 5797 query: dict[str, object] = {} 5798 if user is not None: 5799 query["user"] = user 5800 if org is not None: 5801 query["org"] = org 5802 if limit is not None: 5803 query["limit"] = limit 5804 if after_cursor is not None: 5805 query["after_cursor"] = after_cursor 5806 return self._http.request( 5807 f"/api/v1/teams/{team}/tasks/blocker_cycles", 5808 query=query, 5809 response_type=TeamTaskBlockerCyclesResponse, 5810 )
List task blocker cycles Runs an on-demand diagnostic over unfinished tasks owned by the specified team or user and returns a forward cursor-paginated page of complete cyclic blocker components. Detection is bounded to owners with at most 100 unfinished tasks. This endpoint is read-only: cycles do not prevent task updates, lease acquisition, or completion.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) owning the tasks. - org: Optional organization context for privileged callers.
- limit: Maximum cycle components to return. Defaults to 50; maximum is 100.
- after_cursor: Opaque cursor returned by the preceding page.
Returns:
Successful response
5812 def by_source(self, team: str, input: TeamTaskBySourceInput) -> TaskEnsureResult: 5813 """ 5814 Find or create a task by source 5815 Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted. 5816 5817 Args: 5818 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5819 input: Request body. 5820 input.agent: Explicit acting agent for privileged callers. 5821 input.description: Initial task description. 5822 input.epic: Initial epic grouping. 5823 input.name: Initial task name. 5824 input.org: Explicit organization for privileged callers. 5825 input.source_id: Source identity, for example owner/repo#123. 5826 input.source_scope: Source scope, for example github. 5827 input.source_type: Source type, for example pull_request. 5828 input.status: Initial task status. 5829 input.user: User owner, or explicit acting user on a team route. 5830 5831 Returns: 5832 The task and whether this request created it. 5833 """ 5834 return self._http.request( 5835 f"/api/v1/teams/{team}/tasks/by-source", 5836 method="PUT", 5837 body=input, 5838 response_type=TaskEnsureResult, 5839 )
Find or create a task by source Atomically creates one task per owner, tenant and source. Retries return the current task without updating it. Historical tasks created through ordinary create are not adopted.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - input: Request body.
- input.agent: Explicit acting agent for privileged callers.
- input.description: Initial task description.
- input.epic: Initial epic grouping.
- input.name: Initial task name.
- input.org: Explicit organization for privileged callers.
- input.source_id: Source identity, for example owner/repo#123.
- input.source_scope: Source scope, for example github.
- input.source_type: Source type, for example pull_request.
- input.status: Initial task status.
- input.user: User owner, or explicit acting user on a team route.
Returns:
The task and whether this request created it.
5841 def metrics(self, team: str, *, days: int | None = None) -> TeamTaskMetricsResponse: 5842 """ 5843 Get task activity metrics for a team 5844 Returns task activity metrics scoped to one team (the Network in ArchAgents). 5845 `open` counts currently open or in-progress team tasks, `created` counts 5846 tasks inserted in the UTC-day window, and `completed` counts tasks whose 5847 `closed_at` falls in that window while still in a closed status. Hard-deleted 5848 tasks are absent from the projection and therefore omitted. The daily series 5849 is zero-filled across the requested window and includes reconstructed 5850 end-of-day `open` stock (from remaining projection rows' inserted_at/closed_at). 5851 Any authenticated team member may read this count-only Network summary. 5852 Requests from callers without team access return 404 so team existence is 5853 not disclosed. 5854 5855 Args: 5856 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5857 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 5858 5859 Returns: 5860 Successful response 5861 """ 5862 query: dict[str, object] = {} 5863 if days is not None: 5864 query["days"] = days 5865 return self._http.request( 5866 f"/api/v1/teams/{team}/tasks/metrics", 5867 query=query, 5868 response_type=TeamTaskMetricsResponse, 5869 )
Get task activity metrics for a team
Returns task activity metrics scoped to one team (the Network in ArchAgents).
open counts currently open or in-progress team tasks, created counts
tasks inserted in the UTC-day window, and completed counts tasks whose
closed_at falls in that window while still in a closed status. Hard-deleted
tasks are absent from the projection and therefore omitted. The daily series
is zero-filled across the requested window and includes reconstructed
end-of-day open stock (from remaining projection rows' inserted_at/closed_at).
Any authenticated team member may read this count-only Network summary.
Requests from callers without team access return 404 so team existence is
not disclosed.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:
Successful response
5871 def ready( 5872 self, 5873 team: str, 5874 *, 5875 user: str | None = None, 5876 org: str | None = None, 5877 explain: bool | None = None, 5878 assigned_to_me: bool | None = None, 5879 source_scope: str | None = None, 5880 source_type: str | None = None, 5881 source_id: str | None = None, 5882 epic: str | None = None, 5883 limit: int | None = None, 5884 after_cursor: str | None = None, 5885 ) -> TeamTaskReadyResponse: 5886 """ 5887 List an owner's ready tasks 5888 Returns open tasks with no unfinished blockers and no active session lease. 5889 Readiness is calculated by the server from the current task projection. It is 5890 a snapshot, not a reservation; claim a task lease before starting work. 5891 Results are ordered by priority (0, the most urgent, first), then oldest 5892 first, so the first page is always the most urgent ready work. 5893 Pass `explain=true` to include every open task with a stable readiness reason. 5894 5895 Args: 5896 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5897 user: User ID (`usr_...`) owning the tasks. 5898 org: Optional organization context for privileged callers. 5899 explain: Include blocked and actively leased open tasks with exclusion reasons. 5900 assigned_to_me: Only include tasks assigned to the authenticated user. 5901 source_scope: Only include tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5902 source_type: Only include tasks whose source matches this object kind. 5903 source_id: Only include tasks whose source matches this object identity. 5904 epic: Only include tasks with this exact epic label. 5905 limit: Maximum number of readiness entries to return. Capped at 100. 5906 after_cursor: Opaque cursor returned by the previous page. 5907 5908 Returns: 5909 Successful response 5910 """ 5911 query: dict[str, object] = {} 5912 if user is not None: 5913 query["user"] = user 5914 if org is not None: 5915 query["org"] = org 5916 if explain is not None: 5917 query["explain"] = explain 5918 if assigned_to_me is not None: 5919 query["assigned_to_me"] = assigned_to_me 5920 if source_scope is not None: 5921 query["source_scope"] = source_scope 5922 if source_type is not None: 5923 query["source_type"] = source_type 5924 if source_id is not None: 5925 query["source_id"] = source_id 5926 if epic is not None: 5927 query["epic"] = epic 5928 if limit is not None: 5929 query["limit"] = limit 5930 if after_cursor is not None: 5931 query["after_cursor"] = after_cursor 5932 return self._http.request( 5933 f"/api/v1/teams/{team}/tasks/ready", 5934 query=query, 5935 response_type=TeamTaskReadyResponse, 5936 )
List an owner's ready tasks
Returns open tasks with no unfinished blockers and no active session lease.
Readiness is calculated by the server from the current task projection. It is
a snapshot, not a reservation; claim a task lease before starting work.
Results are ordered by priority (0, the most urgent, first), then oldest
first, so the first page is always the most urgent ready work.
Pass explain=true to include every open task with a stable readiness reason.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) owning the tasks. - org: Optional organization context for privileged callers.
- explain: Include blocked and actively leased open tasks with exclusion reasons.
- assigned_to_me: Only include tasks assigned to the authenticated user.
- source_scope: Only include tasks whose source matches this container. Must be supplied with
source_typeandsource_id. - source_type: Only include tasks whose source matches this object kind.
- source_id: Only include tasks whose source matches this object identity.
- epic: Only include tasks with this exact epic label.
- limit: Maximum number of readiness entries to return. Capped at 100.
- after_cursor: Opaque cursor returned by the previous page.
Returns:
Successful response
5938 def search( 5939 self, 5940 team: str, 5941 *, 5942 user: str | None = None, 5943 org: str | None = None, 5944 q: str | None = None, 5945 query: str | None = None, 5946 status: str | None = None, 5947 owner_user: str | None = None, 5948 owner_agent: str | None = None, 5949 priority: int | None = None, 5950 tag: str | None = None, 5951 parent: str | None = None, 5952 source_scope: str | None = None, 5953 source_type: str | None = None, 5954 source_id: str | None = None, 5955 epic: str | None = None, 5956 limit: int | None = None, 5957 after_cursor: str | None = None, 5958 ) -> TeamTaskSearchResponse: 5959 """ 5960 Search an owner's tasks 5961 Performs a full-text search over tasks owned by the specified user or team and returns 5962 matching results. Combine `q` with the optional filters to narrow the result set 5963 further. When no query is provided, the endpoint behaves like a filtered list. 5964 The `query` field in the response echoes the effective search query. 5965 User-authenticated callers may search their personal tasks or tasks for teams 5966 they have joined. Privileged callers provide the owner in the route; the owner's 5967 organization is implied by that principal. An explicit `org` is optional and, 5968 when set, must match the owner's organization. 5969 5970 Args: 5971 team: Team ID (`tem_...`). Only tasks belonging to this team are returned. 5972 user: User ID (`usr_...`) whose tasks are searched. 5973 org: Optional organization (`org_...`) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. 5974 q: Full-text search query matched against task names and descriptions. Takes precedence over `query` when both are provided. 5975 query: Alias for `q`. Use `q` when possible; this parameter exists for compatibility. 5976 status: Filter results by status. One of `"open"`, `"in_progress"`, `"in_review"`, or `"done"`. Omit to include all statuses. 5977 owner_user: Restrict results to tasks assigned to the user with this public ID (`usr_...`). 5978 owner_agent: Restrict results to tasks assigned to the agent with this public ID (`agi_...`). 5979 priority: Filter results by priority, from 0 (highest) to 4 (lowest). 5980 tag: Return only tasks carrying this tag (matched against the canonical lowercase form). 5981 parent: Return only subtasks of the given task (`tsk_...`), or pass `none` to return only top-level tasks. 5982 source_scope: Return only tasks whose source matches this container. Must be supplied with `source_type` and `source_id`. 5983 source_type: Return only tasks whose source matches this object kind. 5984 source_id: Return only tasks whose source matches this object identity. 5985 epic: Return only tasks with this exact epic label. 5986 limit: Maximum number of tasks to return. Capped at 100. 5987 after_cursor: Opaque cursor returned by the previous page. 5988 5989 Returns: 5990 Successful response 5991 """ 5992 query: dict[str, object] = {} 5993 if user is not None: 5994 query["user"] = user 5995 if org is not None: 5996 query["org"] = org 5997 if q is not None: 5998 query["q"] = q 5999 if query is not None: 6000 query["query"] = query 6001 if status is not None: 6002 query["status"] = status 6003 if owner_user is not None: 6004 query["owner_user"] = owner_user 6005 if owner_agent is not None: 6006 query["owner_agent"] = owner_agent 6007 if priority is not None: 6008 query["priority"] = priority 6009 if tag is not None: 6010 query["tag"] = tag 6011 if parent is not None: 6012 query["parent"] = parent 6013 if source_scope is not None: 6014 query["source_scope"] = source_scope 6015 if source_type is not None: 6016 query["source_type"] = source_type 6017 if source_id is not None: 6018 query["source_id"] = source_id 6019 if epic is not None: 6020 query["epic"] = epic 6021 if limit is not None: 6022 query["limit"] = limit 6023 if after_cursor is not None: 6024 query["after_cursor"] = after_cursor 6025 return self._http.request( 6026 f"/api/v1/teams/{team}/tasks/search", 6027 query=query, 6028 response_type=TeamTaskSearchResponse, 6029 )
Search an owner's tasks
Performs a full-text search over tasks owned by the specified user or team and returns
matching results. Combine q with the optional filters to narrow the result set
further. When no query is provided, the endpoint behaves like a filtered list.
The query field in the response echoes the effective search query.
User-authenticated callers may search their personal tasks or tasks for teams
they have joined. Privileged callers provide the owner in the route; the owner's
organization is implied by that principal. An explicit org is optional and,
when set, must match the owner's organization.
Arguments:
- team: Team ID (
tem_...). Only tasks belonging to this team are returned. - user: User ID (
usr_...) whose tasks are searched. - org: Optional organization (
org_...) for developer and server-to-server calls. When omitted, the org is taken from the owner principal (team, user, or agent). When set, it must match that principal's org; pass null for an owner outside an organization. - q: Full-text search query matched against task names and descriptions. Takes precedence over
querywhen both are provided. - query: Alias for
q. Useqwhen possible; this parameter exists for compatibility. - status: Filter results by status. One of
"open","in_progress","in_review", or"done". Omit to include all statuses. - owner_user: Restrict results to tasks assigned to the user with this public ID (
usr_...). - owner_agent: Restrict results to tasks assigned to the agent with this public ID (
agi_...). - priority: Filter results by priority, from 0 (highest) to 4 (lowest).
- tag: Return only tasks carrying this tag (matched against the canonical lowercase form).
- parent: Return only subtasks of the given task (
tsk_...), or passnoneto return only top-level tasks. - source_scope: Return only tasks whose source matches this container. Must be supplied with
source_typeandsource_id. - source_type: Return only tasks whose source matches this object kind.
- source_id: Return only tasks whose source matches this object identity.
- epic: Return only tasks with this exact epic label.
- limit: Maximum number of tasks to return. Capped at 100.
- after_cursor: Opaque cursor returned by the previous page.
Returns:
Successful response
6032class TeamThreadResource: 6033 def __init__(self, http: SyncHttpClient): 6034 self._http = http 6035 6036 def list(self, team: str, *, tags: builtins.list[str] | None = None) -> TeamThreadListResponse: 6037 """ 6038 List threads for a team 6039 Returns all threads owned by the specified team that the authenticated caller 6040 has permission to view. The caller must have access to the team; requests 6041 without team access are rejected with 404. 6042 Threads are returned in a single `data` array, ordered with the team's 6043 default thread first, then by most recent activity (newest first). Each 6044 thread carries a `last_activity` timestamp the most recent message's 6045 creation time, falling back to the thread's own creation time. Use the 6046 team-scoped thread endpoints to create, update, or delete individual 6047 threads. 6048 6049 Args: 6050 team: Team ID (`tem_...`) whose threads should be listed. 6051 tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`. 6052 6053 Returns: 6054 Successful response 6055 """ 6056 query: dict[str, object] = {} 6057 if tags is not None: 6058 query["tags"] = tags 6059 return self._http.request( 6060 f"/api/v1/teams/{team}/threads", 6061 query=query, 6062 response_type=TeamThreadListResponse, 6063 ) 6064 6065 def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 6066 """ 6067 Create a thread for a team 6068 Creates a new thread owned by the specified team. The authenticated caller must 6069 have access to the team; requests from callers without team access are rejected 6070 with 404. 6071 If a `profile_picture` is provided in the thread params, it must be 6072 base64-encoded image data. The image is uploaded and associated with the thread 6073 before creation completes. Omit `profile_picture` to skip this step. 6074 By default the platform sends an automatic welcome message into the new thread. 6075 Pass `skip_welcome_message: true` to suppress this behavior, for example when 6076 creating threads programmatically in bulk or seeding test data. 6077 6078 Args: 6079 team: Team ID (`tem_...`) whose threads should be listed. 6080 input: Request body. 6081 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 6082 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 6083 6084 Returns: 6085 The newly created thread. 6086 """ 6087 return self._http.request( 6088 f"/api/v1/teams/{team}/threads", 6089 method="POST", 6090 body=input, 6091 response_type=Thread, 6092 ) 6093 6094 def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse: 6095 """ 6096 Get threads-created count for a team 6097 Returns how many **network-public** team threads were created in the UTC-day 6098 window. Counts come from realtime SQL aggregation over append-only 6099 `network_activity_events` (`thread.created` rows co-committed with create): 6100 team- or restricted-visibility threads (plus legacy open-team rows), never 6101 private or mirror. Every Network member sees the same number. Hard-delete 6102 co-commits a separate `thread.deleted` transition event and does not remove 6103 create events (metric is "created", not "still present"). Visibility flips 6104 after insert are ignored in v1. 6105 Any authenticated team member may read this count-only Network summary. 6106 Requests from callers without team access return 404 so team existence is 6107 not disclosed. 6108 6109 Args: 6110 team: Team ID (`tem_...`) whose threads should be listed. 6111 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 6112 6113 Returns: 6114 Successful response 6115 """ 6116 query: dict[str, object] = {} 6117 if days is not None: 6118 query["days"] = days 6119 return self._http.request( 6120 f"/api/v1/teams/{team}/threads/metrics", 6121 query=query, 6122 response_type=TeamThreadMetricsResponse, 6123 )
6036 def list(self, team: str, *, tags: builtins.list[str] | None = None) -> TeamThreadListResponse: 6037 """ 6038 List threads for a team 6039 Returns all threads owned by the specified team that the authenticated caller 6040 has permission to view. The caller must have access to the team; requests 6041 without team access are rejected with 404. 6042 Threads are returned in a single `data` array, ordered with the team's 6043 default thread first, then by most recent activity (newest first). Each 6044 thread carries a `last_activity` timestamp the most recent message's 6045 creation time, falling back to the thread's own creation time. Use the 6046 team-scoped thread endpoints to create, update, or delete individual 6047 threads. 6048 6049 Args: 6050 team: Team ID (`tem_...`) whose threads should be listed. 6051 tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g. `?tags[]=blocked&tags[]=needs-review`. 6052 6053 Returns: 6054 Successful response 6055 """ 6056 query: dict[str, object] = {} 6057 if tags is not None: 6058 query["tags"] = tags 6059 return self._http.request( 6060 f"/api/v1/teams/{team}/threads", 6061 query=query, 6062 response_type=TeamThreadListResponse, 6063 )
List threads for a team
Returns all threads owned by the specified team that the authenticated caller
has permission to view. The caller must have access to the team; requests
without team access are rejected with 404.
Threads are returned in a single data array, ordered with the team's
default thread first, then by most recent activity (newest first). Each
thread carries a last_activity timestamp the most recent message's
creation time, falling back to the thread's own creation time. Use the
team-scoped thread endpoints to create, update, or delete individual
threads.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed. - tags: Optional: only return threads tagged with at least one of these tags (OR-match). Repeated query params, e.g.
?tags[]=blocked&tags[]=needs-review.
Returns:
Successful response
6065 def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 6066 """ 6067 Create a thread for a team 6068 Creates a new thread owned by the specified team. The authenticated caller must 6069 have access to the team; requests from callers without team access are rejected 6070 with 404. 6071 If a `profile_picture` is provided in the thread params, it must be 6072 base64-encoded image data. The image is uploaded and associated with the thread 6073 before creation completes. Omit `profile_picture` to skip this step. 6074 By default the platform sends an automatic welcome message into the new thread. 6075 Pass `skip_welcome_message: true` to suppress this behavior, for example when 6076 creating threads programmatically in bulk or seeding test data. 6077 6078 Args: 6079 team: Team ID (`tem_...`) whose threads should be listed. 6080 input: Request body. 6081 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 6082 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 6083 6084 Returns: 6085 The newly created thread. 6086 """ 6087 return self._http.request( 6088 f"/api/v1/teams/{team}/threads", 6089 method="POST", 6090 body=input, 6091 response_type=Thread, 6092 )
Create a thread for a team
Creates a new thread owned by the specified team. The authenticated caller must
have access to the team; requests from callers without team access are rejected
with 404.
If a profile_picture is provided in the thread params, it must be
base64-encoded image data. The image is uploaded and associated with the thread
before creation completes. Omit profile_picture to skip this step.
By default the platform sends an automatic welcome message into the new thread.
Pass skip_welcome_message: true to suppress this behavior, for example when
creating threads programmatically in bulk or seeding test data.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed. - input: Request body.
- input.skip_welcome_message: When
true, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults tofalse. - input.thread: Attributes for the new thread. See ThreadCreateParams for available fields.
Returns:
The newly created thread.
6094 def metrics(self, team: str, *, days: int | None = None) -> TeamThreadMetricsResponse: 6095 """ 6096 Get threads-created count for a team 6097 Returns how many **network-public** team threads were created in the UTC-day 6098 window. Counts come from realtime SQL aggregation over append-only 6099 `network_activity_events` (`thread.created` rows co-committed with create): 6100 team- or restricted-visibility threads (plus legacy open-team rows), never 6101 private or mirror. Every Network member sees the same number. Hard-delete 6102 co-commits a separate `thread.deleted` transition event and does not remove 6103 create events (metric is "created", not "still present"). Visibility flips 6104 after insert are ignored in v1. 6105 Any authenticated team member may read this count-only Network summary. 6106 Requests from callers without team access return 404 so team existence is 6107 not disclosed. 6108 6109 Args: 6110 team: Team ID (`tem_...`) whose threads should be listed. 6111 days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30. 6112 6113 Returns: 6114 Successful response 6115 """ 6116 query: dict[str, object] = {} 6117 if days is not None: 6118 query["days"] = days 6119 return self._http.request( 6120 f"/api/v1/teams/{team}/threads/metrics", 6121 query=query, 6122 response_type=TeamThreadMetricsResponse, 6123 )
Get threads-created count for a team
Returns how many network-public team threads were created in the UTC-day
window. Counts come from realtime SQL aggregation over append-only
network_activity_events (thread.created rows co-committed with create):
team- or restricted-visibility threads (plus legacy open-team rows), never
private or mirror. Every Network member sees the same number. Hard-delete
co-commits a separate thread.deleted transition event and does not remove
create events (metric is "created", not "still present"). Visibility flips
after insert are ignored in v1.
Any authenticated team member may read this count-only Network summary.
Requests from callers without team access return 404 so team existence is
not disclosed.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed. - days: UTC-day window. One of 7, 30, 90, or 365; defaults to 30.
Returns:
Successful response
6126class TeamResource: 6127 def __init__(self, http: SyncHttpClient): 6128 self._http = http 6129 self.custom_objects = TeamCustomObjectResource(http) 6130 self.invite = TeamInviteResource(http) 6131 self.members = MemberResource(http) 6132 self.tasks = TeamTaskResource(http) 6133 self.threads = TeamThreadResource(http) 6134 6135 def list( 6136 self, 6137 *, 6138 page: int | None = None, 6139 page_size: int | None = None, 6140 search: str | None = None, 6141 metadata: dict[str, Any] | None = None, 6142 membership: str | None = None, 6143 ) -> TeamListResponse: 6144 """ 6145 List teams 6146 Returns a paginated list of teams visible to the authenticated user, ordered 6147 by creation time descending. Use `membership` to narrow results to teams the 6148 caller has joined or teams they are eligible to join based on their ACL 6149 visibility. 6150 Supports full-text search across team name and description via `search`, and 6151 structured metadata filtering via `metadata`. When `app` is present, results 6152 are scoped to that app and the caller must hold the corresponding app scope. 6153 6154 Args: 6155 page: Page number to retrieve, starting at 1. Defaults to 1. 6156 page_size: Number of teams to return per page. Defaults to 25. 6157 search: Full-text search string matched against team name and description. 6158 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 6159 membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams. 6160 6161 Returns: 6162 Successful response 6163 """ 6164 query: dict[str, object] = {} 6165 if page is not None: 6166 query["page"] = page 6167 if page_size is not None: 6168 query["page_size"] = page_size 6169 if search is not None: 6170 query["search"] = search 6171 if metadata is not None: 6172 query["metadata"] = metadata 6173 if membership is not None: 6174 query["membership"] = membership 6175 return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse) 6176 6177 def create(self, input: TeamCreateInput) -> Team: 6178 """ 6179 Create a team 6180 Creates a new team and returns the created team object. The authenticated 6181 user becomes the team's owner. 6182 When `app` is supplied, the request is scoped to that app and the caller 6183 must hold the corresponding app scope. Omit `org` unless you want the team 6184 pinned to a specific organization. A default chat thread is provisioned for 6185 the team automatically after creation. 6186 6187 Args: 6188 input: Request body. 6189 input.acl: Access control configuration for the team. Controls who can discover and join the team. 6190 input.description: Optional human-readable description of the team's purpose. 6191 input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team. 6192 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 6193 input.name: Display name for the team. 6194 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 6195 6196 Returns: 6197 The newly created team. 6198 """ 6199 return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team) 6200 6201 def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 6202 """ 6203 Join a team with an invite code 6204 Adds a principal to a team using a 12-character invite code. The invite 6205 code can be supplied as either `join_code` or `invite_code`; both are 6206 accepted for backwards compatibility. 6207 For user-authenticated requests, the currently authenticated user is added 6208 to the team. For server-to-server requests, you must supply either `agent` 6209 (to add an agent) or `user` (to add a specific user by ID). If the user 6210 is already a member of the team, the request succeeds without creating a 6211 duplicate membership. 6212 This endpoint is rate-limited to 10 requests per minute per IP address to 6213 prevent invite-code enumeration. 6214 6215 Args: 6216 input: Request body. 6217 input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. 6218 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 6219 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 6220 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 6221 6222 Returns: 6223 The team the principal has joined. 6224 """ 6225 return self._http.request( 6226 "/api/v1/teams/join_by_code", 6227 method="POST", 6228 body=input, 6229 response_type=Team, 6230 ) 6231 6232 def delete(self, team: str) -> None: 6233 """ 6234 Delete a team 6235 Permanently deletes the team identified by `team`. This action is 6236 irreversible all team memberships, settings, and associated data are 6237 removed. 6238 The caller must be the team owner or an org admin. When `app` is present, 6239 the caller must also hold the corresponding app scope. 6240 6241 Args: 6242 team: Team ID (`team_...`) of the team to delete. 6243 6244 Returns: 6245 Empty response the team has been deleted. 6246 """ 6247 self._http.request(f"/api/v1/teams/{team}", method="DELETE") 6248 6249 def get(self, team: str) -> Team: 6250 """ 6251 Retrieve a team 6252 Returns the full team object for the given `team` ID, including its current 6253 member list and all associated threads. 6254 The authenticated user must be a member of the team or hold a role that 6255 grants visibility (org admin, app scope). When `app` is supplied, the 6256 caller must hold the corresponding app scope. 6257 6258 Args: 6259 team: Team ID (`team_...`) of the team to retrieve. 6260 6261 Returns: 6262 The requested team, including its members and threads. 6263 """ 6264 return self._http.request(f"/api/v1/teams/{team}", response_type=Team) 6265 6266 def update(self, team: str, input: TeamUpdateInput) -> Team: 6267 """ 6268 Update a team 6269 Updates one or more attributes of the team identified by `team`. Only the 6270 fields you provide are changed; omitted fields are left as-is. 6271 To replace the team's profile picture, supply the `profile_picture` object 6272 with base64-encoded image data. The previous picture is deleted after the 6273 new one is successfully uploaded. When `app` is present, the caller must hold 6274 the corresponding app scope. The caller must be a team owner or org admin. 6275 6276 Args: 6277 team: Team ID (`team_...`) of the team to update. 6278 input: Request body. 6279 input.acl: New access control configuration for the team. Replaces the existing ACL. 6280 input.description: New human-readable description of the team's purpose. 6281 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 6282 input.name: New display name for the team. 6283 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 6284 6285 Returns: 6286 The updated team with all changes applied. 6287 """ 6288 return self._http.request( 6289 f"/api/v1/teams/{team}", 6290 method="PATCH", 6291 body=input, 6292 response_type=Team, 6293 ) 6294 6295 def artifacts( 6296 self, team: str, *, group_key: str | None = None, group_key_prefix: str | None = None 6297 ) -> TeamArtifactsResponse: 6298 """ 6299 List a team's artifacts 6300 Returns all artifacts owned by the specified team. Artifacts represent 6301 AI-generated or user-uploaded files associated with agent sessions, 6302 threads, or sandboxes such as images, documents, and code outputs. 6303 The authenticated user must be a member of the team. Attempting to list 6304 artifacts for a team the caller does not have access to returns 404 6305 rather than 403 to avoid leaking team existence. 6306 Results are returned in a single page without cursor pagination. Each 6307 artifact in the response reflects the state of its current version, 6308 including a short-lived signed `file_url` for direct download. 6309 6310 Args: 6311 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 6312 group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match. 6313 group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key. 6314 6315 Returns: 6316 Successful response 6317 """ 6318 query: dict[str, object] = {} 6319 if group_key is not None: 6320 query["group_key"] = group_key 6321 if group_key_prefix is not None: 6322 query["group_key_prefix"] = group_key_prefix 6323 return self._http.request( 6324 f"/api/v1/teams/{team}/artifacts", 6325 query=query, 6326 response_type=TeamArtifactsResponse, 6327 ) 6328 6329 def dependents(self, team: str) -> TeamDeleteImpactResponse: 6330 """ 6331 Preview Team deletion impact 6332 Returns the number of stored custom-object rows that deleting this Team will 6333 physically delete. The count includes rows hidden after ordinary soft 6334 deletion. This read-only preview does not delete or restore data. 6335 6336 Args: 6337 team: Team ID (`team_...`) to inspect. 6338 6339 Returns: 6340 Stored custom-object rows and the existing physical-deletion contract. 6341 """ 6342 return self._http.request( 6343 f"/api/v1/teams/{team}/dependents", 6344 response_type=TeamDeleteImpactResponse, 6345 ) 6346 6347 def invites(self, team: str) -> TeamInvitesResponse: 6348 """ 6349 Create a team invite (server-to-server) 6350 Generates a new invite code for the specified team using server-to-server 6351 authentication. Unlike the user-facing create endpoint, this variant does not 6352 require the caller to be a team member it is intended for privileged 6353 back-end services acting on behalf of your platform. 6354 The returned code is a short alphanumeric string that users can present to 6355 join the team. Each call produces a new code; previously issued codes are 6356 not invalidated by this request. 6357 6358 Args: 6359 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 6360 6361 Returns: 6362 Successful response 6363 """ 6364 return self._http.request( 6365 f"/api/v1/teams/{team}/invites", 6366 method="POST", 6367 response_type=TeamInvitesResponse, 6368 ) 6369 6370 def join(self, team: str, input: TeamJoinInput) -> None: 6371 """ 6372 Join a team 6373 Adds a principal to a team that is visible to the authenticated user. 6374 By default, the currently authenticated user joins the team. Provide `agent` 6375 to add an agent to the team instead the caller must already be a member of 6376 the team to do so. Provide `user` (by ID) or `email` to add another user from 6377 your organization the caller must be a team owner, team admin, or org admin. 6378 Only one of `agent`, `user`, or `email` may be supplied per request. 6379 If the target principal is already a member of the team, the request succeeds 6380 without creating a duplicate membership. Server-to-server callers are not 6381 permitted to use this endpoint; use the invite-code endpoint instead. 6382 6383 Args: 6384 team: Team ID (`team_...`) to join. 6385 input: Request body. 6386 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 6387 input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 6388 input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 6389 6390 Returns: 6391 Empty response the principal is now a member of the team. 6392 """ 6393 self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 6394 6395 def leave(self, team: str) -> None: 6396 """ 6397 Leave a team 6398 Removes a principal from a team. By default, the authenticated user removes 6399 themselves from the team. Provide `agent` to remove an agent instead the 6400 caller must be a member of the team to do so. 6401 Team owners cannot leave their own team. To transfer ownership first, use 6402 the update-membership endpoint, then call this endpoint. 6403 For server-to-server requests, `user` is required to identify which user 6404 should be removed. 6405 6406 Args: 6407 team: Team ID (`team_...`) to leave. 6408 6409 Returns: 6410 Empty response the principal has been removed from the team. 6411 """ 6412 self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE") 6413 6414 def task_assignees(self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse: 6415 """ 6416 List task assignees for a team 6417 Returns the list of principals users and agents that can be assigned 6418 to tasks within the team. Results include both human members and AI agents 6419 and are sorted alphabetically by display name. 6420 This endpoint is only available for team-scoped contexts. Calling it with a 6421 user-scoped owner returns a 400 error. The authenticated user must be a 6422 member of the team or hold org-admin access. App-scoped developer and 6423 server-to-server callers may list assignees for teams in their app so they 6424 can select the explicit user or agent actor required by privileged task 6425 mutations. 6426 6427 Args: 6428 team: Team ID (`tem_...`). 6429 org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization. 6430 6431 Returns: 6432 Successful response 6433 """ 6434 query: dict[str, object] = {} 6435 if org is not None: 6436 query["org"] = org 6437 return self._http.request( 6438 f"/api/v1/teams/{team}/task_assignees", 6439 query=query, 6440 response_type=TeamTaskAssigneesResponse, 6441 ) 6442 6443 def task_epics( 6444 self, 6445 team: str, 6446 *, 6447 user: str | None = None, 6448 org: str | None = None, 6449 source_scope: str | None = None, 6450 source_type: str | None = None, 6451 source_id: str | None = None, 6452 top_priority: int | None = None, 6453 include_closed: bool | None = None, 6454 limit: int | None = None, 6455 after_cursor: str | None = None, 6456 ) -> TeamTaskEpicsResponse: 6457 """ 6458 List an owner's epic summaries 6459 Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created. 6460 6461 Args: 6462 source_scope: Exact source scope; supply all three source fields. 6463 source_type: Exact source type. 6464 source_id: Exact source ID. 6465 top_priority: Exact highest open priority, from 0 to 4. 6466 include_closed: Include epics with no non-closed tasks; defaults to false. 6467 limit: Maximum epics; defaults to 50, capped at 100. 6468 after_cursor: Opaque forward cursor from the preceding page. 6469 6470 Returns: 6471 Successful response 6472 """ 6473 query: dict[str, object] = {} 6474 if user is not None: 6475 query["user"] = user 6476 if org is not None: 6477 query["org"] = org 6478 if source_scope is not None: 6479 query["source_scope"] = source_scope 6480 if source_type is not None: 6481 query["source_type"] = source_type 6482 if source_id is not None: 6483 query["source_id"] = source_id 6484 if top_priority is not None: 6485 query["top_priority"] = top_priority 6486 if include_closed is not None: 6487 query["include_closed"] = include_closed 6488 if limit is not None: 6489 query["limit"] = limit 6490 if after_cursor is not None: 6491 query["after_cursor"] = after_cursor 6492 return self._http.request( 6493 f"/api/v1/teams/{team}/task_epics", 6494 query=query, 6495 response_type=TeamTaskEpicsResponse, 6496 )
6135 def list( 6136 self, 6137 *, 6138 page: int | None = None, 6139 page_size: int | None = None, 6140 search: str | None = None, 6141 metadata: dict[str, Any] | None = None, 6142 membership: str | None = None, 6143 ) -> TeamListResponse: 6144 """ 6145 List teams 6146 Returns a paginated list of teams visible to the authenticated user, ordered 6147 by creation time descending. Use `membership` to narrow results to teams the 6148 caller has joined or teams they are eligible to join based on their ACL 6149 visibility. 6150 Supports full-text search across team name and description via `search`, and 6151 structured metadata filtering via `metadata`. When `app` is present, results 6152 are scoped to that app and the caller must hold the corresponding app scope. 6153 6154 Args: 6155 page: Page number to retrieve, starting at 1. Defaults to 1. 6156 page_size: Number of teams to return per page. Defaults to 25. 6157 search: Full-text search string matched against team name and description. 6158 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 6159 membership: Filter teams by membership status. `"joined"` returns only teams the caller is a member of. `"joinable"` returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams. 6160 6161 Returns: 6162 Successful response 6163 """ 6164 query: dict[str, object] = {} 6165 if page is not None: 6166 query["page"] = page 6167 if page_size is not None: 6168 query["page_size"] = page_size 6169 if search is not None: 6170 query["search"] = search 6171 if metadata is not None: 6172 query["metadata"] = metadata 6173 if membership is not None: 6174 query["membership"] = membership 6175 return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse)
List teams
Returns a paginated list of teams visible to the authenticated user, ordered
by creation time descending. Use membership to narrow results to teams the
caller has joined or teams they are eligible to join based on their ACL
visibility.
Supports full-text search across team name and description via search, and
structured metadata filtering via metadata. When app is present, results
are scoped to that app and the caller must hold the corresponding app scope.
Arguments:
- page: Page number to retrieve, starting at 1. Defaults to 1.
- page_size: Number of teams to return per page. Defaults to 25.
- search: Full-text search string matched against team name and description.
- metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned.
- membership: Filter teams by membership status.
"joined"returns only teams the caller is a member of."joinable"returns ACL-visible teams the caller has not yet joined. Omit to return all visible teams.
Returns:
Successful response
6177 def create(self, input: TeamCreateInput) -> Team: 6178 """ 6179 Create a team 6180 Creates a new team and returns the created team object. The authenticated 6181 user becomes the team's owner. 6182 When `app` is supplied, the request is scoped to that app and the caller 6183 must hold the corresponding app scope. Omit `org` unless you want the team 6184 pinned to a specific organization. A default chat thread is provisioned for 6185 the team automatically after creation. 6186 6187 Args: 6188 input: Request body. 6189 input.acl: Access control configuration for the team. Controls who can discover and join the team. 6190 input.description: Optional human-readable description of the team's purpose. 6191 input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team. 6192 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 6193 input.name: Display name for the team. 6194 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 6195 6196 Returns: 6197 The newly created team. 6198 """ 6199 return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team)
Create a team
Creates a new team and returns the created team object. The authenticated
user becomes the team's owner.
When app is supplied, the request is scoped to that app and the caller
must hold the corresponding app scope. Omit org unless you want the team
pinned to a specific organization. A default chat thread is provisioned for
the team automatically after creation.
Arguments:
- input: Request body.
- input.acl: Access control configuration for the team. Controls who can discover and join the team.
- input.description: Optional human-readable description of the team's purpose.
- input.idempotency_key: Optional retry key. Replays in the same app, organization, and sandbox return the original team.
- input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings.
- input.name: Display name for the team.
- input.org: Organization ID (
org_...) to associate the team with. Omit to create the team without an org affiliation.
Returns:
The newly created team.
6201 def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 6202 """ 6203 Join a team with an invite code 6204 Adds a principal to a team using a 12-character invite code. The invite 6205 code can be supplied as either `join_code` or `invite_code`; both are 6206 accepted for backwards compatibility. 6207 For user-authenticated requests, the currently authenticated user is added 6208 to the team. For server-to-server requests, you must supply either `agent` 6209 (to add an agent) or `user` (to add a specific user by ID). If the user 6210 is already a member of the team, the request succeeds without creating a 6211 duplicate membership. 6212 This endpoint is rate-limited to 10 requests per minute per IP address to 6213 prevent invite-code enumeration. 6214 6215 Args: 6216 input: Request body. 6217 input.agent: Agent ID (`agent_...`) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. 6218 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 6219 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 6220 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 6221 6222 Returns: 6223 The team the principal has joined. 6224 """ 6225 return self._http.request( 6226 "/api/v1/teams/join_by_code", 6227 method="POST", 6228 body=input, 6229 response_type=Team, 6230 )
Join a team with an invite code
Adds a principal to a team using a 12-character invite code. The invite
code can be supplied as either join_code or invite_code; both are
accepted for backwards compatibility.
For user-authenticated requests, the currently authenticated user is added
to the team. For server-to-server requests, you must supply either agent
(to add an agent) or user (to add a specific user by ID). If the user
is already a member of the team, the request succeeds without creating a
duplicate membership.
This endpoint is rate-limited to 10 requests per minute per IP address to
prevent invite-code enumeration.
Arguments:
- input: Request body.
- input.agent: Agent ID (
agent_...) to add to the team. When provided, the agent is joined instead of the authenticated user. Requires a server-to-server session. - input.invite_code: 12-character invite code alias for
join_codeaccepted for backwards compatibility. - input.join_code: 12-character invite code that identifies the team. Mutually usable with
invite_code. - input.user: User ID (
user_...) to add to the team. Required for server-to-server requests whenagentis not supplied.
Returns:
The team the principal has joined.
6232 def delete(self, team: str) -> None: 6233 """ 6234 Delete a team 6235 Permanently deletes the team identified by `team`. This action is 6236 irreversible all team memberships, settings, and associated data are 6237 removed. 6238 The caller must be the team owner or an org admin. When `app` is present, 6239 the caller must also hold the corresponding app scope. 6240 6241 Args: 6242 team: Team ID (`team_...`) of the team to delete. 6243 6244 Returns: 6245 Empty response the team has been deleted. 6246 """ 6247 self._http.request(f"/api/v1/teams/{team}", method="DELETE")
Delete a team
Permanently deletes the team identified by team. This action is
irreversible all team memberships, settings, and associated data are
removed.
The caller must be the team owner or an org admin. When app is present,
the caller must also hold the corresponding app scope.
Arguments:
- team: Team ID (
team_...) of the team to delete.
Returns:
Empty response the team has been deleted.
6249 def get(self, team: str) -> Team: 6250 """ 6251 Retrieve a team 6252 Returns the full team object for the given `team` ID, including its current 6253 member list and all associated threads. 6254 The authenticated user must be a member of the team or hold a role that 6255 grants visibility (org admin, app scope). When `app` is supplied, the 6256 caller must hold the corresponding app scope. 6257 6258 Args: 6259 team: Team ID (`team_...`) of the team to retrieve. 6260 6261 Returns: 6262 The requested team, including its members and threads. 6263 """ 6264 return self._http.request(f"/api/v1/teams/{team}", response_type=Team)
Retrieve a team
Returns the full team object for the given team ID, including its current
member list and all associated threads.
The authenticated user must be a member of the team or hold a role that
grants visibility (org admin, app scope). When app is supplied, the
caller must hold the corresponding app scope.
Arguments:
- team: Team ID (
team_...) of the team to retrieve.
Returns:
The requested team, including its members and threads.
6266 def update(self, team: str, input: TeamUpdateInput) -> Team: 6267 """ 6268 Update a team 6269 Updates one or more attributes of the team identified by `team`. Only the 6270 fields you provide are changed; omitted fields are left as-is. 6271 To replace the team's profile picture, supply the `profile_picture` object 6272 with base64-encoded image data. The previous picture is deleted after the 6273 new one is successfully uploaded. When `app` is present, the caller must hold 6274 the corresponding app scope. The caller must be a team owner or org admin. 6275 6276 Args: 6277 team: Team ID (`team_...`) of the team to update. 6278 input: Request body. 6279 input.acl: New access control configuration for the team. Replaces the existing ACL. 6280 input.description: New human-readable description of the team's purpose. 6281 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 6282 input.name: New display name for the team. 6283 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 6284 6285 Returns: 6286 The updated team with all changes applied. 6287 """ 6288 return self._http.request( 6289 f"/api/v1/teams/{team}", 6290 method="PATCH", 6291 body=input, 6292 response_type=Team, 6293 )
Update a team
Updates one or more attributes of the team identified by team. Only the
fields you provide are changed; omitted fields are left as-is.
To replace the team's profile picture, supply the profile_picture object
with base64-encoded image data. The previous picture is deleted after the
new one is successfully uploaded. When app is present, the caller must hold
the corresponding app scope. The caller must be a team owner or org admin.
Arguments:
- team: Team ID (
team_...) of the team to update. - input: Request body.
- input.acl: New access control configuration for the team. Replaces the existing ACL.
- input.description: New human-readable description of the team's purpose.
- input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely.
- input.name: New display name for the team.
- input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture.
Returns:
The updated team with all changes applied.
6295 def artifacts( 6296 self, team: str, *, group_key: str | None = None, group_key_prefix: str | None = None 6297 ) -> TeamArtifactsResponse: 6298 """ 6299 List a team's artifacts 6300 Returns all artifacts owned by the specified team. Artifacts represent 6301 AI-generated or user-uploaded files associated with agent sessions, 6302 threads, or sandboxes such as images, documents, and code outputs. 6303 The authenticated user must be a member of the team. Attempting to list 6304 artifacts for a team the caller does not have access to returns 404 6305 rather than 403 to avoid leaking team existence. 6306 Results are returned in a single page without cursor pagination. Each 6307 artifact in the response reflects the state of its current version, 6308 including a short-lived signed `file_url` for direct download. 6309 6310 Args: 6311 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 6312 group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match. 6313 group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key. 6314 6315 Returns: 6316 Successful response 6317 """ 6318 query: dict[str, object] = {} 6319 if group_key is not None: 6320 query["group_key"] = group_key 6321 if group_key_prefix is not None: 6322 query["group_key_prefix"] = group_key_prefix 6323 return self._http.request( 6324 f"/api/v1/teams/{team}/artifacts", 6325 query=query, 6326 response_type=TeamArtifactsResponse, 6327 )
List a team's artifacts
Returns all artifacts owned by the specified team. Artifacts represent
AI-generated or user-uploaded files associated with agent sessions,
threads, or sandboxes such as images, documents, and code outputs.
The authenticated user must be a member of the team. Attempting to list
artifacts for a team the caller does not have access to returns 404
rather than 403 to avoid leaking team existence.
Results are returned in a single page without cursor pagination. Each
artifact in the response reflects the state of its current version,
including a short-lived signed file_url for direct download.
Arguments:
- team: Team ID (
tea_...). The authenticated user must be a member of this team. - group_key: Case-sensitive exact group key. Mutually exclusive with group_key_prefix; null keys do not match.
- group_key_prefix: Nonempty case-sensitive literal prefix (percent, underscore and backslash are literal). Mutually exclusive with group_key.
Returns:
Successful response
6329 def dependents(self, team: str) -> TeamDeleteImpactResponse: 6330 """ 6331 Preview Team deletion impact 6332 Returns the number of stored custom-object rows that deleting this Team will 6333 physically delete. The count includes rows hidden after ordinary soft 6334 deletion. This read-only preview does not delete or restore data. 6335 6336 Args: 6337 team: Team ID (`team_...`) to inspect. 6338 6339 Returns: 6340 Stored custom-object rows and the existing physical-deletion contract. 6341 """ 6342 return self._http.request( 6343 f"/api/v1/teams/{team}/dependents", 6344 response_type=TeamDeleteImpactResponse, 6345 )
Preview Team deletion impact Returns the number of stored custom-object rows that deleting this Team will physically delete. The count includes rows hidden after ordinary soft deletion. This read-only preview does not delete or restore data.
Arguments:
- team: Team ID (
team_...) to inspect.
Returns:
Stored custom-object rows and the existing physical-deletion contract.
6347 def invites(self, team: str) -> TeamInvitesResponse: 6348 """ 6349 Create a team invite (server-to-server) 6350 Generates a new invite code for the specified team using server-to-server 6351 authentication. Unlike the user-facing create endpoint, this variant does not 6352 require the caller to be a team member it is intended for privileged 6353 back-end services acting on behalf of your platform. 6354 The returned code is a short alphanumeric string that users can present to 6355 join the team. Each call produces a new code; previously issued codes are 6356 not invalidated by this request. 6357 6358 Args: 6359 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 6360 6361 Returns: 6362 Successful response 6363 """ 6364 return self._http.request( 6365 f"/api/v1/teams/{team}/invites", 6366 method="POST", 6367 response_type=TeamInvitesResponse, 6368 )
Create a team invite (server-to-server) Generates a new invite code for the specified team using server-to-server authentication. Unlike the user-facing create endpoint, this variant does not require the caller to be a team member it is intended for privileged back-end services acting on behalf of your platform. The returned code is a short alphanumeric string that users can present to join the team. Each call produces a new code; previously issued codes are not invalidated by this request.
Arguments:
- team: Team ID (
tm_...) identifying the team for which to generate the invite code.
Returns:
Successful response
6370 def join(self, team: str, input: TeamJoinInput) -> None: 6371 """ 6372 Join a team 6373 Adds a principal to a team that is visible to the authenticated user. 6374 By default, the currently authenticated user joins the team. Provide `agent` 6375 to add an agent to the team instead the caller must already be a member of 6376 the team to do so. Provide `user` (by ID) or `email` to add another user from 6377 your organization the caller must be a team owner, team admin, or org admin. 6378 Only one of `agent`, `user`, or `email` may be supplied per request. 6379 If the target principal is already a member of the team, the request succeeds 6380 without creating a duplicate membership. Server-to-server callers are not 6381 permitted to use this endpoint; use the invite-code endpoint instead. 6382 6383 Args: 6384 team: Team ID (`team_...`) to join. 6385 input: Request body. 6386 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 6387 input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 6388 input.user: User ID (`user_...`) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role. 6389 6390 Returns: 6391 Empty response the principal is now a member of the team. 6392 """ 6393 self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input)
Join a team
Adds a principal to a team that is visible to the authenticated user.
By default, the currently authenticated user joins the team. Provide agent
to add an agent to the team instead the caller must already be a member of
the team to do so. Provide user (by ID) or email to add another user from
your organization the caller must be a team owner, team admin, or org admin.
Only one of agent, user, or email may be supplied per request.
If the target principal is already a member of the team, the request succeeds
without creating a duplicate membership. Server-to-server callers are not
permitted to use this endpoint; use the invite-code endpoint instead.
Arguments:
- team: Team ID (
team_...) to join. - input: Request body.
- input.agent: Agent ID (
agent_...) to add to the team. The caller must already be a member of the team. - input.email: Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
- input.user: User ID (
user_...) of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role.
Returns:
Empty response the principal is now a member of the team.
6395 def leave(self, team: str) -> None: 6396 """ 6397 Leave a team 6398 Removes a principal from a team. By default, the authenticated user removes 6399 themselves from the team. Provide `agent` to remove an agent instead the 6400 caller must be a member of the team to do so. 6401 Team owners cannot leave their own team. To transfer ownership first, use 6402 the update-membership endpoint, then call this endpoint. 6403 For server-to-server requests, `user` is required to identify which user 6404 should be removed. 6405 6406 Args: 6407 team: Team ID (`team_...`) to leave. 6408 6409 Returns: 6410 Empty response the principal has been removed from the team. 6411 """ 6412 self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
Leave a team
Removes a principal from a team. By default, the authenticated user removes
themselves from the team. Provide agent to remove an agent instead the
caller must be a member of the team to do so.
Team owners cannot leave their own team. To transfer ownership first, use
the update-membership endpoint, then call this endpoint.
For server-to-server requests, user is required to identify which user
should be removed.
Arguments:
- team: Team ID (
team_...) to leave.
Returns:
Empty response the principal has been removed from the team.
6414 def task_assignees(self, team: str, *, org: str | None = None) -> TeamTaskAssigneesResponse: 6415 """ 6416 List task assignees for a team 6417 Returns the list of principals users and agents that can be assigned 6418 to tasks within the team. Results include both human members and AI agents 6419 and are sorted alphabetically by display name. 6420 This endpoint is only available for team-scoped contexts. Calling it with a 6421 user-scoped owner returns a 400 error. The authenticated user must be a 6422 member of the team or hold org-admin access. App-scoped developer and 6423 server-to-server callers may list assignees for teams in their app so they 6424 can select the explicit user or agent actor required by privileged task 6425 mutations. 6426 6427 Args: 6428 team: Team ID (`tem_...`). 6429 org: Explicit organization (`org_...`) for developer and server-to-server calls. Pass null for a team outside an organization. 6430 6431 Returns: 6432 Successful response 6433 """ 6434 query: dict[str, object] = {} 6435 if org is not None: 6436 query["org"] = org 6437 return self._http.request( 6438 f"/api/v1/teams/{team}/task_assignees", 6439 query=query, 6440 response_type=TeamTaskAssigneesResponse, 6441 )
List task assignees for a team Returns the list of principals users and agents that can be assigned to tasks within the team. Results include both human members and AI agents and are sorted alphabetically by display name. This endpoint is only available for team-scoped contexts. Calling it with a user-scoped owner returns a 400 error. The authenticated user must be a member of the team or hold org-admin access. App-scoped developer and server-to-server callers may list assignees for teams in their app so they can select the explicit user or agent actor required by privileged task mutations.
Arguments:
- team: Team ID (
tem_...). - org: Explicit organization (
org_...) for developer and server-to-server calls. Pass null for a team outside an organization.
Returns:
Successful response
6443 def task_epics( 6444 self, 6445 team: str, 6446 *, 6447 user: str | None = None, 6448 org: str | None = None, 6449 source_scope: str | None = None, 6450 source_type: str | None = None, 6451 source_id: str | None = None, 6452 top_priority: int | None = None, 6453 include_closed: bool | None = None, 6454 limit: int | None = None, 6455 after_cursor: str | None = None, 6456 ) -> TeamTaskEpicsResponse: 6457 """ 6458 List an owner's epic summaries 6459 Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created. 6460 6461 Args: 6462 source_scope: Exact source scope; supply all three source fields. 6463 source_type: Exact source type. 6464 source_id: Exact source ID. 6465 top_priority: Exact highest open priority, from 0 to 4. 6466 include_closed: Include epics with no non-closed tasks; defaults to false. 6467 limit: Maximum epics; defaults to 50, capped at 100. 6468 after_cursor: Opaque forward cursor from the preceding page. 6469 6470 Returns: 6471 Successful response 6472 """ 6473 query: dict[str, object] = {} 6474 if user is not None: 6475 query["user"] = user 6476 if org is not None: 6477 query["org"] = org 6478 if source_scope is not None: 6479 query["source_scope"] = source_scope 6480 if source_type is not None: 6481 query["source_type"] = source_type 6482 if source_id is not None: 6483 query["source_id"] = source_id 6484 if top_priority is not None: 6485 query["top_priority"] = top_priority 6486 if include_closed is not None: 6487 query["include_closed"] = include_closed 6488 if limit is not None: 6489 query["limit"] = limit 6490 if after_cursor is not None: 6491 query["after_cursor"] = after_cursor 6492 return self._http.request( 6493 f"/api/v1/teams/{team}/task_epics", 6494 query=query, 6495 response_type=TeamTaskEpicsResponse, 6496 )
List an owner's epic summaries Groups tasks by their exact epic label, ordered by label. Closed tasks include cancelled tasks, but cancelled prerequisites still block. Source filters select the tasks summarized; blockers outside that selection still affect readiness. Root ranking is capped per epic and root_blockers_partial is true when that graph is truncated. No epic entity is created.
Arguments:
- source_scope: Exact source scope; supply all three source fields.
- source_type: Exact source type.
- source_id: Exact source ID.
- top_priority: Exact highest open priority, from 0 to 4.
- include_closed: Include epics with no non-closed tasks; defaults to false.
- limit: Maximum epics; defaults to 50, capped at 100.
- after_cursor: Opaque forward cursor from the preceding page.
Returns:
Successful response