archastro.platform.v1.resources.teams
1# Copyright (c) 2026 ArchAstro Inc. All Rights Reserved. 2# This file is auto-generated by @archastro/sdk-generator. Do not edit. 3# Content hash: 7b2d4a7b95b5 4 5from __future__ import annotations 6 7from datetime import datetime 8from typing import Any, Literal, Required, TypedDict 9 10from pydantic import BaseModel, Field 11 12from ...runtime.http_client import HttpClient, SyncHttpClient 13from ...types.common import CustomObject 14from ...types.teams import Team, TeamInvite, TeamMembership 15from ...types.threads import Thread 16 17 18class TeamCustomObjectCreateInput(TypedDict): 19 "Create a team custom object" 20 21 fields: dict[str, Any] 22 "Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`." 23 type: str 24 "Schema type identifier (`lookup_key`) that defines the object's fields and validation rules." 25 26 27class MemberCreateInput(TypedDict, total=False): 28 "Add a member to a team" 29 30 agent: str | None 31 "Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`." 32 role: str | None 33 'Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.' 34 user: str | None 35 "User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`." 36 37 38class MemberUpdateInput(TypedDict): 39 "Update a team member's role" 40 41 role: str 42 'New role to assign. One of `"owner"`, `"admin"`, or `"member"`.' 43 44 45class TeamThreadCreateInputThreadProfilePicture(TypedDict, total=False): 46 data: str | None 47 "Base64-encoded image bytes." 48 filename: str | None 49 "Original filename of the uploaded image, used for display and content-type inference." 50 mime_type: str | None 51 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.' 52 53 54class TeamThreadCreateInputThreadSettings(TypedDict, total=False): 55 agent_enabled: bool | None 56 "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." 57 58 59class TeamThreadCreateInputThread(TypedDict, total=False): 60 create_legacy_agent: bool | None 61 "When `true`, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model." 62 description: str | None 63 "Optional longer description of the thread's purpose. `null` if not provided." 64 is_unlisted: bool | None 65 "When `true`, the thread is hidden from the default thread list and accessible only by direct link or ID." 66 key: str | None 67 "Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization." 68 metadata: dict[str, Any] | None 69 "Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers." 70 muted: bool | None 71 "When `true`, push and in-app notifications for this thread are suppressed for the creating user." 72 org_id: str | None 73 "ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted." 74 profile_picture: TeamThreadCreateInputThreadProfilePicture | None 75 "Optional profile image for the thread, provided as a base64-encoded payload." 76 settings: TeamThreadCreateInputThreadSettings | None 77 "Configuration overrides for the thread, such as AI model selection and context window settings." 78 title: str | None 79 "Display name for the thread. `null` if omitted, which causes the thread to be untitled." 80 81 82class TeamThreadCreateInput(TypedDict, total=False): 83 "Create a thread for a team" 84 85 skip_welcome_message: bool | None 86 "When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`." 87 thread: Required[TeamThreadCreateInputThread] 88 "Attributes for the new thread. See ThreadCreateParams for available fields." 89 90 91class TeamCreateInputAclAddItem(TypedDict, total=False): 92 actions: Required[list[str]] 93 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 94 principal: str | None 95 '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"`.' 96 principal_type: Required[str] 97 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 98 99 100class TeamCreateInputAclGrantsItem(TypedDict, total=False): 101 actions: Required[list[str]] 102 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 103 principal: str | None 104 '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"`.' 105 principal_type: Required[str] 106 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 107 108 109class TeamCreateInputAclRemoveItem(TypedDict, total=False): 110 principal: str | None 111 '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"`.' 112 principal_type: Required[str] 113 'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 114 115 116class TeamCreateInputAcl(TypedDict, total=False): 117 add: list[TeamCreateInputAclAddItem] | None 118 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 119 grants: list[TeamCreateInputAclGrantsItem] | None 120 "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`." 121 remove: list[TeamCreateInputAclRemoveItem] | None 122 "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`." 123 124 125class TeamCreateInput(TypedDict, total=False): 126 "Create a team" 127 128 acl: TeamCreateInputAcl | None 129 "Access control configuration for the team. Controls who can discover and join the team." 130 description: str | None 131 "Optional human-readable description of the team's purpose." 132 metadata: dict[str, Any] | None 133 "Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings." 134 name: Required[str] 135 "Display name for the team." 136 org: str | None 137 "Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation." 138 139 140class TeamJoinByCodeInput(TypedDict, total=False): 141 "Join a team with an invite code" 142 143 agent: str | None 144 "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." 145 invite_code: str | None 146 "12-character invite code alias for `join_code` accepted for backwards compatibility." 147 join_code: str | None 148 "12-character invite code that identifies the team. Mutually usable with `invite_code`." 149 user: str | None 150 "User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied." 151 152 153class TeamUpdateInputAclAddItem(TypedDict, total=False): 154 actions: Required[list[str]] 155 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 156 principal: str | None 157 '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"`.' 158 principal_type: Required[str] 159 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 160 161 162class TeamUpdateInputAclGrantsItem(TypedDict, total=False): 163 actions: Required[list[str]] 164 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 165 principal: str | None 166 '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"`.' 167 principal_type: Required[str] 168 'The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 169 170 171class TeamUpdateInputAclRemoveItem(TypedDict, total=False): 172 principal: str | None 173 '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"`.' 174 principal_type: Required[str] 175 'The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.' 176 177 178class TeamUpdateInputAcl(TypedDict, total=False): 179 add: list[TeamUpdateInputAclAddItem] | None 180 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 181 grants: list[TeamUpdateInputAclGrantsItem] | None 182 "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`." 183 remove: list[TeamUpdateInputAclRemoveItem] | None 184 "Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`." 185 186 187class TeamUpdateInputProfilePicture(TypedDict, total=False): 188 data: str | None 189 "Base64-encoded binary image data." 190 filename: str | None 191 "Original filename of the image, used for storage metadata." 192 mime_type: str | None 193 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.' 194 195 196class TeamUpdateInput(TypedDict, total=False): 197 "Update a team" 198 199 acl: TeamUpdateInputAcl | None 200 "New access control configuration for the team. Replaces the existing ACL." 201 description: str | None 202 "New human-readable description of the team's purpose." 203 metadata: dict[str, Any] | None 204 "Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely." 205 name: str | None 206 "New display name for the team." 207 profile_picture: TeamUpdateInputProfilePicture | None 208 "New profile picture for the team. Provide this object to upload and replace the current picture." 209 210 211class TeamJoinInput(TypedDict, total=False): 212 "Join a team" 213 214 agent: str | None 215 "Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team." 216 email: str | None 217 "Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role." 218 user: str | None 219 "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." 220 221 222class TeamCustomObjectListResponseDataItem(BaseModel): 223 created_at: datetime | None = Field( 224 default=None, description="When the custom object was created (ISO 8601)." 225 ) 226 fields: dict[str, Any] | None = Field( 227 default=None, 228 description="Map of field names to their current values as defined by the object's schema type.", 229 ) 230 id: str = Field(..., description="Unique identifier for the custom object (`cobj_...`).") 231 org: str | None = Field( 232 default=None, description="ID of the organization this object belongs to (`org_...`)." 233 ) 234 row_key: str | None = Field( 235 default=None, 236 description="An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set.", 237 ) 238 sandbox: str | None = Field( 239 default=None, 240 description="ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects.", 241 ) 242 schema_type: str | None = Field( 243 default=None, 244 description="The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set.", 245 ) 246 team: str | None = Field( 247 default=None, 248 description="ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped.", 249 ) 250 updated_at: datetime | None = Field( 251 default=None, 252 description="When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation.", 253 ) 254 user: str | None = Field( 255 default=None, 256 description="ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped.", 257 ) 258 version: int | None = Field( 259 default=None, 260 description="Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.", 261 ) 262 263 264class TeamCustomObjectListResponse(BaseModel): 265 """ 266 Successful response 267 """ 268 269 data: list[TeamCustomObjectListResponseDataItem] = Field( 270 ..., description="Array of custom object records for the current page." 271 ) 272 meta: dict[str, Any] | None = Field( 273 default=None, description="Pagination metadata for the response." 274 ) 275 276 277class MemberListResponseDataItemAgentAclAddItem(BaseModel): 278 actions: list[str] = Field( 279 ..., 280 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 281 ) 282 principal: str | None = Field( 283 default=None, 284 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"`.', 285 ) 286 principal_type: str = Field( 287 ..., 288 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 289 ) 290 291 292class MemberListResponseDataItemAgentAclGrantsItem(BaseModel): 293 actions: list[str] = Field( 294 ..., 295 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 296 ) 297 principal: str | None = Field( 298 default=None, 299 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"`.', 300 ) 301 principal_type: str = Field( 302 ..., 303 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 304 ) 305 306 307class MemberListResponseDataItemAgentAclRemoveItem(BaseModel): 308 principal: str | None = Field( 309 default=None, 310 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"`.', 311 ) 312 principal_type: str = Field( 313 ..., 314 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 315 ) 316 317 318class MemberListResponseDataItemAgentAcl(BaseModel): 319 add: list[MemberListResponseDataItemAgentAclAddItem] | None = Field( 320 default=None, 321 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 322 ) 323 grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = Field( 324 default=None, 325 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`.", 326 ) 327 remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = Field( 328 default=None, 329 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 330 ) 331 332 333class MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo(BaseModel): 334 file: str | None = Field( 335 default=None, 336 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 337 ) 338 height: int | None = Field( 339 default=None, description="Height of the image in pixels. `null` if not known." 340 ) 341 media: str | None = Field( 342 default=None, 343 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 344 ) 345 mime_type: str | None = Field( 346 default=None, 347 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 348 ) 349 refresh_url: str | None = Field( 350 default=None, 351 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.", 352 ) 353 url: str | None = Field( 354 default=None, 355 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.", 356 ) 357 width: int | None = Field( 358 default=None, description="Width of the image in pixels. `null` if not known." 359 ) 360 361 362class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(BaseModel): 363 description: str | None = Field( 364 default=None, 365 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.", 366 ) 367 display_name: str | None = Field( 368 default=None, 369 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`.", 370 ) 371 id: str | None = Field( 372 default=None, 373 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 374 ) 375 kind: str = Field( 376 ..., 377 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 378 ) 379 lookup_key: str | None = Field( 380 default=None, 381 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 382 ) 383 name: str | None = Field( 384 default=None, 385 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`.", 386 ) 387 readme_url: str | None = Field( 388 default=None, 389 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`.", 390 ) 391 virtual_path: str | None = Field( 392 default=None, 393 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 394 ) 395 396 397class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel): 398 category_keys: list[str] | None = Field( 399 default=None, 400 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 401 ) 402 created_at: datetime | None = Field( 403 default=None, description="When the Solution config was first imported (ISO 8601)." 404 ) 405 description: str | None = Field( 406 default=None, 407 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.", 408 ) 409 id: str = Field(..., description="Solution config ID (`cfg_...`).") 410 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 411 latest_solution: str | None = Field( 412 default=None, 413 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 414 ) 415 latest_version: str | None = Field( 416 default=None, 417 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 418 ) 419 lookup_key: str | None = Field( 420 default=None, 421 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 422 ) 423 metadata: dict[str, Any] | None = Field( 424 default=None, 425 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.", 426 ) 427 name: str | None = Field( 428 default=None, 429 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 430 ) 431 org: str | None = Field( 432 default=None, 433 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.", 434 ) 435 org_logo: MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo | None = Field( 436 default=None, 437 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. Carries the signed `url` plus a `refresh_url`. `null` when `org_slug` is `null` or the org has no logo.", 438 ) 439 org_name: str | None = Field( 440 default=None, 441 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 442 ) 443 org_slug: str | None = Field( 444 default=None, 445 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.", 446 ) 447 owners: list[str] = Field( 448 ..., 449 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 450 ) 451 readme_url: str | None = Field( 452 default=None, 453 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`.", 454 ) 455 solution_id: str | None = Field( 456 default=None, 457 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.", 458 ) 459 solution_version: str | None = Field( 460 default=None, 461 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 462 ) 463 tag_keys: list[str] | None = Field( 464 default=None, 465 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 466 ) 467 template_kind: str | None = Field( 468 default=None, 469 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 470 ) 471 templates: list[MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem] = Field( 472 ..., 473 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.", 474 ) 475 updated_at: datetime | None = Field( 476 default=None, description="When the Solution config was last modified (ISO 8601)." 477 ) 478 upgrade_available: bool = Field( 479 ..., 480 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.", 481 ) 482 virtual_path: str | None = Field( 483 default=None, 484 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.", 485 ) 486 487 488class MemberListResponseDataItemAgentSourceSolutionTemplate(BaseModel): 489 created_at: datetime | None = Field( 490 default=None, description="When this template config was created (ISO 8601)." 491 ) 492 description: str | None = Field( 493 default=None, 494 description="Description of the template from the config body. `null` if the current version has no `description` field.", 495 ) 496 display_name: str | None = Field( 497 default=None, 498 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 499 ) 500 id: str = Field(..., description="Template config ID (`cfg_...`).") 501 kind: str = Field( 502 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 503 ) 504 lookup_key: str | None = Field( 505 default=None, 506 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 507 ) 508 name: str | None = Field( 509 default=None, 510 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 511 ) 512 updated_at: datetime | None = Field( 513 default=None, description="When this template config was last modified (ISO 8601)." 514 ) 515 virtual_path: str | None = Field( 516 default=None, 517 description="Virtual filesystem path for this template config. `null` if not set.", 518 ) 519 520 521class MemberListResponseDataItemAgentSourceSolution(BaseModel): 522 solution: MemberListResponseDataItemAgentSourceSolutionSolution = Field( 523 ..., 524 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.", 525 ) 526 template: MemberListResponseDataItemAgentSourceSolutionTemplate = Field( 527 ..., 528 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 529 ) 530 531 532class MemberListResponseDataItemAgent(BaseModel): 533 acl: MemberListResponseDataItemAgentAcl | None = Field( 534 default=None, 535 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.", 536 ) 537 app: str | None = Field( 538 default=None, description="ID of the application that owns this agent (`dap_...`)." 539 ) 540 created_at: datetime | None = Field( 541 default=None, description="When the agent was created (ISO 8601)." 542 ) 543 default_model: str | None = Field( 544 default=None, 545 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 546 ) 547 email: str | None = Field( 548 default=None, 549 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 550 ) 551 id: str = Field(..., description="Agent ID (`agi_...`).") 552 identity: str | None = Field( 553 default=None, 554 description="System-level identity prompt that shapes the agent's persona and behavior.", 555 ) 556 last_applied_template_config: str | None = Field( 557 default=None, 558 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 559 ) 560 lookup_key: str | None = Field( 561 default=None, 562 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 563 ) 564 metadata: dict[str, Any] | None = Field( 565 default=None, 566 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 567 ) 568 name: str | None = Field( 569 default=None, description="Human-readable display name for the agent. `null` if not set." 570 ) 571 org: str | None = Field( 572 default=None, 573 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 574 ) 575 org_name: str | None = Field( 576 default=None, 577 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.", 578 ) 579 originator: str | None = Field( 580 default=None, 581 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 582 ) 583 phone_number: str | None = Field( 584 default=None, 585 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 586 ) 587 sandbox: str | None = Field( 588 default=None, 589 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 590 ) 591 source_solution: MemberListResponseDataItemAgentSourceSolution | None = Field( 592 default=None, 593 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.", 594 ) 595 team: str | None = Field( 596 default=None, 597 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 598 ) 599 template_upgrade_available: bool | None = Field( 600 default=None, 601 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 only on list endpoints; `null` on single-agent GET.", 602 ) 603 updated_at: datetime | None = Field( 604 default=None, description="When the agent was last modified (ISO 8601)." 605 ) 606 user: str | None = Field( 607 default=None, 608 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 609 ) 610 611 612class MemberListResponseDataItemProfilePicture(BaseModel): 613 file: str | None = Field( 614 default=None, 615 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 616 ) 617 height: int | None = Field( 618 default=None, description="Height of the image in pixels. `null` if not known." 619 ) 620 media: str | None = Field( 621 default=None, 622 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 623 ) 624 mime_type: str | None = Field( 625 default=None, 626 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 627 ) 628 refresh_url: str | None = Field( 629 default=None, 630 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.", 631 ) 632 url: str | None = Field( 633 default=None, 634 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.", 635 ) 636 width: int | None = Field( 637 default=None, description="Width of the image in pixels. `null` if not known." 638 ) 639 640 641class MemberListResponseDataItemUser(BaseModel): 642 alias: str | None = Field( 643 default=None, description="Short handle or alias for the user. `null` if not set." 644 ) 645 app: str | None = Field( 646 default=None, 647 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.", 648 ) 649 app_name: str | None = Field( 650 default=None, 651 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 652 ) 653 email: str | None = Field(default=None, description="Email address of the user.") 654 id: str = Field(..., description="User ID (`usr_...`).") 655 is_system_user: bool | None = Field( 656 default=None, 657 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 658 ) 659 metadata: dict[str, Any] | None = Field( 660 default=None, 661 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 662 ) 663 name: str | None = Field( 664 default=None, 665 description="Full display name of the user. `null` if the user has not set a name.", 666 ) 667 org: str | None = Field( 668 default=None, 669 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 670 ) 671 org_name: str | None = Field( 672 default=None, 673 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.", 674 ) 675 org_role: str | None = Field( 676 default=None, 677 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.', 678 ) 679 sandbox: str | None = Field( 680 default=None, 681 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 682 ) 683 sandbox_name: str | None = Field( 684 default=None, 685 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 686 ) 687 688 689class MemberListResponseDataItem(BaseModel): 690 agent: MemberListResponseDataItemAgent | None = Field( 691 default=None, 692 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.", 693 ) 694 created_at: datetime | None = Field( 695 default=None, description="When this membership record was created (ISO 8601)." 696 ) 697 id: str = Field(..., description="Team membership ID (`tmb_...`).") 698 joined_at: datetime | None = Field( 699 default=None, description="When the principal joined the team (ISO 8601)." 700 ) 701 metadata: dict[str, Any] | None = Field( 702 default=None, 703 description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.", 704 ) 705 name: str | None = Field( 706 default=None, 707 description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.", 708 ) 709 profile_picture: MemberListResponseDataItemProfilePicture | None = Field( 710 default=None, 711 description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.", 712 ) 713 role: str | None = Field( 714 default=None, 715 description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.', 716 ) 717 team: dict[str, Any] | None = Field( 718 default=None, 719 description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.", 720 ) 721 type: str | None = Field( 722 default=None, 723 description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.', 724 ) 725 updated_at: datetime | None = Field( 726 default=None, description="When this membership record was last updated (ISO 8601)." 727 ) 728 user: MemberListResponseDataItemUser | None = Field( 729 default=None, 730 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.", 731 ) 732 733 734class MemberListResponse(BaseModel): 735 """ 736 Successful response 737 """ 738 739 data: list[MemberListResponseDataItem] = Field( 740 ..., description="Array of team membership objects, including both user and agent members." 741 ) 742 743 744class TeamThreadListResponseDataItemCreator(BaseModel): 745 alias: str | None = Field( 746 default=None, description="Short handle or alias for the user. `null` if not set." 747 ) 748 app: str | None = Field( 749 default=None, 750 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.", 751 ) 752 app_name: str | None = Field( 753 default=None, 754 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 755 ) 756 email: str | None = Field(default=None, description="Email address of the user.") 757 id: str = Field(..., description="User ID (`usr_...`).") 758 is_system_user: bool | None = Field( 759 default=None, 760 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 761 ) 762 metadata: dict[str, Any] | None = Field( 763 default=None, 764 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 765 ) 766 name: str | None = Field( 767 default=None, 768 description="Full display name of the user. `null` if the user has not set a name.", 769 ) 770 org: str | None = Field( 771 default=None, 772 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 773 ) 774 org_name: str | None = Field( 775 default=None, 776 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.", 777 ) 778 org_role: str | None = Field( 779 default=None, 780 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.', 781 ) 782 sandbox: str | None = Field( 783 default=None, 784 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 785 ) 786 sandbox_name: str | None = Field( 787 default=None, 788 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 789 ) 790 791 792class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(BaseModel): 793 file: str | None = Field( 794 default=None, 795 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 796 ) 797 height: int | None = Field( 798 default=None, description="Height of the image in pixels. `null` if not known." 799 ) 800 media: str | None = Field( 801 default=None, 802 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 803 ) 804 mime_type: str | None = Field( 805 default=None, 806 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 807 ) 808 refresh_url: str | None = Field( 809 default=None, 810 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.", 811 ) 812 url: str | None = Field( 813 default=None, 814 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.", 815 ) 816 width: int | None = Field( 817 default=None, description="Width of the image in pixels. `null` if not known." 818 ) 819 820 821class TeamThreadListResponseDataItemParentMessageActorsItem(BaseModel): 822 alias: str | None = Field( 823 default=None, 824 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 825 ) 826 id: str | None = Field( 827 default=None, 828 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 829 ) 830 name: str | None = Field( 831 default=None, 832 description="Display name of the actor shown in the UI. `null` if no name is set.", 833 ) 834 profile_picture: TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture | None = ( 835 Field( 836 default=None, 837 description="Profile picture for the actor. `null` if the actor has no profile picture.", 838 ) 839 ) 840 841 842class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(BaseModel): 843 file: str | None = Field( 844 default=None, 845 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 846 ) 847 height: int | None = Field( 848 default=None, description="Height of the image in pixels. `null` if not known." 849 ) 850 media: str | None = Field( 851 default=None, 852 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 853 ) 854 mime_type: str | None = Field( 855 default=None, 856 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 857 ) 858 refresh_url: str | None = Field( 859 default=None, 860 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.", 861 ) 862 url: str | None = Field( 863 default=None, 864 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.", 865 ) 866 width: int | None = Field( 867 default=None, description="Width of the image in pixels. `null` if not known." 868 ) 869 870 871class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(BaseModel): 872 file: str | None = Field( 873 default=None, 874 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 875 ) 876 height: int | None = Field( 877 default=None, description="Height of the image in pixels. `null` if not known." 878 ) 879 media: str | None = Field( 880 default=None, 881 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 882 ) 883 mime_type: str | None = Field( 884 default=None, 885 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 886 ) 887 refresh_url: str | None = Field( 888 default=None, 889 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.", 890 ) 891 url: str | None = Field( 892 default=None, 893 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.", 894 ) 895 width: int | None = Field( 896 default=None, description="Width of the image in pixels. `null` if not known." 897 ) 898 899 900class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(BaseModel): 901 content_type: str | None = Field( 902 default=None, 903 description='MIME type of this variant\'s file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded.', 904 ) 905 created_at: datetime | None = Field( 906 default=None, description="When this variant was created (ISO 8601)." 907 ) 908 file: str | None = Field( 909 default=None, 910 description="ID of the underlying storage file that backs this variant (`fil_...`).", 911 ) 912 filename: str | None = Field( 913 default=None, 914 description="Original filename of the uploaded file for this variant. `null` if the file is not loaded.", 915 ) 916 height: int | None = Field( 917 default=None, description="Height of this variant in pixels. `null` if not recorded." 918 ) 919 id: str = Field(..., description="Media variant ID (`mvr_...`).") 920 image_source: ( 921 TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource | None 922 ) = Field( 923 default=None, 924 description="Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types.", 925 ) 926 updated_at: datetime | None = Field( 927 default=None, description="When this variant was last updated (ISO 8601)." 928 ) 929 url: str | None = Field( 930 default=None, 931 description="Signed download URL for this variant, resolved at request time. `null` if the file is unavailable.", 932 ) 933 variant_key: str | None = Field( 934 default=None, 935 description='Identifier for this variant\'s processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview).', 936 ) 937 width: int | None = Field( 938 default=None, description="Width of this variant in pixels. `null` if not recorded." 939 ) 940 941 942class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): 943 content_type: str | None = Field( 944 default=None, 945 description='MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 946 ) 947 description: str | None = Field( 948 default=None, 949 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.", 950 ) 951 filename: str | None = Field( 952 default=None, 953 description='Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 954 ) 955 height: int | None = Field( 956 default=None, 957 description="Height in pixels of the media item. Present on `media` type only. `null` otherwise.", 958 ) 959 id: str = Field(..., description="Unique identifier for this attachment within the message.") 960 image_height: int | None = Field( 961 default=None, 962 description="Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 963 ) 964 image_source: TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource | None = ( 965 Field( 966 default=None, 967 description="Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise.", 968 ) 969 ) 970 image_url: str | None = Field( 971 default=None, 972 description="URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise.", 973 ) 974 image_width: int | None = Field( 975 default=None, 976 description="Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 977 ) 978 media_type: str | None = Field( 979 default=None, 980 description='The media category, e.g. `"video"` or `"audio"`. Present on `media` type only. `null` otherwise.', 981 ) 982 name: str | None = Field( 983 default=None, 984 description="Display name of the media item. Present on `media` type only. `null` otherwise.", 985 ) 986 object: dict[str, Any] | None = Field( 987 default=None, 988 description="The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. `null` on other types.", 989 ) 990 title: str | None = Field( 991 default=None, 992 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.", 993 ) 994 type: str = Field( 995 ..., 996 description='The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, or `"action"`. Determines which additional fields are present.', 997 ) 998 url: str | None = Field( 999 default=None, 1000 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.", 1001 ) 1002 variants: ( 1003 list[TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem] | None 1004 ) = Field( 1005 default=None, 1006 description="Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only. `null` otherwise.", 1007 ) 1008 version: int | None = Field( 1009 default=None, 1010 description="Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise.", 1011 ) 1012 width: int | None = Field( 1013 default=None, 1014 description="Width in pixels of the media item. Present on `media` type only. `null` otherwise.", 1015 ) 1016 1017 1018class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel): 1019 payload: dict[str, Any] | None = Field( 1020 default=None, 1021 description='Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `" "`).', 1022 ) 1023 type: str = Field( 1024 ..., 1025 description='Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions.', 1026 ) 1027 user: str | None = Field( 1028 default=None, description="Public ID of the user who added the reaction (`usr_...`)." 1029 ) 1030 1031 1032class TeamThreadListResponseDataItemParentMessage(BaseModel): 1033 actors: list[TeamThreadListResponseDataItemParentMessageActorsItem] | None = Field( 1034 default=None, 1035 description="Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.", 1036 ) 1037 agent: str | None = Field( 1038 default=None, 1039 description="ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users.", 1040 ) 1041 agent_mode: Literal["cli", "embedded"] | None = Field( 1042 default=None, 1043 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.", 1044 ) 1045 attachments: list[TeamThreadListResponseDataItemParentMessageAttachmentsItem] | None = Field( 1046 default=None, 1047 description="Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.", 1048 ) 1049 branched_thread: str | None = Field( 1050 default=None, 1051 description="ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread.", 1052 ) 1053 content: str | None = Field( 1054 default=None, 1055 description="Text content of the message. `null` for messages that contain only attachments.", 1056 ) 1057 created_at: datetime | None = Field( 1058 default=None, description="When the message was posted (ISO 8601)." 1059 ) 1060 has_replies: bool | None = Field( 1061 default=None, 1062 description="Whether this message has at least one reply. Only present when explicitly requested or computed by the server.", 1063 ) 1064 id: str = Field(..., description="Message ID (`msg_...`).") 1065 idempotency_key: str | None = Field( 1066 default=None, 1067 description="Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one.", 1068 ) 1069 legacy_agent: str | None = Field( 1070 default=None, 1071 description="Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users.", 1072 ) 1073 metadata: dict[str, Any] | None = Field( 1074 default=None, 1075 description="Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.", 1076 ) 1077 org: str | None = Field( 1078 default=None, description="ID of the organization that owns this message (`org_...`)." 1079 ) 1080 reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = Field( 1081 default=None, 1082 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.", 1083 ) 1084 rendering_mode: str | None = Field( 1085 default=None, 1086 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.', 1087 ) 1088 replies: list[dict[str, Any]] | None = Field( 1089 default=None, 1090 description="Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.", 1091 ) 1092 replies_after_cursor: str | None = Field( 1093 default=None, 1094 description="Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.", 1095 ) 1096 replies_before_cursor: str | None = Field( 1097 default=None, 1098 description="Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.", 1099 ) 1100 reply_count: int | None = Field( 1101 default=None, 1102 description="Total number of direct replies to this message. Only present when explicitly requested or computed by the server.", 1103 ) 1104 reply_to: dict[str, Any] | None = Field( 1105 default=None, 1106 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.", 1107 ) 1108 sandbox: str | None = Field( 1109 default=None, 1110 description="ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages.", 1111 ) 1112 team: str | None = Field( 1113 default=None, 1114 description="ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped.", 1115 ) 1116 thread: str | None = Field( 1117 default=None, 1118 description="ID of the thread this message belongs to (`thr_...`). `null` for messages not yet associated with a thread.", 1119 ) 1120 user: str | None = Field( 1121 default=None, 1122 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.", 1123 ) 1124 1125 1126class TeamThreadListResponseDataItemParticipantsItem(BaseModel): 1127 alias: str | None = Field( 1128 default=None, description="Short handle or alias for the user. `null` if not set." 1129 ) 1130 app: str | None = Field( 1131 default=None, 1132 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.", 1133 ) 1134 app_name: str | None = Field( 1135 default=None, 1136 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 1137 ) 1138 email: str | None = Field(default=None, description="Email address of the user.") 1139 id: str = Field(..., description="User ID (`usr_...`).") 1140 is_system_user: bool | None = Field( 1141 default=None, 1142 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 1143 ) 1144 metadata: dict[str, Any] | None = Field( 1145 default=None, 1146 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 1147 ) 1148 name: str | None = Field( 1149 default=None, 1150 description="Full display name of the user. `null` if the user has not set a name.", 1151 ) 1152 org: str | None = Field( 1153 default=None, 1154 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 1155 ) 1156 org_name: str | None = Field( 1157 default=None, 1158 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.", 1159 ) 1160 org_role: str | None = Field( 1161 default=None, 1162 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.', 1163 ) 1164 sandbox: str | None = Field( 1165 default=None, 1166 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 1167 ) 1168 sandbox_name: str | None = Field( 1169 default=None, 1170 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 1171 ) 1172 1173 1174class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(BaseModel): 1175 actions: list[str] = Field( 1176 ..., 1177 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1178 ) 1179 principal: str | None = Field( 1180 default=None, 1181 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"`.', 1182 ) 1183 principal_type: str = Field( 1184 ..., 1185 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1186 ) 1187 1188 1189class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(BaseModel): 1190 actions: list[str] = Field( 1191 ..., 1192 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1193 ) 1194 principal: str | None = Field( 1195 default=None, 1196 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"`.', 1197 ) 1198 principal_type: str = Field( 1199 ..., 1200 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1201 ) 1202 1203 1204class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(BaseModel): 1205 principal: str | None = Field( 1206 default=None, 1207 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"`.', 1208 ) 1209 principal_type: str = Field( 1210 ..., 1211 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1212 ) 1213 1214 1215class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(BaseModel): 1216 add: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem] | None = Field( 1217 default=None, 1218 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 1219 ) 1220 grants: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem] | None = Field( 1221 default=None, 1222 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`.", 1223 ) 1224 remove: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem] | None = Field( 1225 default=None, 1226 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 1227 ) 1228 1229 1230class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo(BaseModel): 1231 file: str | None = Field( 1232 default=None, 1233 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1234 ) 1235 height: int | None = Field( 1236 default=None, description="Height of the image in pixels. `null` if not known." 1237 ) 1238 media: str | None = Field( 1239 default=None, 1240 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1241 ) 1242 mime_type: str | None = Field( 1243 default=None, 1244 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1245 ) 1246 refresh_url: str | None = Field( 1247 default=None, 1248 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.", 1249 ) 1250 url: str | None = Field( 1251 default=None, 1252 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.", 1253 ) 1254 width: int | None = Field( 1255 default=None, description="Width of the image in pixels. `null` if not known." 1256 ) 1257 1258 1259class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem( 1260 BaseModel 1261): 1262 description: str | None = Field( 1263 default=None, 1264 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.", 1265 ) 1266 display_name: str | None = Field( 1267 default=None, 1268 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`.", 1269 ) 1270 id: str | None = Field( 1271 default=None, 1272 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 1273 ) 1274 kind: str = Field( 1275 ..., 1276 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 1277 ) 1278 lookup_key: str | None = Field( 1279 default=None, 1280 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 1281 ) 1282 name: str | None = Field( 1283 default=None, 1284 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`.", 1285 ) 1286 readme_url: str | None = Field( 1287 default=None, 1288 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`.", 1289 ) 1290 virtual_path: str | None = Field( 1291 default=None, 1292 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 1293 ) 1294 1295 1296class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(BaseModel): 1297 category_keys: list[str] | None = Field( 1298 default=None, 1299 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 1300 ) 1301 created_at: datetime | None = Field( 1302 default=None, description="When the Solution config was first imported (ISO 8601)." 1303 ) 1304 description: str | None = Field( 1305 default=None, 1306 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.", 1307 ) 1308 id: str = Field(..., description="Solution config ID (`cfg_...`).") 1309 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 1310 latest_solution: str | None = Field( 1311 default=None, 1312 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 1313 ) 1314 latest_version: str | None = Field( 1315 default=None, 1316 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 1317 ) 1318 lookup_key: str | None = Field( 1319 default=None, 1320 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 1321 ) 1322 metadata: dict[str, Any] | None = Field( 1323 default=None, 1324 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.", 1325 ) 1326 name: str | None = Field( 1327 default=None, 1328 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 1329 ) 1330 org: str | None = Field( 1331 default=None, 1332 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.", 1333 ) 1334 org_logo: ( 1335 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo | None 1336 ) = Field( 1337 default=None, 1338 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. Carries the signed `url` plus a `refresh_url`. `null` when `org_slug` is `null` or the org has no logo.", 1339 ) 1340 org_name: str | None = Field( 1341 default=None, 1342 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 1343 ) 1344 org_slug: str | None = Field( 1345 default=None, 1346 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.", 1347 ) 1348 owners: list[str] = Field( 1349 ..., 1350 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 1351 ) 1352 readme_url: str | None = Field( 1353 default=None, 1354 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`.", 1355 ) 1356 solution_id: str | None = Field( 1357 default=None, 1358 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.", 1359 ) 1360 solution_version: str | None = Field( 1361 default=None, 1362 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 1363 ) 1364 tag_keys: list[str] | None = Field( 1365 default=None, 1366 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 1367 ) 1368 template_kind: str | None = Field( 1369 default=None, 1370 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 1371 ) 1372 templates: list[ 1373 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem 1374 ] = Field( 1375 ..., 1376 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.", 1377 ) 1378 updated_at: datetime | None = Field( 1379 default=None, description="When the Solution config was last modified (ISO 8601)." 1380 ) 1381 upgrade_available: bool = Field( 1382 ..., 1383 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.", 1384 ) 1385 virtual_path: str | None = Field( 1386 default=None, 1387 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.", 1388 ) 1389 1390 1391class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(BaseModel): 1392 created_at: datetime | None = Field( 1393 default=None, description="When this template config was created (ISO 8601)." 1394 ) 1395 description: str | None = Field( 1396 default=None, 1397 description="Description of the template from the config body. `null` if the current version has no `description` field.", 1398 ) 1399 display_name: str | None = Field( 1400 default=None, 1401 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 1402 ) 1403 id: str = Field(..., description="Template config ID (`cfg_...`).") 1404 kind: str = Field( 1405 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 1406 ) 1407 lookup_key: str | None = Field( 1408 default=None, 1409 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 1410 ) 1411 name: str | None = Field( 1412 default=None, 1413 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 1414 ) 1415 updated_at: datetime | None = Field( 1416 default=None, description="When this template config was last modified (ISO 8601)." 1417 ) 1418 virtual_path: str | None = Field( 1419 default=None, 1420 description="Virtual filesystem path for this template config. `null` if not set.", 1421 ) 1422 1423 1424class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(BaseModel): 1425 solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution = Field( 1426 ..., 1427 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.", 1428 ) 1429 template: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate = Field( 1430 ..., 1431 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 1432 ) 1433 1434 1435class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel): 1436 acl: TeamThreadListResponseDataItemParticipatingAgentsItemAcl | None = Field( 1437 default=None, 1438 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.", 1439 ) 1440 app: str | None = Field( 1441 default=None, description="ID of the application that owns this agent (`dap_...`)." 1442 ) 1443 created_at: datetime | None = Field( 1444 default=None, description="When the agent was created (ISO 8601)." 1445 ) 1446 default_model: str | None = Field( 1447 default=None, 1448 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 1449 ) 1450 email: str | None = Field( 1451 default=None, 1452 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 1453 ) 1454 id: str = Field(..., description="Agent ID (`agi_...`).") 1455 identity: str | None = Field( 1456 default=None, 1457 description="System-level identity prompt that shapes the agent's persona and behavior.", 1458 ) 1459 last_applied_template_config: str | None = Field( 1460 default=None, 1461 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 1462 ) 1463 lookup_key: str | None = Field( 1464 default=None, 1465 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 1466 ) 1467 metadata: dict[str, Any] | None = Field( 1468 default=None, 1469 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 1470 ) 1471 name: str | None = Field( 1472 default=None, description="Human-readable display name for the agent. `null` if not set." 1473 ) 1474 org: str | None = Field( 1475 default=None, 1476 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 1477 ) 1478 org_name: str | None = Field( 1479 default=None, 1480 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.", 1481 ) 1482 originator: str | None = Field( 1483 default=None, 1484 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 1485 ) 1486 phone_number: str | None = Field( 1487 default=None, 1488 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 1489 ) 1490 sandbox: str | None = Field( 1491 default=None, 1492 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 1493 ) 1494 source_solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution | None = ( 1495 Field( 1496 default=None, 1497 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.", 1498 ) 1499 ) 1500 team: str | None = Field( 1501 default=None, 1502 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 1503 ) 1504 template_upgrade_available: bool | None = Field( 1505 default=None, 1506 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 only on list endpoints; `null` on single-agent GET.", 1507 ) 1508 updated_at: datetime | None = Field( 1509 default=None, description="When the agent was last modified (ISO 8601)." 1510 ) 1511 user: str | None = Field( 1512 default=None, 1513 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 1514 ) 1515 1516 1517class TeamThreadListResponseDataItemSettings(BaseModel): 1518 agent_enabled: bool | None = Field( 1519 default=None, 1520 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.", 1521 ) 1522 1523 1524class TeamThreadListResponseDataItem(BaseModel): 1525 agent_user: str | None = Field( 1526 default=None, 1527 description="ID of the agent that owns this thread (`agt_...`). `null` for user-owned or team-owned threads.", 1528 ) 1529 created_at: datetime | None = Field( 1530 default=None, description="When the thread was created (ISO 8601)." 1531 ) 1532 creator: TeamThreadListResponseDataItemCreator | None = Field( 1533 default=None, 1534 description="Expanded user object for the user who created this thread. Populated only when the association is loaded.", 1535 ) 1536 description: str | None = Field( 1537 default=None, 1538 description="Optional description or purpose statement for the thread. `null` if not set.", 1539 ) 1540 id: str = Field(..., description="Thread ID (`thr_...`).") 1541 is_channel: bool | None = Field( 1542 default=None, 1543 description="Whether this thread operates as a channel a multi-member broadcast-style conversation.", 1544 ) 1545 is_default: bool | None = Field( 1546 default=None, 1547 description="Whether this is the default thread for its owner. Each user or team has at most one default thread.", 1548 ) 1549 is_transient: bool | None = Field( 1550 default=None, 1551 description="Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.", 1552 ) 1553 is_unlisted: bool | None = Field( 1554 default=None, 1555 description="Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.", 1556 ) 1557 key: str | None = Field( 1558 default=None, 1559 description="Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. `null` if not set.", 1560 ) 1561 last_activity: datetime | None = Field( 1562 default=None, 1563 description="When the last message or activity occurred in this thread. Present only when activity enrichment is requested.", 1564 ) 1565 metadata: dict[str, Any] | None = Field( 1566 default=None, 1567 description="Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set.", 1568 ) 1569 muted: bool | None = Field( 1570 default=None, 1571 description="Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery.", 1572 ) 1573 org: str | None = Field( 1574 default=None, 1575 description="ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context.", 1576 ) 1577 parent_message: TeamThreadListResponseDataItemParentMessage | None = Field( 1578 default=None, 1579 description="The message that spawned this thread as a sub-thread. `null` for top-level threads.", 1580 ) 1581 participant: list[str] | None = Field( 1582 default=None, 1583 description="Array of participant user IDs (`usr_...`) who are members of this thread.", 1584 ) 1585 participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = Field( 1586 default=None, 1587 description="Expanded participant user objects for each member of this thread. Populated only when the association is loaded.", 1588 ) 1589 participating_actor: list[str] | None = Field( 1590 default=None, 1591 description="Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.", 1592 ) 1593 participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = ( 1594 Field( 1595 default=None, 1596 description="Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.", 1597 ) 1598 ) 1599 role: str | None = Field( 1600 default=None, 1601 description='The authenticated user\'s membership role in this thread, e.g. `"owner"`, `"member"`, or `"viewer"`. `null` if the user is not a member.', 1602 ) 1603 sandbox: str | None = Field( 1604 default=None, 1605 description="ID of the developer sandbox this thread is scoped to (`sbx_...`). `null` for production threads.", 1606 ) 1607 settings: TeamThreadListResponseDataItemSettings | None = Field( 1608 default=None, 1609 description="Per-thread configuration settings controlling AI agent behavior for this thread.", 1610 ) 1611 slug: str | None = Field( 1612 default=None, 1613 description="URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned.", 1614 ) 1615 sub_threads: list[dict[str, Any]] | None = Field( 1616 default=None, 1617 description="Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.", 1618 ) 1619 team: str | None = Field( 1620 default=None, 1621 description="ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads.", 1622 ) 1623 title: str | None = Field( 1624 default=None, 1625 description="Human-readable name of the thread. `null` if no title has been set.", 1626 ) 1627 ttl: int | None = Field( 1628 default=None, 1629 description="Time-to-live in seconds after which the thread may be automatically cleaned up. `null` if the thread does not expire.", 1630 ) 1631 unread_count: int | None = Field( 1632 default=None, 1633 description="Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.", 1634 ) 1635 updated_at: datetime | None = Field( 1636 default=None, description="When the thread was last modified (ISO 8601)." 1637 ) 1638 user: str | None = Field( 1639 default=None, 1640 description="ID of the user who owns this thread (`usr_...`). `null` for team-owned or agent-owned threads.", 1641 ) 1642 1643 1644class TeamThreadListResponse(BaseModel): 1645 """ 1646 Successful response 1647 """ 1648 1649 data: list[TeamThreadListResponseDataItem] = Field( 1650 ..., description="Array of thread objects belonging to the team." 1651 ) 1652 1653 1654class TeamListResponseDataItemAclAddItem(BaseModel): 1655 actions: list[str] = Field( 1656 ..., 1657 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1658 ) 1659 principal: str | None = Field( 1660 default=None, 1661 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"`.', 1662 ) 1663 principal_type: str = Field( 1664 ..., 1665 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1666 ) 1667 1668 1669class TeamListResponseDataItemAclGrantsItem(BaseModel): 1670 actions: list[str] = Field( 1671 ..., 1672 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1673 ) 1674 principal: str | None = Field( 1675 default=None, 1676 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"`.', 1677 ) 1678 principal_type: str = Field( 1679 ..., 1680 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1681 ) 1682 1683 1684class TeamListResponseDataItemAclRemoveItem(BaseModel): 1685 principal: str | None = Field( 1686 default=None, 1687 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"`.', 1688 ) 1689 principal_type: str = Field( 1690 ..., 1691 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1692 ) 1693 1694 1695class TeamListResponseDataItemAcl(BaseModel): 1696 add: list[TeamListResponseDataItemAclAddItem] | None = Field( 1697 default=None, 1698 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 1699 ) 1700 grants: list[TeamListResponseDataItemAclGrantsItem] | None = Field( 1701 default=None, 1702 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`.", 1703 ) 1704 remove: list[TeamListResponseDataItemAclRemoveItem] | None = Field( 1705 default=None, 1706 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 1707 ) 1708 1709 1710class TeamListResponseDataItem(BaseModel): 1711 acl: TeamListResponseDataItemAcl | None = Field( 1712 default=None, 1713 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.", 1714 ) 1715 app: str | None = Field( 1716 default=None, 1717 description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.", 1718 ) 1719 badges: dict[str, Any] | None = Field( 1720 default=None, 1721 description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.", 1722 ) 1723 created_at: datetime | None = Field( 1724 default=None, description="When this team was created (ISO 8601)." 1725 ) 1726 description: str | None = Field( 1727 default=None, 1728 description="Human-readable description of the team's purpose. `null` if not set.", 1729 ) 1730 id: str = Field(..., description="Team ID (`tem_...`).") 1731 membership_status: str | None = Field( 1732 default=None, 1733 description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.', 1734 ) 1735 metadata: dict[str, Any] | None = Field( 1736 default=None, 1737 description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.", 1738 ) 1739 name: str | None = Field(default=None, description="Display name of the team.") 1740 org: str | None = Field( 1741 default=None, 1742 description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.", 1743 ) 1744 sandbox: str | None = Field( 1745 default=None, 1746 description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.", 1747 ) 1748 slug: str | None = Field( 1749 default=None, 1750 description="URL-safe slug for the team, derived from the team name. `null` if not set.", 1751 ) 1752 updated_at: datetime | None = Field( 1753 default=None, description="When this team was last updated (ISO 8601)." 1754 ) 1755 1756 1757class TeamListResponse(BaseModel): 1758 """ 1759 Successful response 1760 """ 1761 1762 data: list[TeamListResponseDataItem] = Field( 1763 ..., description="Array of team objects for the current page." 1764 ) 1765 has_next: bool = Field(..., description="`true` if there is a subsequent page of results.") 1766 has_prev: bool = Field(..., description="`true` if there is a preceding page of results.") 1767 page: int = Field(..., description="The current page number.") 1768 page_size: int = Field(..., description="The number of results per page.") 1769 total_entries: int = Field( 1770 ..., description="Total number of teams matching the query across all pages." 1771 ) 1772 total_pages: int = Field( 1773 ..., description="Total number of pages given the current `page_size`." 1774 ) 1775 1776 1777class TeamArtifactsResponseDataItemImageSource(BaseModel): 1778 file: str | None = Field( 1779 default=None, 1780 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1781 ) 1782 height: int | None = Field( 1783 default=None, description="Height of the image in pixels. `null` if not known." 1784 ) 1785 media: str | None = Field( 1786 default=None, 1787 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1788 ) 1789 mime_type: str | None = Field( 1790 default=None, 1791 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1792 ) 1793 refresh_url: str | None = Field( 1794 default=None, 1795 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.", 1796 ) 1797 url: str | None = Field( 1798 default=None, 1799 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.", 1800 ) 1801 width: int | None = Field( 1802 default=None, description="Width of the image in pixels. `null` if not known." 1803 ) 1804 1805 1806class TeamArtifactsResponseDataItem(BaseModel): 1807 agent: str | None = Field( 1808 default=None, 1809 description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.", 1810 ) 1811 content_type: str | None = Field( 1812 default=None, 1813 description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.', 1814 ) 1815 created_at: datetime | None = Field( 1816 default=None, description="When the artifact was first created (ISO 8601)." 1817 ) 1818 current_version: str | None = Field( 1819 default=None, 1820 description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.", 1821 ) 1822 description: str | None = Field( 1823 default=None, 1824 description="Optional longer description of the artifact's contents or purpose. `null` if not set.", 1825 ) 1826 file: str | None = Field( 1827 default=None, 1828 description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.", 1829 ) 1830 file_name: str | None = Field( 1831 default=None, 1832 description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.', 1833 ) 1834 file_url: str | None = Field( 1835 default=None, 1836 description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.", 1837 ) 1838 id: str = Field(..., description="Artifact ID (`art_...`).") 1839 image_source: TeamArtifactsResponseDataItemImageSource | None = Field( 1840 default=None, 1841 description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.', 1842 ) 1843 name: str | None = Field( 1844 default=None, 1845 description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.', 1846 ) 1847 org: str | None = Field( 1848 default=None, description="ID of the organization this artifact belongs to (`org_...`)." 1849 ) 1850 sandbox: str | None = Field( 1851 default=None, 1852 description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.", 1853 ) 1854 team: str | None = Field( 1855 default=None, 1856 description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.", 1857 ) 1858 thread: str | None = Field( 1859 default=None, 1860 description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.", 1861 ) 1862 updated_at: datetime | None = Field( 1863 default=None, description="When the artifact record was last modified (ISO 8601)." 1864 ) 1865 user: str | None = Field( 1866 default=None, 1867 description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.", 1868 ) 1869 version: int | None = Field( 1870 default=None, 1871 description="Current version number of the artifact. Increments each time a new version is published.", 1872 ) 1873 1874 1875class TeamArtifactsResponse(BaseModel): 1876 """ 1877 Successful response 1878 """ 1879 1880 data: list[TeamArtifactsResponseDataItem] = Field( 1881 ..., description="Array of artifact objects belonging to the team." 1882 ) 1883 1884 1885class TeamInvitesResponse(BaseModel): 1886 """ 1887 Successful response 1888 """ 1889 1890 code: str = Field( 1891 ..., 1892 description="Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.", 1893 ) 1894 1895 1896class AsyncTeamCustomObjectResource: 1897 def __init__(self, http: HttpClient): 1898 self._http = http 1899 1900 async def list( 1901 self, 1902 team: str, 1903 type: str, 1904 *, 1905 limit: int | None = None, 1906 offset: int | None = None, 1907 row_key: str | None = None, 1908 sort_key: str | None = None, 1909 query: str | None = None, 1910 ) -> TeamCustomObjectListResponse: 1911 """ 1912 List a team's custom objects 1913 Returns a paginated list of custom objects owned by the specified team, 1914 filtered to a single schema type. Results are ordered by creation time 1915 descending unless `query` is provided, in which case they are ordered by 1916 full-text relevance score descending. 1917 Use `limit` and `offset` for page-based pagination. Use `row_key` or 1918 `sort_key` to narrow results to objects matching those index values. 1919 Full-text search via `query` operates only against the fields configured 1920 as `search_fields` on the schema. 1921 The authenticated user must be a member of the team with sufficient 1922 access. Returns 404 if the team is not found, the caller lacks access, 1923 or `type` does not match a registered schema for the team's organization. 1924 1925 Args: 1926 team: Team ID (`team_...`). Scopes results to objects owned by this team. 1927 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 1928 limit: Maximum number of objects to return per page. 1929 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 1930 row_key: Filter results to objects whose `row_key` exactly matches this value. 1931 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 1932 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. 1933 1934 Returns: 1935 Successful response 1936 """ 1937 query: dict[str, object] = {} 1938 query["type"] = type 1939 if limit is not None: 1940 query["limit"] = limit 1941 if offset is not None: 1942 query["offset"] = offset 1943 if row_key is not None: 1944 query["row_key"] = row_key 1945 if sort_key is not None: 1946 query["sort_key"] = sort_key 1947 if query is not None: 1948 query["query"] = query 1949 return await self._http.request( 1950 f"/api/v1/teams/{team}/custom_objects", 1951 query=query, 1952 response_type=TeamCustomObjectListResponse, 1953 ) 1954 1955 async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 1956 """ 1957 Create a team custom object 1958 Creates a new custom object owned by the specified team. The object is 1959 instantiated against the schema identified by `type` (the schema's 1960 `lookup_key`). All field values are validated against that schema's 1961 field definitions before the object is persisted. 1962 The authenticated user must be a member of the team with sufficient 1963 access. If the team is not found or the caller lacks access, the endpoint 1964 returns 404. If `type` does not match a registered schema for the team's 1965 organization, the endpoint also returns 404. 1966 1967 Args: 1968 team: Team ID (`team_...`). Scopes results to objects owned by this team. 1969 input: Request body. 1970 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 1971 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 1972 1973 Returns: 1974 The newly created custom object. 1975 """ 1976 return await self._http.request( 1977 f"/api/v1/teams/{team}/custom_objects", 1978 method="POST", 1979 body=input, 1980 response_type=CustomObject, 1981 ) 1982 1983 1984class AsyncMemberResource: 1985 def __init__(self, http: HttpClient): 1986 self._http = http 1987 1988 async def remove(self, team: str) -> None: 1989 """ 1990 Remove a member or org from a team 1991 Removes a user, agent, or all members of an organization from the specified 1992 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 1993 one or none returns a 400 error. On success, returns 204 No Content. 1994 When `org` is provided, every user and agent membership belonging to that org 1995 is removed in a single call. The caller must be a member of the team's owning 1996 org to perform an org-scoped removal. You cannot target the team's owning org 1997 itself with this parameter. 1998 The caller must have permission to manage the team. When `app` is present, the 1999 request is scoped to that app and requires a valid app-scoped token. 2000 2001 Args: 2002 team: Team ID (`team_...`). The team to remove the member from. 2003 2004 Returns: 2005 Empty response. Returns 204 No Content on success. 2006 """ 2007 await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 2008 2009 async def list(self, team: str) -> MemberListResponse: 2010 """ 2011 List members of a team 2012 Returns all members of the specified team, including both users and agents. 2013 Members are returned in a single non-paginated array ordered by join time. 2014 Bearer-authenticated users must be a member of the team to retrieve its 2015 member list. Developer and server-to-server callers can retrieve members for 2016 any team visible to their app scope. When `app` is provided, the request is 2017 scoped to that app and requires a valid app-scoped token. 2018 2019 Args: 2020 team: Team ID (`team_...`). The team to remove the member from. 2021 2022 Returns: 2023 Successful response 2024 """ 2025 return await self._http.request( 2026 f"/api/v1/teams/{team}/members", 2027 response_type=MemberListResponse, 2028 ) 2029 2030 async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 2031 """ 2032 Add a member to a team 2033 Adds a user or agent as a member of the specified team and returns the new 2034 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 2035 both or neither returns a 400 error. 2036 The caller must have permission to manage the team. When an `app` is provided, 2037 the request is scoped to that app and the caller must hold a valid app-scoped 2038 token. The default role is `"member"` when `role` is omitted. 2039 2040 Args: 2041 team: Team ID (`team_...`). The team to remove the member from. 2042 input: Request body. 2043 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 2044 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 2045 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 2046 2047 Returns: 2048 The newly created team membership. 2049 """ 2050 return await self._http.request( 2051 f"/api/v1/teams/{team}/members", 2052 method="POST", 2053 body=input, 2054 response_type=TeamMembership, 2055 ) 2056 2057 async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 2058 """ 2059 Update a team member's role 2060 Changes the role of an existing user member on the specified team. Returns the 2061 updated membership on success. 2062 Only user memberships are supported by this endpoint. Attempting to update an 2063 agent membership returns 404. To change an agent's role, remove the existing 2064 membership and re-add the agent with the desired role. 2065 The caller must have permission to modify the team. You cannot change a member's 2066 role across organization boundaries. Demoting the last owner of a team returns 2067 409. An invalid `role` value returns 422. When `app` is provided, the request 2068 is scoped to that app and requires a valid app-scoped token. 2069 2070 Args: 2071 team: Team ID (`team_...`). The team to remove the member from. 2072 user: User ID (`usr_...`) of the existing member whose role should be changed. 2073 input: Request body. 2074 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 2075 2076 Returns: 2077 The updated team membership reflecting the new role. 2078 """ 2079 return await self._http.request( 2080 f"/api/v1/teams/{team}/members/{user}", 2081 method="PATCH", 2082 body=input, 2083 response_type=TeamMembership, 2084 ) 2085 2086 2087class AsyncTeamThreadResource: 2088 def __init__(self, http: HttpClient): 2089 self._http = http 2090 2091 async def list(self, team: str) -> TeamThreadListResponse: 2092 """ 2093 List threads for a team 2094 Returns all threads owned by the specified team that the authenticated caller 2095 has permission to view. The caller must have access to the team; requests 2096 without team access are rejected with 404. 2097 Threads are returned in a single `data` array. Use the team-scoped thread 2098 endpoints to create, update, or delete individual threads. 2099 2100 Args: 2101 team: Team ID (`tem_...`) whose threads should be listed. 2102 2103 Returns: 2104 Successful response 2105 """ 2106 return await self._http.request( 2107 f"/api/v1/teams/{team}/threads", 2108 response_type=TeamThreadListResponse, 2109 ) 2110 2111 async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 2112 """ 2113 Create a thread for a team 2114 Creates a new thread owned by the specified team. The authenticated caller must 2115 have access to the team; requests from callers without team access are rejected 2116 with 404. 2117 If a `profile_picture` is provided in the thread params, it must be 2118 base64-encoded image data. The image is uploaded and associated with the thread 2119 before creation completes. Omit `profile_picture` to skip this step. 2120 By default the platform sends an automatic welcome message into the new thread. 2121 Pass `skip_welcome_message: true` to suppress this behavior, for example when 2122 creating threads programmatically in bulk or seeding test data. 2123 2124 Args: 2125 team: Team ID (`tem_...`) whose threads should be listed. 2126 input: Request body. 2127 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 2128 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 2129 2130 Returns: 2131 The newly created thread. 2132 """ 2133 return await self._http.request( 2134 f"/api/v1/teams/{team}/threads", 2135 method="POST", 2136 body=input, 2137 response_type=Thread, 2138 ) 2139 2140 2141class AsyncTeamResource: 2142 def __init__(self, http: HttpClient): 2143 self._http = http 2144 self.custom_objects = AsyncTeamCustomObjectResource(http) 2145 self.members = AsyncMemberResource(http) 2146 self.threads = AsyncTeamThreadResource(http) 2147 2148 async def list( 2149 self, 2150 *, 2151 page: int | None = None, 2152 page_size: int | None = None, 2153 search: str | None = None, 2154 metadata: dict[str, Any] | None = None, 2155 membership: str | None = None, 2156 ) -> TeamListResponse: 2157 """ 2158 List teams 2159 Returns a paginated list of teams visible to the authenticated user, ordered 2160 by creation time descending. Use `membership` to narrow results to teams the 2161 caller has joined or teams they are eligible to join based on their ACL 2162 visibility. 2163 Supports full-text search across team name and description via `search`, and 2164 structured metadata filtering via `metadata`. When `app` is present, results 2165 are scoped to that app and the caller must hold the corresponding app scope. 2166 2167 Args: 2168 page: Page number to retrieve, starting at 1. Defaults to 1. 2169 page_size: Number of teams to return per page. Defaults to 25. 2170 search: Full-text search string matched against team name and description. 2171 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 2172 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. 2173 2174 Returns: 2175 Successful response 2176 """ 2177 query: dict[str, object] = {} 2178 if page is not None: 2179 query["page"] = page 2180 if page_size is not None: 2181 query["page_size"] = page_size 2182 if search is not None: 2183 query["search"] = search 2184 if metadata is not None: 2185 query["metadata"] = metadata 2186 if membership is not None: 2187 query["membership"] = membership 2188 return await self._http.request( 2189 "/api/v1/teams", 2190 query=query, 2191 response_type=TeamListResponse, 2192 ) 2193 2194 async def create(self, input: TeamCreateInput) -> Team: 2195 """ 2196 Create a team 2197 Creates a new team and returns the created team object. The authenticated 2198 user becomes the team's owner. 2199 When `app` is supplied, the request is scoped to that app and the caller 2200 must hold the corresponding app scope. Omit `org` unless you want the team 2201 pinned to a specific organization. A default chat thread is provisioned for 2202 the team automatically after creation. 2203 2204 Args: 2205 input: Request body. 2206 input.acl: Access control configuration for the team. Controls who can discover and join the team. 2207 input.description: Optional human-readable description of the team's purpose. 2208 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 2209 input.name: Display name for the team. 2210 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 2211 2212 Returns: 2213 The newly created team. 2214 """ 2215 return await self._http.request( 2216 "/api/v1/teams", 2217 method="POST", 2218 body=input, 2219 response_type=Team, 2220 ) 2221 2222 async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 2223 """ 2224 Join a team with an invite code 2225 Adds a principal to a team using a 12-character invite code. The invite 2226 code can be supplied as either `join_code` or `invite_code`; both are 2227 accepted for backwards compatibility. 2228 For user-authenticated requests, the currently authenticated user is added 2229 to the team. For server-to-server requests, you must supply either `agent` 2230 (to add an agent) or `user` (to add a specific user by ID). If the user 2231 is already a member of the team, the request succeeds without creating a 2232 duplicate membership. 2233 This endpoint is rate-limited to 10 requests per minute per IP address to 2234 prevent invite-code enumeration. 2235 2236 Args: 2237 input: Request body. 2238 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. 2239 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 2240 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 2241 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 2242 2243 Returns: 2244 The team the principal has joined. 2245 """ 2246 return await self._http.request( 2247 "/api/v1/teams/join_by_code", 2248 method="POST", 2249 body=input, 2250 response_type=Team, 2251 ) 2252 2253 async def delete(self, team: str) -> None: 2254 """ 2255 Delete a team 2256 Permanently deletes the team identified by `team`. This action is 2257 irreversible all team memberships, settings, and associated data are 2258 removed. 2259 The caller must be the team owner or an org admin. When `app` is present, 2260 the caller must also hold the corresponding app scope. 2261 2262 Args: 2263 team: Team ID (`team_...`) of the team to delete. 2264 2265 Returns: 2266 Empty response the team has been deleted. 2267 """ 2268 await self._http.request(f"/api/v1/teams/{team}", method="DELETE") 2269 2270 async def get(self, team: str) -> Team: 2271 """ 2272 Retrieve a team 2273 Returns the full team object for the given `team` ID, including its current 2274 member list and all associated threads. 2275 The authenticated user must be a member of the team or hold a role that 2276 grants visibility (org admin, app scope). When `app` is supplied, the 2277 caller must hold the corresponding app scope. 2278 2279 Args: 2280 team: Team ID (`team_...`) of the team to retrieve. 2281 2282 Returns: 2283 The requested team, including its members and threads. 2284 """ 2285 return await self._http.request(f"/api/v1/teams/{team}", response_type=Team) 2286 2287 async def update(self, team: str, input: TeamUpdateInput) -> Team: 2288 """ 2289 Update a team 2290 Updates one or more attributes of the team identified by `team`. Only the 2291 fields you provide are changed; omitted fields are left as-is. 2292 To replace the team's profile picture, supply the `profile_picture` object 2293 with base64-encoded image data. The previous picture is deleted after the 2294 new one is successfully uploaded. When `app` is present, the caller must hold 2295 the corresponding app scope. The caller must be a team owner or org admin. 2296 2297 Args: 2298 team: Team ID (`team_...`) of the team to update. 2299 input: Request body. 2300 input.acl: New access control configuration for the team. Replaces the existing ACL. 2301 input.description: New human-readable description of the team's purpose. 2302 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 2303 input.name: New display name for the team. 2304 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 2305 2306 Returns: 2307 The updated team with all changes applied. 2308 """ 2309 return await self._http.request( 2310 f"/api/v1/teams/{team}", 2311 method="PATCH", 2312 body=input, 2313 response_type=Team, 2314 ) 2315 2316 async def artifacts(self, team: str) -> TeamArtifactsResponse: 2317 """ 2318 List a team's artifacts 2319 Returns all artifacts owned by the specified team. Artifacts represent 2320 AI-generated or user-uploaded files associated with agent sessions, 2321 threads, or sandboxes such as images, documents, and code outputs. 2322 The authenticated user must be a member of the team. Attempting to list 2323 artifacts for a team the caller does not have access to returns 404 2324 rather than 403 to avoid leaking team existence. 2325 Results are returned in a single page without cursor pagination. Each 2326 artifact in the response reflects the state of its current version, 2327 including a short-lived signed `file_url` for direct download. 2328 2329 Args: 2330 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 2331 2332 Returns: 2333 Successful response 2334 """ 2335 return await self._http.request( 2336 f"/api/v1/teams/{team}/artifacts", 2337 response_type=TeamArtifactsResponse, 2338 ) 2339 2340 async def invite(self, team: str) -> TeamInvite: 2341 """ 2342 Create a team invite 2343 Generates a new invite code for the specified team. The authenticated user 2344 must be a member of the team with the `owner` or `admin` role. 2345 The returned code is a short alphanumeric string that other users can 2346 present to join the team. Each call produces a new code; previously issued 2347 codes are not invalidated by this request. 2348 2349 Args: 2350 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2351 2352 Returns: 2353 The newly created team invite containing the join code. 2354 """ 2355 return await self._http.request( 2356 f"/api/v1/teams/{team}/invite", 2357 method="POST", 2358 response_type=TeamInvite, 2359 ) 2360 2361 async def invites(self, team: str) -> TeamInvitesResponse: 2362 """ 2363 Create a team invite (server-to-server) 2364 Generates a new invite code for the specified team using server-to-server 2365 authentication. Unlike the user-facing create endpoint, this variant does not 2366 require the caller to be a team member it is intended for privileged 2367 back-end services acting on behalf of your platform. 2368 The returned code is a short alphanumeric string that users can present to 2369 join the team. Each call produces a new code; previously issued codes are 2370 not invalidated by this request. 2371 2372 Args: 2373 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2374 2375 Returns: 2376 Successful response 2377 """ 2378 return await self._http.request( 2379 f"/api/v1/teams/{team}/invites", 2380 method="POST", 2381 response_type=TeamInvitesResponse, 2382 ) 2383 2384 async def join(self, team: str, input: TeamJoinInput) -> None: 2385 """ 2386 Join a team 2387 Adds a principal to a team that is visible to the authenticated user. 2388 By default, the currently authenticated user joins the team. Provide `agent` 2389 to add an agent to the team instead the caller must already be a member of 2390 the team to do so. Provide `user` (by ID) or `email` to add another user from 2391 your organization the caller must be a team owner, team admin, or org admin. 2392 Only one of `agent`, `user`, or `email` may be supplied per request. 2393 If the target principal is already a member of the team, the request succeeds 2394 without creating a duplicate membership. Server-to-server callers are not 2395 permitted to use this endpoint; use the invite-code endpoint instead. 2396 2397 Args: 2398 team: Team ID (`team_...`) to join. 2399 input: Request body. 2400 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 2401 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. 2402 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. 2403 2404 Returns: 2405 Empty response the principal is now a member of the team. 2406 """ 2407 await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 2408 2409 async def leave(self, team: str) -> None: 2410 """ 2411 Leave a team 2412 Removes a principal from a team. By default, the authenticated user removes 2413 themselves from the team. Provide `agent` to remove an agent instead the 2414 caller must be a member of the team to do so. 2415 Team owners cannot leave their own team. To transfer ownership first, use 2416 the update-membership endpoint, then call this endpoint. 2417 For server-to-server requests, `user` is required to identify which user 2418 should be removed. 2419 2420 Args: 2421 team: Team ID (`team_...`) to leave. 2422 2423 Returns: 2424 Empty response the principal has been removed from the team. 2425 """ 2426 await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE") 2427 2428 2429class TeamCustomObjectResource: 2430 def __init__(self, http: SyncHttpClient): 2431 self._http = http 2432 2433 def list( 2434 self, 2435 team: str, 2436 type: str, 2437 *, 2438 limit: int | None = None, 2439 offset: int | None = None, 2440 row_key: str | None = None, 2441 sort_key: str | None = None, 2442 query: str | None = None, 2443 ) -> TeamCustomObjectListResponse: 2444 """ 2445 List a team's custom objects 2446 Returns a paginated list of custom objects owned by the specified team, 2447 filtered to a single schema type. Results are ordered by creation time 2448 descending unless `query` is provided, in which case they are ordered by 2449 full-text relevance score descending. 2450 Use `limit` and `offset` for page-based pagination. Use `row_key` or 2451 `sort_key` to narrow results to objects matching those index values. 2452 Full-text search via `query` operates only against the fields configured 2453 as `search_fields` on the schema. 2454 The authenticated user must be a member of the team with sufficient 2455 access. Returns 404 if the team is not found, the caller lacks access, 2456 or `type` does not match a registered schema for the team's organization. 2457 2458 Args: 2459 team: Team ID (`team_...`). Scopes results to objects owned by this team. 2460 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 2461 limit: Maximum number of objects to return per page. 2462 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 2463 row_key: Filter results to objects whose `row_key` exactly matches this value. 2464 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 2465 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. 2466 2467 Returns: 2468 Successful response 2469 """ 2470 query: dict[str, object] = {} 2471 query["type"] = type 2472 if limit is not None: 2473 query["limit"] = limit 2474 if offset is not None: 2475 query["offset"] = offset 2476 if row_key is not None: 2477 query["row_key"] = row_key 2478 if sort_key is not None: 2479 query["sort_key"] = sort_key 2480 if query is not None: 2481 query["query"] = query 2482 return self._http.request( 2483 f"/api/v1/teams/{team}/custom_objects", 2484 query=query, 2485 response_type=TeamCustomObjectListResponse, 2486 ) 2487 2488 def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 2489 """ 2490 Create a team custom object 2491 Creates a new custom object owned by the specified team. The object is 2492 instantiated against the schema identified by `type` (the schema's 2493 `lookup_key`). All field values are validated against that schema's 2494 field definitions before the object is persisted. 2495 The authenticated user must be a member of the team with sufficient 2496 access. If the team is not found or the caller lacks access, the endpoint 2497 returns 404. If `type` does not match a registered schema for the team's 2498 organization, the endpoint also returns 404. 2499 2500 Args: 2501 team: Team ID (`team_...`). Scopes results to objects owned by this team. 2502 input: Request body. 2503 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 2504 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 2505 2506 Returns: 2507 The newly created custom object. 2508 """ 2509 return self._http.request( 2510 f"/api/v1/teams/{team}/custom_objects", 2511 method="POST", 2512 body=input, 2513 response_type=CustomObject, 2514 ) 2515 2516 2517class MemberResource: 2518 def __init__(self, http: SyncHttpClient): 2519 self._http = http 2520 2521 def remove(self, team: str) -> None: 2522 """ 2523 Remove a member or org from a team 2524 Removes a user, agent, or all members of an organization from the specified 2525 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 2526 one or none returns a 400 error. On success, returns 204 No Content. 2527 When `org` is provided, every user and agent membership belonging to that org 2528 is removed in a single call. The caller must be a member of the team's owning 2529 org to perform an org-scoped removal. You cannot target the team's owning org 2530 itself with this parameter. 2531 The caller must have permission to manage the team. When `app` is present, the 2532 request is scoped to that app and requires a valid app-scoped token. 2533 2534 Args: 2535 team: Team ID (`team_...`). The team to remove the member from. 2536 2537 Returns: 2538 Empty response. Returns 204 No Content on success. 2539 """ 2540 self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 2541 2542 def list(self, team: str) -> MemberListResponse: 2543 """ 2544 List members of a team 2545 Returns all members of the specified team, including both users and agents. 2546 Members are returned in a single non-paginated array ordered by join time. 2547 Bearer-authenticated users must be a member of the team to retrieve its 2548 member list. Developer and server-to-server callers can retrieve members for 2549 any team visible to their app scope. When `app` is provided, the request is 2550 scoped to that app and requires a valid app-scoped token. 2551 2552 Args: 2553 team: Team ID (`team_...`). The team to remove the member from. 2554 2555 Returns: 2556 Successful response 2557 """ 2558 return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse) 2559 2560 def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 2561 """ 2562 Add a member to a team 2563 Adds a user or agent as a member of the specified team and returns the new 2564 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 2565 both or neither returns a 400 error. 2566 The caller must have permission to manage the team. When an `app` is provided, 2567 the request is scoped to that app and the caller must hold a valid app-scoped 2568 token. The default role is `"member"` when `role` is omitted. 2569 2570 Args: 2571 team: Team ID (`team_...`). The team to remove the member from. 2572 input: Request body. 2573 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 2574 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 2575 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 2576 2577 Returns: 2578 The newly created team membership. 2579 """ 2580 return self._http.request( 2581 f"/api/v1/teams/{team}/members", 2582 method="POST", 2583 body=input, 2584 response_type=TeamMembership, 2585 ) 2586 2587 def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 2588 """ 2589 Update a team member's role 2590 Changes the role of an existing user member on the specified team. Returns the 2591 updated membership on success. 2592 Only user memberships are supported by this endpoint. Attempting to update an 2593 agent membership returns 404. To change an agent's role, remove the existing 2594 membership and re-add the agent with the desired role. 2595 The caller must have permission to modify the team. You cannot change a member's 2596 role across organization boundaries. Demoting the last owner of a team returns 2597 409. An invalid `role` value returns 422. When `app` is provided, the request 2598 is scoped to that app and requires a valid app-scoped token. 2599 2600 Args: 2601 team: Team ID (`team_...`). The team to remove the member from. 2602 user: User ID (`usr_...`) of the existing member whose role should be changed. 2603 input: Request body. 2604 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 2605 2606 Returns: 2607 The updated team membership reflecting the new role. 2608 """ 2609 return self._http.request( 2610 f"/api/v1/teams/{team}/members/{user}", 2611 method="PATCH", 2612 body=input, 2613 response_type=TeamMembership, 2614 ) 2615 2616 2617class TeamThreadResource: 2618 def __init__(self, http: SyncHttpClient): 2619 self._http = http 2620 2621 def list(self, team: str) -> TeamThreadListResponse: 2622 """ 2623 List threads for a team 2624 Returns all threads owned by the specified team that the authenticated caller 2625 has permission to view. The caller must have access to the team; requests 2626 without team access are rejected with 404. 2627 Threads are returned in a single `data` array. Use the team-scoped thread 2628 endpoints to create, update, or delete individual threads. 2629 2630 Args: 2631 team: Team ID (`tem_...`) whose threads should be listed. 2632 2633 Returns: 2634 Successful response 2635 """ 2636 return self._http.request( 2637 f"/api/v1/teams/{team}/threads", 2638 response_type=TeamThreadListResponse, 2639 ) 2640 2641 def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 2642 """ 2643 Create a thread for a team 2644 Creates a new thread owned by the specified team. The authenticated caller must 2645 have access to the team; requests from callers without team access are rejected 2646 with 404. 2647 If a `profile_picture` is provided in the thread params, it must be 2648 base64-encoded image data. The image is uploaded and associated with the thread 2649 before creation completes. Omit `profile_picture` to skip this step. 2650 By default the platform sends an automatic welcome message into the new thread. 2651 Pass `skip_welcome_message: true` to suppress this behavior, for example when 2652 creating threads programmatically in bulk or seeding test data. 2653 2654 Args: 2655 team: Team ID (`tem_...`) whose threads should be listed. 2656 input: Request body. 2657 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 2658 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 2659 2660 Returns: 2661 The newly created thread. 2662 """ 2663 return self._http.request( 2664 f"/api/v1/teams/{team}/threads", 2665 method="POST", 2666 body=input, 2667 response_type=Thread, 2668 ) 2669 2670 2671class TeamResource: 2672 def __init__(self, http: SyncHttpClient): 2673 self._http = http 2674 self.custom_objects = TeamCustomObjectResource(http) 2675 self.members = MemberResource(http) 2676 self.threads = TeamThreadResource(http) 2677 2678 def list( 2679 self, 2680 *, 2681 page: int | None = None, 2682 page_size: int | None = None, 2683 search: str | None = None, 2684 metadata: dict[str, Any] | None = None, 2685 membership: str | None = None, 2686 ) -> TeamListResponse: 2687 """ 2688 List teams 2689 Returns a paginated list of teams visible to the authenticated user, ordered 2690 by creation time descending. Use `membership` to narrow results to teams the 2691 caller has joined or teams they are eligible to join based on their ACL 2692 visibility. 2693 Supports full-text search across team name and description via `search`, and 2694 structured metadata filtering via `metadata`. When `app` is present, results 2695 are scoped to that app and the caller must hold the corresponding app scope. 2696 2697 Args: 2698 page: Page number to retrieve, starting at 1. Defaults to 1. 2699 page_size: Number of teams to return per page. Defaults to 25. 2700 search: Full-text search string matched against team name and description. 2701 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 2702 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. 2703 2704 Returns: 2705 Successful response 2706 """ 2707 query: dict[str, object] = {} 2708 if page is not None: 2709 query["page"] = page 2710 if page_size is not None: 2711 query["page_size"] = page_size 2712 if search is not None: 2713 query["search"] = search 2714 if metadata is not None: 2715 query["metadata"] = metadata 2716 if membership is not None: 2717 query["membership"] = membership 2718 return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse) 2719 2720 def create(self, input: TeamCreateInput) -> Team: 2721 """ 2722 Create a team 2723 Creates a new team and returns the created team object. The authenticated 2724 user becomes the team's owner. 2725 When `app` is supplied, the request is scoped to that app and the caller 2726 must hold the corresponding app scope. Omit `org` unless you want the team 2727 pinned to a specific organization. A default chat thread is provisioned for 2728 the team automatically after creation. 2729 2730 Args: 2731 input: Request body. 2732 input.acl: Access control configuration for the team. Controls who can discover and join the team. 2733 input.description: Optional human-readable description of the team's purpose. 2734 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 2735 input.name: Display name for the team. 2736 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 2737 2738 Returns: 2739 The newly created team. 2740 """ 2741 return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team) 2742 2743 def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 2744 """ 2745 Join a team with an invite code 2746 Adds a principal to a team using a 12-character invite code. The invite 2747 code can be supplied as either `join_code` or `invite_code`; both are 2748 accepted for backwards compatibility. 2749 For user-authenticated requests, the currently authenticated user is added 2750 to the team. For server-to-server requests, you must supply either `agent` 2751 (to add an agent) or `user` (to add a specific user by ID). If the user 2752 is already a member of the team, the request succeeds without creating a 2753 duplicate membership. 2754 This endpoint is rate-limited to 10 requests per minute per IP address to 2755 prevent invite-code enumeration. 2756 2757 Args: 2758 input: Request body. 2759 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. 2760 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 2761 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 2762 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 2763 2764 Returns: 2765 The team the principal has joined. 2766 """ 2767 return self._http.request( 2768 "/api/v1/teams/join_by_code", 2769 method="POST", 2770 body=input, 2771 response_type=Team, 2772 ) 2773 2774 def delete(self, team: str) -> None: 2775 """ 2776 Delete a team 2777 Permanently deletes the team identified by `team`. This action is 2778 irreversible all team memberships, settings, and associated data are 2779 removed. 2780 The caller must be the team owner or an org admin. When `app` is present, 2781 the caller must also hold the corresponding app scope. 2782 2783 Args: 2784 team: Team ID (`team_...`) of the team to delete. 2785 2786 Returns: 2787 Empty response the team has been deleted. 2788 """ 2789 self._http.request(f"/api/v1/teams/{team}", method="DELETE") 2790 2791 def get(self, team: str) -> Team: 2792 """ 2793 Retrieve a team 2794 Returns the full team object for the given `team` ID, including its current 2795 member list and all associated threads. 2796 The authenticated user must be a member of the team or hold a role that 2797 grants visibility (org admin, app scope). When `app` is supplied, the 2798 caller must hold the corresponding app scope. 2799 2800 Args: 2801 team: Team ID (`team_...`) of the team to retrieve. 2802 2803 Returns: 2804 The requested team, including its members and threads. 2805 """ 2806 return self._http.request(f"/api/v1/teams/{team}", response_type=Team) 2807 2808 def update(self, team: str, input: TeamUpdateInput) -> Team: 2809 """ 2810 Update a team 2811 Updates one or more attributes of the team identified by `team`. Only the 2812 fields you provide are changed; omitted fields are left as-is. 2813 To replace the team's profile picture, supply the `profile_picture` object 2814 with base64-encoded image data. The previous picture is deleted after the 2815 new one is successfully uploaded. When `app` is present, the caller must hold 2816 the corresponding app scope. The caller must be a team owner or org admin. 2817 2818 Args: 2819 team: Team ID (`team_...`) of the team to update. 2820 input: Request body. 2821 input.acl: New access control configuration for the team. Replaces the existing ACL. 2822 input.description: New human-readable description of the team's purpose. 2823 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 2824 input.name: New display name for the team. 2825 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 2826 2827 Returns: 2828 The updated team with all changes applied. 2829 """ 2830 return self._http.request( 2831 f"/api/v1/teams/{team}", 2832 method="PATCH", 2833 body=input, 2834 response_type=Team, 2835 ) 2836 2837 def artifacts(self, team: str) -> TeamArtifactsResponse: 2838 """ 2839 List a team's artifacts 2840 Returns all artifacts owned by the specified team. Artifacts represent 2841 AI-generated or user-uploaded files associated with agent sessions, 2842 threads, or sandboxes such as images, documents, and code outputs. 2843 The authenticated user must be a member of the team. Attempting to list 2844 artifacts for a team the caller does not have access to returns 404 2845 rather than 403 to avoid leaking team existence. 2846 Results are returned in a single page without cursor pagination. Each 2847 artifact in the response reflects the state of its current version, 2848 including a short-lived signed `file_url` for direct download. 2849 2850 Args: 2851 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 2852 2853 Returns: 2854 Successful response 2855 """ 2856 return self._http.request( 2857 f"/api/v1/teams/{team}/artifacts", 2858 response_type=TeamArtifactsResponse, 2859 ) 2860 2861 def invite(self, team: str) -> TeamInvite: 2862 """ 2863 Create a team invite 2864 Generates a new invite code for the specified team. The authenticated user 2865 must be a member of the team with the `owner` or `admin` role. 2866 The returned code is a short alphanumeric string that other users can 2867 present to join the team. Each call produces a new code; previously issued 2868 codes are not invalidated by this request. 2869 2870 Args: 2871 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2872 2873 Returns: 2874 The newly created team invite containing the join code. 2875 """ 2876 return self._http.request( 2877 f"/api/v1/teams/{team}/invite", 2878 method="POST", 2879 response_type=TeamInvite, 2880 ) 2881 2882 def invites(self, team: str) -> TeamInvitesResponse: 2883 """ 2884 Create a team invite (server-to-server) 2885 Generates a new invite code for the specified team using server-to-server 2886 authentication. Unlike the user-facing create endpoint, this variant does not 2887 require the caller to be a team member it is intended for privileged 2888 back-end services acting on behalf of your platform. 2889 The returned code is a short alphanumeric string that users can present to 2890 join the team. Each call produces a new code; previously issued codes are 2891 not invalidated by this request. 2892 2893 Args: 2894 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2895 2896 Returns: 2897 Successful response 2898 """ 2899 return self._http.request( 2900 f"/api/v1/teams/{team}/invites", 2901 method="POST", 2902 response_type=TeamInvitesResponse, 2903 ) 2904 2905 def join(self, team: str, input: TeamJoinInput) -> None: 2906 """ 2907 Join a team 2908 Adds a principal to a team that is visible to the authenticated user. 2909 By default, the currently authenticated user joins the team. Provide `agent` 2910 to add an agent to the team instead the caller must already be a member of 2911 the team to do so. Provide `user` (by ID) or `email` to add another user from 2912 your organization the caller must be a team owner, team admin, or org admin. 2913 Only one of `agent`, `user`, or `email` may be supplied per request. 2914 If the target principal is already a member of the team, the request succeeds 2915 without creating a duplicate membership. Server-to-server callers are not 2916 permitted to use this endpoint; use the invite-code endpoint instead. 2917 2918 Args: 2919 team: Team ID (`team_...`) to join. 2920 input: Request body. 2921 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 2922 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. 2923 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. 2924 2925 Returns: 2926 Empty response the principal is now a member of the team. 2927 """ 2928 self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 2929 2930 def leave(self, team: str) -> None: 2931 """ 2932 Leave a team 2933 Removes a principal from a team. By default, the authenticated user removes 2934 themselves from the team. Provide `agent` to remove an agent instead the 2935 caller must be a member of the team to do so. 2936 Team owners cannot leave their own team. To transfer ownership first, use 2937 the update-membership endpoint, then call this endpoint. 2938 For server-to-server requests, `user` is required to identify which user 2939 should be removed. 2940 2941 Args: 2942 team: Team ID (`team_...`) to leave. 2943 2944 Returns: 2945 Empty response the principal has been removed from the team. 2946 """ 2947 self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
19class TeamCustomObjectCreateInput(TypedDict): 20 "Create a team custom object" 21 22 fields: dict[str, Any] 23 "Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`." 24 type: str 25 "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.
28class MemberCreateInput(TypedDict, total=False): 29 "Add a member to a team" 30 31 agent: str | None 32 "Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`." 33 role: str | None 34 'Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted.' 35 user: str | None 36 "User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`."
Add a member to a team
39class MemberUpdateInput(TypedDict): 40 "Update a team member's role" 41 42 role: str 43 'New role to assign. One of `"owner"`, `"admin"`, or `"member"`.'
Update a team member's role
46class TeamThreadCreateInputThreadProfilePicture(TypedDict, total=False): 47 data: str | None 48 "Base64-encoded image bytes." 49 filename: str | None 50 "Original filename of the uploaded image, used for display and content-type inference." 51 mime_type: str | None 52 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
60class TeamThreadCreateInputThread(TypedDict, total=False): 61 create_legacy_agent: bool | None 62 "When `true`, provisions a legacy chat agent alongside the thread. Only needed for integrations that depend on the pre-v2 agent model." 63 description: str | None 64 "Optional longer description of the thread's purpose. `null` if not provided." 65 is_unlisted: bool | None 66 "When `true`, the thread is hidden from the default thread list and accessible only by direct link or ID." 67 key: str | None 68 "Client-assigned unique key for idempotent creation or later lookup. Must be unique within the owning organization." 69 metadata: dict[str, Any] | None 70 "Arbitrary key-value pairs stored alongside the thread. Values must be strings or numbers." 71 muted: bool | None 72 "When `true`, push and in-app notifications for this thread are suppressed for the creating user." 73 org_id: str | None 74 "ID of the organization to create the thread under. Defaults to the authenticated user's primary organization when omitted." 75 profile_picture: TeamThreadCreateInputThreadProfilePicture | None 76 "Optional profile image for the thread, provided as a base64-encoded payload." 77 settings: TeamThreadCreateInputThreadSettings | None 78 "Configuration overrides for the thread, such as AI model selection and context window settings." 79 title: str | None 80 "Display name for the thread. `null` if omitted, which causes the thread to be untitled."
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.
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.
83class TeamThreadCreateInput(TypedDict, total=False): 84 "Create a thread for a team" 85 86 skip_welcome_message: bool | None 87 "When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`." 88 thread: Required[TeamThreadCreateInputThread] 89 "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.
92class TeamCreateInputAclAddItem(TypedDict, total=False): 93 actions: Required[list[str]] 94 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 95 principal: str | None 96 '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"`.' 97 principal_type: Required[str] 98 '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".
101class TeamCreateInputAclGrantsItem(TypedDict, total=False): 102 actions: Required[list[str]] 103 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 104 principal: str | None 105 '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"`.' 106 principal_type: Required[str] 107 '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".
110class TeamCreateInputAclRemoveItem(TypedDict, total=False): 111 principal: str | None 112 '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"`.' 113 principal_type: Required[str] 114 '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".
117class TeamCreateInputAcl(TypedDict, total=False): 118 add: list[TeamCreateInputAclAddItem] | None 119 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 120 grants: list[TeamCreateInputAclGrantsItem] | None 121 "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`." 122 remove: list[TeamCreateInputAclRemoveItem] | None 123 "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.
126class TeamCreateInput(TypedDict, total=False): 127 "Create a team" 128 129 acl: TeamCreateInputAcl | None 130 "Access control configuration for the team. Controls who can discover and join the team." 131 description: str | None 132 "Optional human-readable description of the team's purpose." 133 metadata: dict[str, Any] | None 134 "Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings." 135 name: Required[str] 136 "Display name for the team." 137 org: str | None 138 "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.
141class TeamJoinByCodeInput(TypedDict, total=False): 142 "Join a team with an invite code" 143 144 agent: str | None 145 "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." 146 invite_code: str | None 147 "12-character invite code alias for `join_code` accepted for backwards compatibility." 148 join_code: str | None 149 "12-character invite code that identifies the team. Mutually usable with `invite_code`." 150 user: str | None 151 "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.
154class TeamUpdateInputAclAddItem(TypedDict, total=False): 155 actions: Required[list[str]] 156 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 157 principal: str | None 158 '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"`.' 159 principal_type: Required[str] 160 '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".
163class TeamUpdateInputAclGrantsItem(TypedDict, total=False): 164 actions: Required[list[str]] 165 'Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.' 166 principal: str | None 167 '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"`.' 168 principal_type: Required[str] 169 '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".
172class TeamUpdateInputAclRemoveItem(TypedDict, total=False): 173 principal: str | None 174 '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"`.' 175 principal_type: Required[str] 176 '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".
179class TeamUpdateInputAcl(TypedDict, total=False): 180 add: list[TeamUpdateInputAclAddItem] | None 181 "Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`." 182 grants: list[TeamUpdateInputAclGrantsItem] | None 183 "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`." 184 remove: list[TeamUpdateInputAclRemoveItem] | None 185 "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.
188class TeamUpdateInputProfilePicture(TypedDict, total=False): 189 data: str | None 190 "Base64-encoded binary image data." 191 filename: str | None 192 "Original filename of the image, used for storage metadata." 193 mime_type: str | None 194 'MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`.'
197class TeamUpdateInput(TypedDict, total=False): 198 "Update a team" 199 200 acl: TeamUpdateInputAcl | None 201 "New access control configuration for the team. Replaces the existing ACL." 202 description: str | None 203 "New human-readable description of the team's purpose." 204 metadata: dict[str, Any] | None 205 "Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely." 206 name: str | None 207 "New display name for the team." 208 profile_picture: TeamUpdateInputProfilePicture | None 209 "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.
212class TeamJoinInput(TypedDict, total=False): 213 "Join a team" 214 215 agent: str | None 216 "Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team." 217 email: str | None 218 "Email address of a member of the caller's organization to add to the team. Requires team-owner, team-admin, or org-admin role." 219 user: str | None 220 "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.
223class TeamCustomObjectListResponseDataItem(BaseModel): 224 created_at: datetime | None = Field( 225 default=None, description="When the custom object was created (ISO 8601)." 226 ) 227 fields: dict[str, Any] | None = Field( 228 default=None, 229 description="Map of field names to their current values as defined by the object's schema type.", 230 ) 231 id: str = Field(..., description="Unique identifier for the custom object (`cobj_...`).") 232 org: str | None = Field( 233 default=None, description="ID of the organization this object belongs to (`org_...`)." 234 ) 235 row_key: str | None = Field( 236 default=None, 237 description="An optional stable key used to identify this object by a caller-controlled string rather than its generated ID. `null` if not set.", 238 ) 239 sandbox: str | None = Field( 240 default=None, 241 description="ID of the sandbox environment this object is scoped to (`dsb_...`). `null` for production objects.", 242 ) 243 schema_type: str | None = Field( 244 default=None, 245 description="The lookup key of the schema type that defines this object's field structure. `null` if the schema type has not been set.", 246 ) 247 team: str | None = Field( 248 default=None, 249 description="ID of the team that owns this object (`tem_...`). `null` if the object is not team-scoped.", 250 ) 251 updated_at: datetime | None = Field( 252 default=None, 253 description="When the custom object was last modified (ISO 8601). `null` if the object has never been updated after creation.", 254 ) 255 user: str | None = Field( 256 default=None, 257 description="ID of the user that owns this object (`usr_...`). `null` if the object is not user-scoped.", 258 ) 259 version: int | None = Field( 260 default=None, 261 description="Optimistic concurrency version of the object. Increments with each successful update; pass this value in write operations to detect conflicting changes.", 262 )
!!! 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.
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.
265class TeamCustomObjectListResponse(BaseModel): 266 """ 267 Successful response 268 """ 269 270 data: list[TeamCustomObjectListResponseDataItem] = Field( 271 ..., description="Array of custom object records for the current page." 272 ) 273 meta: dict[str, Any] | None = Field( 274 default=None, description="Pagination metadata for the response." 275 )
Successful response
278class MemberListResponseDataItemAgentAclAddItem(BaseModel): 279 actions: list[str] = Field( 280 ..., 281 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 282 ) 283 principal: str | None = Field( 284 default=None, 285 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"`.', 286 ) 287 principal_type: str = Field( 288 ..., 289 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 290 )
!!! 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".
293class MemberListResponseDataItemAgentAclGrantsItem(BaseModel): 294 actions: list[str] = Field( 295 ..., 296 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 297 ) 298 principal: str | None = Field( 299 default=None, 300 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"`.', 301 ) 302 principal_type: str = Field( 303 ..., 304 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 305 )
!!! 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".
308class MemberListResponseDataItemAgentAclRemoveItem(BaseModel): 309 principal: str | None = Field( 310 default=None, 311 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"`.', 312 ) 313 principal_type: str = Field( 314 ..., 315 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 316 )
!!! 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".
319class MemberListResponseDataItemAgentAcl(BaseModel): 320 add: list[MemberListResponseDataItemAgentAclAddItem] | None = Field( 321 default=None, 322 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 323 ) 324 grants: list[MemberListResponseDataItemAgentAclGrantsItem] | None = Field( 325 default=None, 326 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`.", 327 ) 328 remove: list[MemberListResponseDataItemAgentAclRemoveItem] | None = Field( 329 default=None, 330 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 331 )
!!! 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.
334class MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo(BaseModel): 335 file: str | None = Field( 336 default=None, 337 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 338 ) 339 height: int | None = Field( 340 default=None, description="Height of the image in pixels. `null` if not known." 341 ) 342 media: str | None = Field( 343 default=None, 344 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 345 ) 346 mime_type: str | None = Field( 347 default=None, 348 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 349 ) 350 refresh_url: str | None = Field( 351 default=None, 352 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.", 353 ) 354 url: str | None = Field( 355 default=None, 356 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.", 357 ) 358 width: int | None = Field( 359 default=None, description="Width of the image in pixels. `null` if not known." 360 )
!!! 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.
363class MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem(BaseModel): 364 description: str | None = Field( 365 default=None, 366 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.", 367 ) 368 display_name: str | None = Field( 369 default=None, 370 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`.", 371 ) 372 id: str | None = Field( 373 default=None, 374 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 375 ) 376 kind: str = Field( 377 ..., 378 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 379 ) 380 lookup_key: str | None = Field( 381 default=None, 382 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 383 ) 384 name: str | None = Field( 385 default=None, 386 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`.", 387 ) 388 readme_url: str | None = Field( 389 default=None, 390 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`.", 391 ) 392 virtual_path: str | None = Field( 393 default=None, 394 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 395 )
!!! 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.
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.
398class MemberListResponseDataItemAgentSourceSolutionSolution(BaseModel): 399 category_keys: list[str] | None = Field( 400 default=None, 401 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 402 ) 403 created_at: datetime | None = Field( 404 default=None, description="When the Solution config was first imported (ISO 8601)." 405 ) 406 description: str | None = Field( 407 default=None, 408 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.", 409 ) 410 id: str = Field(..., description="Solution config ID (`cfg_...`).") 411 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 412 latest_solution: str | None = Field( 413 default=None, 414 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 415 ) 416 latest_version: str | None = Field( 417 default=None, 418 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 419 ) 420 lookup_key: str | None = Field( 421 default=None, 422 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 423 ) 424 metadata: dict[str, Any] | None = Field( 425 default=None, 426 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.", 427 ) 428 name: str | None = Field( 429 default=None, 430 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 431 ) 432 org: str | None = Field( 433 default=None, 434 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.", 435 ) 436 org_logo: MemberListResponseDataItemAgentSourceSolutionSolutionOrgLogo | None = Field( 437 default=None, 438 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. Carries the signed `url` plus a `refresh_url`. `null` when `org_slug` is `null` or the org has no logo.", 439 ) 440 org_name: str | None = Field( 441 default=None, 442 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 443 ) 444 org_slug: str | None = Field( 445 default=None, 446 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.", 447 ) 448 owners: list[str] = Field( 449 ..., 450 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 451 ) 452 readme_url: str | None = Field( 453 default=None, 454 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`.", 455 ) 456 solution_id: str | None = Field( 457 default=None, 458 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.", 459 ) 460 solution_version: str | None = Field( 461 default=None, 462 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 463 ) 464 tag_keys: list[str] | None = Field( 465 default=None, 466 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 467 ) 468 template_kind: str | None = Field( 469 default=None, 470 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 471 ) 472 templates: list[MemberListResponseDataItemAgentSourceSolutionSolutionTemplatesItem] = Field( 473 ..., 474 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.", 475 ) 476 updated_at: datetime | None = Field( 477 default=None, description="When the Solution config was last modified (ISO 8601)." 478 ) 479 upgrade_available: bool = Field( 480 ..., 481 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.", 482 ) 483 virtual_path: str | None = Field( 484 default=None, 485 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.", 486 )
!!! 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.
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.
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.
489class MemberListResponseDataItemAgentSourceSolutionTemplate(BaseModel): 490 created_at: datetime | None = Field( 491 default=None, description="When this template config was created (ISO 8601)." 492 ) 493 description: str | None = Field( 494 default=None, 495 description="Description of the template from the config body. `null` if the current version has no `description` field.", 496 ) 497 display_name: str | None = Field( 498 default=None, 499 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 500 ) 501 id: str = Field(..., description="Template config ID (`cfg_...`).") 502 kind: str = Field( 503 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 504 ) 505 lookup_key: str | None = Field( 506 default=None, 507 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 508 ) 509 name: str | None = Field( 510 default=None, 511 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 512 ) 513 updated_at: datetime | None = Field( 514 default=None, description="When this template config was last modified (ISO 8601)." 515 ) 516 virtual_path: str | None = Field( 517 default=None, 518 description="Virtual filesystem path for this template config. `null` if not set.", 519 )
!!! 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.
522class MemberListResponseDataItemAgentSourceSolution(BaseModel): 523 solution: MemberListResponseDataItemAgentSourceSolutionSolution = Field( 524 ..., 525 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.", 526 ) 527 template: MemberListResponseDataItemAgentSourceSolutionTemplate = Field( 528 ..., 529 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 530 )
!!! 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 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.
533class MemberListResponseDataItemAgent(BaseModel): 534 acl: MemberListResponseDataItemAgentAcl | None = Field( 535 default=None, 536 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.", 537 ) 538 app: str | None = Field( 539 default=None, description="ID of the application that owns this agent (`dap_...`)." 540 ) 541 created_at: datetime | None = Field( 542 default=None, description="When the agent was created (ISO 8601)." 543 ) 544 default_model: str | None = Field( 545 default=None, 546 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 547 ) 548 email: str | None = Field( 549 default=None, 550 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 551 ) 552 id: str = Field(..., description="Agent ID (`agi_...`).") 553 identity: str | None = Field( 554 default=None, 555 description="System-level identity prompt that shapes the agent's persona and behavior.", 556 ) 557 last_applied_template_config: str | None = Field( 558 default=None, 559 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 560 ) 561 lookup_key: str | None = Field( 562 default=None, 563 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 564 ) 565 metadata: dict[str, Any] | None = Field( 566 default=None, 567 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 568 ) 569 name: str | None = Field( 570 default=None, description="Human-readable display name for the agent. `null` if not set." 571 ) 572 org: str | None = Field( 573 default=None, 574 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 575 ) 576 org_name: str | None = Field( 577 default=None, 578 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.", 579 ) 580 originator: str | None = Field( 581 default=None, 582 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 583 ) 584 phone_number: str | None = Field( 585 default=None, 586 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 587 ) 588 sandbox: str | None = Field( 589 default=None, 590 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 591 ) 592 source_solution: MemberListResponseDataItemAgentSourceSolution | None = Field( 593 default=None, 594 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.", 595 ) 596 team: str | None = Field( 597 default=None, 598 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 599 ) 600 template_upgrade_available: bool | None = Field( 601 default=None, 602 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 only on list endpoints; `null` on single-agent GET.", 603 ) 604 updated_at: datetime | None = Field( 605 default=None, description="When the agent was last modified (ISO 8601)." 606 ) 607 user: str | None = Field( 608 default=None, 609 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 610 )
!!! 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 only on list endpoints; null on single-agent GET.
613class MemberListResponseDataItemProfilePicture(BaseModel): 614 file: str | None = Field( 615 default=None, 616 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 617 ) 618 height: int | None = Field( 619 default=None, description="Height of the image in pixels. `null` if not known." 620 ) 621 media: str | None = Field( 622 default=None, 623 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 624 ) 625 mime_type: str | None = Field( 626 default=None, 627 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 628 ) 629 refresh_url: str | None = Field( 630 default=None, 631 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.", 632 ) 633 url: str | None = Field( 634 default=None, 635 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.", 636 ) 637 width: int | None = Field( 638 default=None, description="Width of the image in pixels. `null` if not known." 639 )
!!! 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.
642class MemberListResponseDataItemUser(BaseModel): 643 alias: str | None = Field( 644 default=None, description="Short handle or alias for the user. `null` if not set." 645 ) 646 app: str | None = Field( 647 default=None, 648 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.", 649 ) 650 app_name: str | None = Field( 651 default=None, 652 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 653 ) 654 email: str | None = Field(default=None, description="Email address of the user.") 655 id: str = Field(..., description="User ID (`usr_...`).") 656 is_system_user: bool | None = Field( 657 default=None, 658 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 659 ) 660 metadata: dict[str, Any] | None = Field( 661 default=None, 662 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 663 ) 664 name: str | None = Field( 665 default=None, 666 description="Full display name of the user. `null` if the user has not set a name.", 667 ) 668 org: str | None = Field( 669 default=None, 670 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 671 ) 672 org_name: str | None = Field( 673 default=None, 674 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.", 675 ) 676 org_role: str | None = Field( 677 default=None, 678 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.', 679 ) 680 sandbox: str | None = Field( 681 default=None, 682 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 683 ) 684 sandbox_name: str | None = Field( 685 default=None, 686 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 687 )
!!! 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.
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.
690class MemberListResponseDataItem(BaseModel): 691 agent: MemberListResponseDataItemAgent | None = Field( 692 default=None, 693 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.", 694 ) 695 created_at: datetime | None = Field( 696 default=None, description="When this membership record was created (ISO 8601)." 697 ) 698 id: str = Field(..., description="Team membership ID (`tmb_...`).") 699 joined_at: datetime | None = Field( 700 default=None, description="When the principal joined the team (ISO 8601)." 701 ) 702 metadata: dict[str, Any] | None = Field( 703 default=None, 704 description="Arbitrary key-value metadata attached to this membership record. `null` if no metadata has been set.", 705 ) 706 name: str | None = Field( 707 default=None, 708 description="Display name of the member, derived from the associated user or agent. `null` if the principal is unknown.", 709 ) 710 profile_picture: MemberListResponseDataItemProfilePicture | None = Field( 711 default=None, 712 description="Profile picture of the member, derived from the associated user or agent. `null` if not set or principal is unknown.", 713 ) 714 role: str | None = Field( 715 default=None, 716 description='The member\'s role within the team. One of `"owner"`, `"admin"`, or `"member"`.', 717 ) 718 team: dict[str, Any] | None = Field( 719 default=None, 720 description="The team this membership belongs to, as an expanded team object. `null` when the team association is not preloaded.", 721 ) 722 type: str | None = Field( 723 default=None, 724 description='Resolved principal type. One of `"user"`, `"agent"`, or `"unknown"` when the principal cannot be determined.', 725 ) 726 updated_at: datetime | None = Field( 727 default=None, description="When this membership record was last updated (ISO 8601)." 728 ) 729 user: MemberListResponseDataItemUser | None = Field( 730 default=None, 731 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.", 732 )
!!! 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).
735class MemberListResponse(BaseModel): 736 """ 737 Successful response 738 """ 739 740 data: list[MemberListResponseDataItem] = Field( 741 ..., description="Array of team membership objects, including both user and agent members." 742 )
Successful response
745class TeamThreadListResponseDataItemCreator(BaseModel): 746 alias: str | None = Field( 747 default=None, description="Short handle or alias for the user. `null` if not set." 748 ) 749 app: str | None = Field( 750 default=None, 751 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.", 752 ) 753 app_name: str | None = Field( 754 default=None, 755 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 756 ) 757 email: str | None = Field(default=None, description="Email address of the user.") 758 id: str = Field(..., description="User ID (`usr_...`).") 759 is_system_user: bool | None = Field( 760 default=None, 761 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 762 ) 763 metadata: dict[str, Any] | None = Field( 764 default=None, 765 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 766 ) 767 name: str | None = Field( 768 default=None, 769 description="Full display name of the user. `null` if the user has not set a name.", 770 ) 771 org: str | None = Field( 772 default=None, 773 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 774 ) 775 org_name: str | None = Field( 776 default=None, 777 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.", 778 ) 779 org_role: str | None = Field( 780 default=None, 781 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.', 782 ) 783 sandbox: str | None = Field( 784 default=None, 785 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 786 ) 787 sandbox_name: str | None = Field( 788 default=None, 789 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 790 )
!!! 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.
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.
793class TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture(BaseModel): 794 file: str | None = Field( 795 default=None, 796 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 797 ) 798 height: int | None = Field( 799 default=None, description="Height of the image in pixels. `null` if not known." 800 ) 801 media: str | None = Field( 802 default=None, 803 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 804 ) 805 mime_type: str | None = Field( 806 default=None, 807 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 808 ) 809 refresh_url: str | None = Field( 810 default=None, 811 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.", 812 ) 813 url: str | None = Field( 814 default=None, 815 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.", 816 ) 817 width: int | None = Field( 818 default=None, description="Width of the image in pixels. `null` if not known." 819 )
!!! 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.
822class TeamThreadListResponseDataItemParentMessageActorsItem(BaseModel): 823 alias: str | None = Field( 824 default=None, 825 description="Short handle or alias for the actor, used as an alternate display identifier. `null` if not configured.", 826 ) 827 id: str | None = Field( 828 default=None, 829 description='Composite actor identifier. Format is `"user-<usr_...>"` for human users or `"agent-<agi_...>"` for agents.', 830 ) 831 name: str | None = Field( 832 default=None, 833 description="Display name of the actor shown in the UI. `null` if no name is set.", 834 ) 835 profile_picture: TeamThreadListResponseDataItemParentMessageActorsItemProfilePicture | None = ( 836 Field( 837 default=None, 838 description="Profile picture for the actor. `null` if the actor has no profile picture.", 839 ) 840 )
!!! 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.
843class TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource(BaseModel): 844 file: str | None = Field( 845 default=None, 846 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 847 ) 848 height: int | None = Field( 849 default=None, description="Height of the image in pixels. `null` if not known." 850 ) 851 media: str | None = Field( 852 default=None, 853 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 854 ) 855 mime_type: str | None = Field( 856 default=None, 857 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 858 ) 859 refresh_url: str | None = Field( 860 default=None, 861 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.", 862 ) 863 url: str | None = Field( 864 default=None, 865 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.", 866 ) 867 width: int | None = Field( 868 default=None, description="Width of the image in pixels. `null` if not known." 869 )
!!! 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.
872class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource(BaseModel): 873 file: str | None = Field( 874 default=None, 875 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 876 ) 877 height: int | None = Field( 878 default=None, description="Height of the image in pixels. `null` if not known." 879 ) 880 media: str | None = Field( 881 default=None, 882 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 883 ) 884 mime_type: str | None = Field( 885 default=None, 886 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 887 ) 888 refresh_url: str | None = Field( 889 default=None, 890 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.", 891 ) 892 url: str | None = Field( 893 default=None, 894 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.", 895 ) 896 width: int | None = Field( 897 default=None, description="Width of the image in pixels. `null` if not known." 898 )
!!! 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.
901class TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem(BaseModel): 902 content_type: str | None = Field( 903 default=None, 904 description='MIME type of this variant\'s file (e.g., `"image/jpeg"`, `"video/mp4"`). `null` if the file is not loaded.', 905 ) 906 created_at: datetime | None = Field( 907 default=None, description="When this variant was created (ISO 8601)." 908 ) 909 file: str | None = Field( 910 default=None, 911 description="ID of the underlying storage file that backs this variant (`fil_...`).", 912 ) 913 filename: str | None = Field( 914 default=None, 915 description="Original filename of the uploaded file for this variant. `null` if the file is not loaded.", 916 ) 917 height: int | None = Field( 918 default=None, description="Height of this variant in pixels. `null` if not recorded." 919 ) 920 id: str = Field(..., description="Media variant ID (`mvr_...`).") 921 image_source: ( 922 TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItemImageSource | None 923 ) = Field( 924 default=None, 925 description="Resolved image delivery metadata for this variant, including dimensions and CDN URL. `null` for non-image content types.", 926 ) 927 updated_at: datetime | None = Field( 928 default=None, description="When this variant was last updated (ISO 8601)." 929 ) 930 url: str | None = Field( 931 default=None, 932 description="Signed download URL for this variant, resolved at request time. `null` if the file is unavailable.", 933 ) 934 variant_key: str | None = Field( 935 default=None, 936 description='Identifier for this variant\'s processing tier. Common values include `"original"` (the unmodified upload) and `"thumbnail"` (a resized preview).', 937 ) 938 width: int | None = Field( 939 default=None, description="Width of this variant in pixels. `null` if not recorded." 940 )
!!! 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.
943class TeamThreadListResponseDataItemParentMessageAttachmentsItem(BaseModel): 944 content_type: str | None = Field( 945 default=None, 946 description='MIME type of the attached file, e.g. `"image/png"` or `"application/pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 947 ) 948 description: str | None = Field( 949 default=None, 950 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.", 951 ) 952 filename: str | None = Field( 953 default=None, 954 description='Original filename of the attached file, e.g. `"report.pdf"`. Present on `file`, `artifact`, and `media` types. `null` otherwise.', 955 ) 956 height: int | None = Field( 957 default=None, 958 description="Height in pixels of the media item. Present on `media` type only. `null` otherwise.", 959 ) 960 id: str = Field(..., description="Unique identifier for this attachment within the message.") 961 image_height: int | None = Field( 962 default=None, 963 description="Height in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 964 ) 965 image_source: TeamThreadListResponseDataItemParentMessageAttachmentsItemImageSource | None = ( 966 Field( 967 default=None, 968 description="Image source metadata for inline rendering. Present on `file`, `scraped_link`, `artifact`, and `media` types when the content is an image. `null` otherwise.", 969 ) 970 ) 971 image_url: str | None = Field( 972 default=None, 973 description="URL of the preview image extracted from the scraped page. Present on `scraped_link` type only. `null` otherwise.", 974 ) 975 image_width: int | None = Field( 976 default=None, 977 description="Width in pixels of the scraped preview image. Present on `scraped_link` type only. `null` otherwise.", 978 ) 979 media_type: str | None = Field( 980 default=None, 981 description='The media category, e.g. `"video"` or `"audio"`. Present on `media` type only. `null` otherwise.', 982 ) 983 name: str | None = Field( 984 default=None, 985 description="Display name of the media item. Present on `media` type only. `null` otherwise.", 986 ) 987 object: dict[str, Any] | None = Field( 988 default=None, 989 description="The full embedded object payload. For `task` type, contains the task record. For `action` type, contains the action definition. `null` on other types.", 990 ) 991 title: str | None = Field( 992 default=None, 993 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.", 994 ) 995 type: str = Field( 996 ..., 997 description='The attachment type. One of `"file"`, `"scraped_link"`, `"artifact"`, `"task"`, `"media"`, or `"action"`. Determines which additional fields are present.', 998 ) 999 url: str | None = Field( 1000 default=None, 1001 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.", 1002 ) 1003 variants: ( 1004 list[TeamThreadListResponseDataItemParentMessageAttachmentsItemVariantsItem] | None 1005 ) = Field( 1006 default=None, 1007 description="Array of available encoding variants for the media item (e.g. different resolutions). Present on `media` type only. `null` otherwise.", 1008 ) 1009 version: int | None = Field( 1010 default=None, 1011 description="Version number of the attached artifact at the time of attachment. Present on `artifact` type only. `null` otherwise.", 1012 ) 1013 width: int | None = Field( 1014 default=None, 1015 description="Width in pixels of the media item. Present on `media` type only. `null` otherwise.", 1016 )
!!! 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.
The media category, e.g. "video" or "audio". Present on media type only. null otherwise.
The full embedded object payload. For task type, contains the task record. For action type, contains the action definition. null 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", or "action". 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. null otherwise.
1019class TeamThreadListResponseDataItemParentMessageReactionsItem(BaseModel): 1020 payload: dict[str, Any] | None = Field( 1021 default=None, 1022 description='Type-specific reaction data. For `"emoji_reaction"` reactions, contains an `emoji` key with the Unicode emoji string (e.g., `" "`).', 1023 ) 1024 type: str = Field( 1025 ..., 1026 description='Reaction type identifier. Currently always `"emoji_reaction"` for emoji-based reactions.', 1027 ) 1028 user: str | None = Field( 1029 default=None, description="Public ID of the user who added the reaction (`usr_...`)." 1030 )
!!! 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., " ").
1033class TeamThreadListResponseDataItemParentMessage(BaseModel): 1034 actors: list[TeamThreadListResponseDataItemParentMessageActorsItem] | None = Field( 1035 default=None, 1036 description="Resolved actor descriptors for the message sender, combining identity and display metadata. Always contains exactly one entry.", 1037 ) 1038 agent: str | None = Field( 1039 default=None, 1040 description="ID of the agent user that sent this message (`agi_...`). `null` for messages sent by human users.", 1041 ) 1042 agent_mode: Literal["cli", "embedded"] | None = Field( 1043 default=None, 1044 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.", 1045 ) 1046 attachments: list[TeamThreadListResponseDataItemParentMessageAttachmentsItem] | None = Field( 1047 default=None, 1048 description="Files, links, tasks, media, artifacts, and actions attached to this message. Empty array if there are no attachments.", 1049 ) 1050 branched_thread: str | None = Field( 1051 default=None, 1052 description="ID of the thread that was branched from this message (`thr_...`). `null` if this message has not spawned a branch thread.", 1053 ) 1054 content: str | None = Field( 1055 default=None, 1056 description="Text content of the message. `null` for messages that contain only attachments.", 1057 ) 1058 created_at: datetime | None = Field( 1059 default=None, description="When the message was posted (ISO 8601)." 1060 ) 1061 has_replies: bool | None = Field( 1062 default=None, 1063 description="Whether this message has at least one reply. Only present when explicitly requested or computed by the server.", 1064 ) 1065 id: str = Field(..., description="Message ID (`msg_...`).") 1066 idempotency_key: str | None = Field( 1067 default=None, 1068 description="Client-supplied idempotency key used to deduplicate message sends. `null` if the sender did not provide one.", 1069 ) 1070 legacy_agent: str | None = Field( 1071 default=None, 1072 description="Identifier of the legacy chat agent that sent this message, if applicable. `null` for messages sent by users or modern agent users.", 1073 ) 1074 metadata: dict[str, Any] | None = Field( 1075 default=None, 1076 description="Arbitrary key-value metadata attached to the message. Always present; defaults to an empty object when no metadata has been set.", 1077 ) 1078 org: str | None = Field( 1079 default=None, description="ID of the organization that owns this message (`org_...`)." 1080 ) 1081 reactions: list[TeamThreadListResponseDataItemParentMessageReactionsItem] | None = Field( 1082 default=None, 1083 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.", 1084 ) 1085 rendering_mode: str | None = Field( 1086 default=None, 1087 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.', 1088 ) 1089 replies: list[dict[str, Any]] | None = Field( 1090 default=None, 1091 description="Inline array of reply messages, each serialized as a full message object. Only present when the server has preloaded replies for this message.", 1092 ) 1093 replies_after_cursor: str | None = Field( 1094 default=None, 1095 description="Opaque pagination cursor to fetch replies posted after the current page. Only present when inline replies are included in the response.", 1096 ) 1097 replies_before_cursor: str | None = Field( 1098 default=None, 1099 description="Opaque pagination cursor to fetch replies posted before the current page. Only present when inline replies are included in the response.", 1100 ) 1101 reply_count: int | None = Field( 1102 default=None, 1103 description="Total number of direct replies to this message. Only present when explicitly requested or computed by the server.", 1104 ) 1105 reply_to: dict[str, Any] | None = Field( 1106 default=None, 1107 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.", 1108 ) 1109 sandbox: str | None = Field( 1110 default=None, 1111 description="ID of the developer sandbox this message belongs to (`dsb_...`). `null` for non-sandbox messages.", 1112 ) 1113 team: str | None = Field( 1114 default=None, 1115 description="ID of the team this message is scoped to (`tem_...`). `null` if the message is not team-scoped.", 1116 ) 1117 thread: str | None = Field( 1118 default=None, 1119 description="ID of the thread this message belongs to (`thr_...`). `null` for messages not yet associated with a thread.", 1120 ) 1121 user: str | None = Field( 1122 default=None, 1123 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.", 1124 )
!!! 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.
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.
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 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.
1127class TeamThreadListResponseDataItemParticipantsItem(BaseModel): 1128 alias: str | None = Field( 1129 default=None, description="Short handle or alias for the user. `null` if not set." 1130 ) 1131 app: str | None = Field( 1132 default=None, 1133 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.", 1134 ) 1135 app_name: str | None = Field( 1136 default=None, 1137 description="Display name of the user's app. `null` when the app association was not preloaded by the caller.", 1138 ) 1139 email: str | None = Field(default=None, description="Email address of the user.") 1140 id: str = Field(..., description="User ID (`usr_...`).") 1141 is_system_user: bool | None = Field( 1142 default=None, 1143 description="`true` if this account is an internal system user rather than a human. System users are created automatically by the platform.", 1144 ) 1145 metadata: dict[str, Any] | None = Field( 1146 default=None, 1147 description="Arbitrary key-value metadata attached to the user. Defaults to an empty object.", 1148 ) 1149 name: str | None = Field( 1150 default=None, 1151 description="Full display name of the user. `null` if the user has not set a name.", 1152 ) 1153 org: str | None = Field( 1154 default=None, 1155 description="ID of the organization this user belongs to (`org_...`). `null` if the user is not a member of any organization.", 1156 ) 1157 org_name: str | None = Field( 1158 default=None, 1159 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.", 1160 ) 1161 org_role: str | None = Field( 1162 default=None, 1163 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.', 1164 ) 1165 sandbox: str | None = Field( 1166 default=None, 1167 description="ID of the sandbox environment this user is scoped to (`sbx_...`). `null` for production users.", 1168 ) 1169 sandbox_name: str | None = Field( 1170 default=None, 1171 description="Display name of the user's sandbox environment. `null` for production users, or when the sandbox association was not preloaded by the caller.", 1172 )
!!! 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.
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.
1175class TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem(BaseModel): 1176 actions: list[str] = Field( 1177 ..., 1178 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1179 ) 1180 principal: str | None = Field( 1181 default=None, 1182 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"`.', 1183 ) 1184 principal_type: str = Field( 1185 ..., 1186 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1187 )
!!! 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".
1190class TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem(BaseModel): 1191 actions: list[str] = Field( 1192 ..., 1193 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1194 ) 1195 principal: str | None = Field( 1196 default=None, 1197 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"`.', 1198 ) 1199 principal_type: str = Field( 1200 ..., 1201 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1202 )
!!! 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".
1205class TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem(BaseModel): 1206 principal: str | None = Field( 1207 default=None, 1208 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"`.', 1209 ) 1210 principal_type: str = Field( 1211 ..., 1212 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1213 )
!!! 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".
1216class TeamThreadListResponseDataItemParticipatingAgentsItemAcl(BaseModel): 1217 add: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclAddItem] | None = Field( 1218 default=None, 1219 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 1220 ) 1221 grants: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclGrantsItem] | None = Field( 1222 default=None, 1223 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`.", 1224 ) 1225 remove: list[TeamThreadListResponseDataItemParticipatingAgentsItemAclRemoveItem] | None = Field( 1226 default=None, 1227 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 1228 )
!!! 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.
1231class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo(BaseModel): 1232 file: str | None = Field( 1233 default=None, 1234 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1235 ) 1236 height: int | None = Field( 1237 default=None, description="Height of the image in pixels. `null` if not known." 1238 ) 1239 media: str | None = Field( 1240 default=None, 1241 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1242 ) 1243 mime_type: str | None = Field( 1244 default=None, 1245 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1246 ) 1247 refresh_url: str | None = Field( 1248 default=None, 1249 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.", 1250 ) 1251 url: str | None = Field( 1252 default=None, 1253 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.", 1254 ) 1255 width: int | None = Field( 1256 default=None, description="Width of the image in pixels. `null` if not known." 1257 )
!!! 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.
1260class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem( 1261 BaseModel 1262): 1263 description: str | None = Field( 1264 default=None, 1265 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.", 1266 ) 1267 display_name: str | None = Field( 1268 default=None, 1269 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`.", 1270 ) 1271 id: str | None = Field( 1272 default=None, 1273 description="Template config ID (`cfg_...`). `null` for inline-only templates.", 1274 ) 1275 kind: str = Field( 1276 ..., 1277 description="Template config kind, or `SolutionTemplateRef` / `SolutionTemplatePath` when unresolved.", 1278 ) 1279 lookup_key: str | None = Field( 1280 default=None, 1281 description="Lookup key stamped on the template config at import time. `null` when no lookup key was assigned.", 1282 ) 1283 name: str | None = Field( 1284 default=None, 1285 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`.", 1286 ) 1287 readme_url: str | None = Field( 1288 default=None, 1289 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`.", 1290 ) 1291 virtual_path: str | None = Field( 1292 default=None, 1293 description="Stable virtual path assigned to the template config. `null` when no virtual path was set.", 1294 )
!!! 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.
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.
1297class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution(BaseModel): 1298 category_keys: list[str] | None = Field( 1299 default=None, 1300 description="Category tag keys declared in the Solution body, used to group Solutions in the catalog. An empty array when the body declares none.", 1301 ) 1302 created_at: datetime | None = Field( 1303 default=None, description="When the Solution config was first imported (ISO 8601)." 1304 ) 1305 description: str | None = Field( 1306 default=None, 1307 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.", 1308 ) 1309 id: str = Field(..., description="Solution config ID (`cfg_...`).") 1310 kind: str = Field(..., description='Resource type. Always `"Solution"`.') 1311 latest_solution: str | None = Field( 1312 default=None, 1313 description="When `upgrade_available` is `true`, the system-scope Solution config ID (`cfg_...`) that should be used as the upgrade source. `null` otherwise.", 1314 ) 1315 latest_version: str | None = Field( 1316 default=None, 1317 description="When `upgrade_available` is `true`, the higher system-scope `solution_version` available to upgrade to. `null` otherwise.", 1318 ) 1319 lookup_key: str | None = Field( 1320 default=None, 1321 description="The lookup key stored on the Solution config, if one was assigned during import. `null` when no lookup key was set.", 1322 ) 1323 metadata: dict[str, Any] | None = Field( 1324 default=None, 1325 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.", 1326 ) 1327 name: str | None = Field( 1328 default=None, 1329 description="Human-facing display name declared in the Solution body. `null` when the Solution body does not set one.", 1330 ) 1331 org: str | None = Field( 1332 default=None, 1333 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.", 1334 ) 1335 org_logo: ( 1336 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionOrgLogo | None 1337 ) = Field( 1338 default=None, 1339 description="Canonical image-source object for the resolved `org`'s logo, used as the principal category section glyph. Carries the signed `url` plus a `refresh_url`. `null` when `org_slug` is `null` or the org has no logo.", 1340 ) 1341 org_name: str | None = Field( 1342 default=None, 1343 description="Display name of the resolved `org`. Pairs with `org_slug` as the principal catalog category's label. `null` when `org_slug` is `null`.", 1344 ) 1345 org_slug: str | None = Field( 1346 default=None, 1347 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.", 1348 ) 1349 owners: list[str] = Field( 1350 ..., 1351 description='Owner scopes this Solution appears under. Members: `"system"` (app-level system scope) and/or `"org"` (viewer\'s org scope).', 1352 ) 1353 readme_url: str | None = Field( 1354 default=None, 1355 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`.", 1356 ) 1357 solution_id: str | None = Field( 1358 default=None, 1359 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.", 1360 ) 1361 solution_version: str | None = Field( 1362 default=None, 1363 description='Semver string declared in the Solution body (e.g. `"1.2.0"`). `null` when the body does not declare a version.', 1364 ) 1365 tag_keys: list[str] | None = Field( 1366 default=None, 1367 description="Freeform tag keys declared in the Solution body. An empty array when the body declares none.", 1368 ) 1369 template_kind: str | None = Field( 1370 default=None, 1371 description='Wrapped template kind `"AgentTemplate"`, `"AutomationTemplate"`, `"AgentRoutineTemplate"`, `"AgentToolTemplate"`, `"AgentComputerTemplate"`, or `"SolutionTemplateRef"` for ref-mode bundles.', 1372 ) 1373 templates: list[ 1374 TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolutionTemplatesItem 1375 ] = Field( 1376 ..., 1377 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.", 1378 ) 1379 updated_at: datetime | None = Field( 1380 default=None, description="When the Solution config was last modified (ISO 8601)." 1381 ) 1382 upgrade_available: bool = Field( 1383 ..., 1384 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.", 1385 ) 1386 virtual_path: str | None = Field( 1387 default=None, 1388 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.", 1389 )
!!! 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.
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.
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.
1392class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate(BaseModel): 1393 created_at: datetime | None = Field( 1394 default=None, description="When this template config was created (ISO 8601)." 1395 ) 1396 description: str | None = Field( 1397 default=None, 1398 description="Description of the template from the config body. `null` if the current version has no `description` field.", 1399 ) 1400 display_name: str | None = Field( 1401 default=None, 1402 description="Human-readable display name from the config body. `null` if the current version has no `display_name` field.", 1403 ) 1404 id: str = Field(..., description="Template config ID (`cfg_...`).") 1405 kind: str = Field( 1406 ..., description='Config kind identifier for this template (e.g. `"agent_tool_template"`).' 1407 ) 1408 lookup_key: str | None = Field( 1409 default=None, 1410 description="Stable lookup key assigned to this template config. `null` if no lookup key is set.", 1411 ) 1412 name: str | None = Field( 1413 default=None, 1414 description="Template name as stored in the config body. `null` if the current version has no `name` field.", 1415 ) 1416 updated_at: datetime | None = Field( 1417 default=None, description="When this template config was last modified (ISO 8601)." 1418 ) 1419 virtual_path: str | None = Field( 1420 default=None, 1421 description="Virtual filesystem path for this template config. `null` if not set.", 1422 )
!!! 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.
1425class TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution(BaseModel): 1426 solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionSolution = Field( 1427 ..., 1428 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.", 1429 ) 1430 template: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolutionTemplate = Field( 1431 ..., 1432 description="Summary of the AgentTemplate config (`cfg_...`) the agent was last provisioned or updated from.", 1433 )
!!! 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 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.
1436class TeamThreadListResponseDataItemParticipatingAgentsItem(BaseModel): 1437 acl: TeamThreadListResponseDataItemParticipatingAgentsItemAcl | None = Field( 1438 default=None, 1439 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.", 1440 ) 1441 app: str | None = Field( 1442 default=None, description="ID of the application that owns this agent (`dap_...`)." 1443 ) 1444 created_at: datetime | None = Field( 1445 default=None, description="When the agent was created (ISO 8601)." 1446 ) 1447 default_model: str | None = Field( 1448 default=None, 1449 description='Default LLM model identifier used by this agent when no model is specified at runtime (e.g. `"claude-3-7-sonnet-latest"`).', 1450 ) 1451 email: str | None = Field( 1452 default=None, 1453 description="Email address provisioned for this agent. `null` if email delivery is not configured.", 1454 ) 1455 id: str = Field(..., description="Agent ID (`agi_...`).") 1456 identity: str | None = Field( 1457 default=None, 1458 description="System-level identity prompt that shapes the agent's persona and behavior.", 1459 ) 1460 last_applied_template_config: str | None = Field( 1461 default=None, 1462 description="ID of the AgentTemplate config (`cfg_...`) this agent was last provisioned or updated from. `null` for manually created agents.", 1463 ) 1464 lookup_key: str | None = Field( 1465 default=None, 1466 description="Stable, user-defined identifier for this agent within the application. Unique per app.", 1467 ) 1468 metadata: dict[str, Any] | None = Field( 1469 default=None, 1470 description="Arbitrary key-value metadata attached to the agent. Not interpreted by the platform.", 1471 ) 1472 name: str | None = Field( 1473 default=None, description="Human-readable display name for the agent. `null` if not set." 1474 ) 1475 org: str | None = Field( 1476 default=None, 1477 description="ID of the organization this agent belongs to (`org_...`). `null` if the agent is not org-scoped.", 1478 ) 1479 org_name: str | None = Field( 1480 default=None, 1481 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.", 1482 ) 1483 originator: str | None = Field( 1484 default=None, 1485 description="Free-form label identifying the source or author that created this agent (e.g. a username or pipeline name).", 1486 ) 1487 phone_number: str | None = Field( 1488 default=None, 1489 description="Phone number provisioned for this agent. `null` if SMS is not configured.", 1490 ) 1491 sandbox: str | None = Field( 1492 default=None, 1493 description="ID of the sandbox environment this agent is scoped to (`dsb_...`). `null` in production deployments.", 1494 ) 1495 source_solution: TeamThreadListResponseDataItemParticipatingAgentsItemSourceSolution | None = ( 1496 Field( 1497 default=None, 1498 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.", 1499 ) 1500 ) 1501 team: str | None = Field( 1502 default=None, 1503 description="ID of the team that owns this agent (`tem_...`). `null` if the agent is not team-scoped.", 1504 ) 1505 template_upgrade_available: bool | None = Field( 1506 default=None, 1507 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 only on list endpoints; `null` on single-agent GET.", 1508 ) 1509 updated_at: datetime | None = Field( 1510 default=None, description="When the agent was last modified (ISO 8601)." 1511 ) 1512 user: str | None = Field( 1513 default=None, 1514 description="ID of the user that owns this agent (`usr_...`). `null` if the agent is not user-scoped.", 1515 )
!!! 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 only on list endpoints; null on single-agent GET.
1518class TeamThreadListResponseDataItemSettings(BaseModel): 1519 agent_enabled: bool | None = Field( 1520 default=None, 1521 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.", 1522 )
!!! 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.
1525class TeamThreadListResponseDataItem(BaseModel): 1526 agent_user: str | None = Field( 1527 default=None, 1528 description="ID of the agent that owns this thread (`agt_...`). `null` for user-owned or team-owned threads.", 1529 ) 1530 created_at: datetime | None = Field( 1531 default=None, description="When the thread was created (ISO 8601)." 1532 ) 1533 creator: TeamThreadListResponseDataItemCreator | None = Field( 1534 default=None, 1535 description="Expanded user object for the user who created this thread. Populated only when the association is loaded.", 1536 ) 1537 description: str | None = Field( 1538 default=None, 1539 description="Optional description or purpose statement for the thread. `null` if not set.", 1540 ) 1541 id: str = Field(..., description="Thread ID (`thr_...`).") 1542 is_channel: bool | None = Field( 1543 default=None, 1544 description="Whether this thread operates as a channel a multi-member broadcast-style conversation.", 1545 ) 1546 is_default: bool | None = Field( 1547 default=None, 1548 description="Whether this is the default thread for its owner. Each user or team has at most one default thread.", 1549 ) 1550 is_transient: bool | None = Field( 1551 default=None, 1552 description="Whether this thread is ephemeral and may be deleted automatically after a period of inactivity or when its TTL expires.", 1553 ) 1554 is_unlisted: bool | None = Field( 1555 default=None, 1556 description="Whether this thread is hidden from public discovery. Unlisted threads are accessible only to direct participants.", 1557 ) 1558 key: str | None = Field( 1559 default=None, 1560 description="Application-defined stable key that uniquely identifies the thread within its scope. Useful for idempotent creation. `null` if not set.", 1561 ) 1562 last_activity: datetime | None = Field( 1563 default=None, 1564 description="When the last message or activity occurred in this thread. Present only when activity enrichment is requested.", 1565 ) 1566 metadata: dict[str, Any] | None = Field( 1567 default=None, 1568 description="Arbitrary key-value metadata attached to the thread. Shape is application-defined; `null` if no metadata has been set.", 1569 ) 1570 muted: bool | None = Field( 1571 default=None, 1572 description="Whether the authenticated user has muted notifications for this thread. `true` suppresses all notification delivery.", 1573 ) 1574 org: str | None = Field( 1575 default=None, 1576 description="ID of the organization this thread belongs to (`org_...`). `null` for threads outside an org context.", 1577 ) 1578 parent_message: TeamThreadListResponseDataItemParentMessage | None = Field( 1579 default=None, 1580 description="The message that spawned this thread as a sub-thread. `null` for top-level threads.", 1581 ) 1582 participant: list[str] | None = Field( 1583 default=None, 1584 description="Array of participant user IDs (`usr_...`) who are members of this thread.", 1585 ) 1586 participants: list[TeamThreadListResponseDataItemParticipantsItem] | None = Field( 1587 default=None, 1588 description="Expanded participant user objects for each member of this thread. Populated only when the association is loaded.", 1589 ) 1590 participating_actor: list[str] | None = Field( 1591 default=None, 1592 description="Composite actor identifiers for all participants currently active in this thread. Present only when actor enrichment is requested.", 1593 ) 1594 participating_agents: list[TeamThreadListResponseDataItemParticipatingAgentsItem] | None = ( 1595 Field( 1596 default=None, 1597 description="Expanded agent objects for all agents participating in this thread. Present only when agent enrichment is requested.", 1598 ) 1599 ) 1600 role: str | None = Field( 1601 default=None, 1602 description='The authenticated user\'s membership role in this thread, e.g. `"owner"`, `"member"`, or `"viewer"`. `null` if the user is not a member.', 1603 ) 1604 sandbox: str | None = Field( 1605 default=None, 1606 description="ID of the developer sandbox this thread is scoped to (`sbx_...`). `null` for production threads.", 1607 ) 1608 settings: TeamThreadListResponseDataItemSettings | None = Field( 1609 default=None, 1610 description="Per-thread configuration settings controlling AI agent behavior for this thread.", 1611 ) 1612 slug: str | None = Field( 1613 default=None, 1614 description="URL-safe slug for the thread, used in human-readable permalinks. `null` if not assigned.", 1615 ) 1616 sub_threads: list[dict[str, Any]] | None = Field( 1617 default=None, 1618 description="Threads that are nested under this thread as replies to a parent message. Present only when sub-thread enrichment is requested.", 1619 ) 1620 team: str | None = Field( 1621 default=None, 1622 description="ID of the team that owns this thread (`team_...`). `null` for user-owned or agent-owned threads.", 1623 ) 1624 title: str | None = Field( 1625 default=None, 1626 description="Human-readable name of the thread. `null` if no title has been set.", 1627 ) 1628 ttl: int | None = Field( 1629 default=None, 1630 description="Time-to-live in seconds after which the thread may be automatically cleaned up. `null` if the thread does not expire.", 1631 ) 1632 unread_count: int | None = Field( 1633 default=None, 1634 description="Number of messages in this thread that the authenticated user has not yet read. Present only when read-state enrichment is requested.", 1635 ) 1636 updated_at: datetime | None = Field( 1637 default=None, description="When the thread was last modified (ISO 8601)." 1638 ) 1639 user: str | None = Field( 1640 default=None, 1641 description="ID of the user who owns this thread (`usr_...`). `null` for team-owned or agent-owned threads.", 1642 )
!!! 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.
Expanded user object for the user who created this thread. Populated only when the association is loaded.
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.
When the last message or activity occurred in this thread. Present only when activity enrichment is requested.
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 (sbx_...). 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.
Time-to-live in seconds after which the thread may be automatically cleaned up. null if the thread does not expire.
1645class TeamThreadListResponse(BaseModel): 1646 """ 1647 Successful response 1648 """ 1649 1650 data: list[TeamThreadListResponseDataItem] = Field( 1651 ..., description="Array of thread objects belonging to the team." 1652 )
Successful response
1655class TeamListResponseDataItemAclAddItem(BaseModel): 1656 actions: list[str] = Field( 1657 ..., 1658 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1659 ) 1660 principal: str | None = Field( 1661 default=None, 1662 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"`.', 1663 ) 1664 principal_type: str = Field( 1665 ..., 1666 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1667 )
!!! 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".
1670class TeamListResponseDataItemAclGrantsItem(BaseModel): 1671 actions: list[str] = Field( 1672 ..., 1673 description='Array of action strings the principal is permitted to perform, e.g. `["read", "write"]`. Must contain at least one entry.', 1674 ) 1675 principal: str | None = Field( 1676 default=None, 1677 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"`.', 1678 ) 1679 principal_type: str = Field( 1680 ..., 1681 description='The kind of principal receiving the grant. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1682 )
!!! 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".
1685class TeamListResponseDataItemAclRemoveItem(BaseModel): 1686 principal: str | None = Field( 1687 default=None, 1688 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"`.', 1689 ) 1690 principal_type: str = Field( 1691 ..., 1692 description='The kind of principal to remove. One of `"user"`, `"team"`, `"org"`, `"org_role"`, `"agent"`, or `"everyone"`.', 1693 )
!!! 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".
1696class TeamListResponseDataItemAcl(BaseModel): 1697 add: list[TeamListResponseDataItemAclAddItem] | None = Field( 1698 default=None, 1699 description="Patch mode: grants to add or merge into the existing list. Cannot be combined with `grants`.", 1700 ) 1701 grants: list[TeamListResponseDataItemAclGrantsItem] | None = Field( 1702 default=None, 1703 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`.", 1704 ) 1705 remove: list[TeamListResponseDataItemAclRemoveItem] | None = Field( 1706 default=None, 1707 description="Patch mode: principals whose grants should be removed from the existing list. Cannot be combined with `grants`.", 1708 )
!!! 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.
1711class TeamListResponseDataItem(BaseModel): 1712 acl: TeamListResponseDataItemAcl | None = Field( 1713 default=None, 1714 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.", 1715 ) 1716 app: str | None = Field( 1717 default=None, 1718 description="ID of the developer application this team belongs to (`dap_...`). `null` if the team is not scoped to an app.", 1719 ) 1720 badges: dict[str, Any] | None = Field( 1721 default=None, 1722 description="Aggregated badge counts for the team, keyed by category. `null` when badge data is not loaded.", 1723 ) 1724 created_at: datetime | None = Field( 1725 default=None, description="When this team was created (ISO 8601)." 1726 ) 1727 description: str | None = Field( 1728 default=None, 1729 description="Human-readable description of the team's purpose. `null` if not set.", 1730 ) 1731 id: str = Field(..., description="Team ID (`tem_...`).") 1732 membership_status: str | None = Field( 1733 default=None, 1734 description='The authenticated viewer\'s role on this team. One of `"owner"`, `"admin"`, or `"member"`. `null` if the viewer is not a member.', 1735 ) 1736 metadata: dict[str, Any] | None = Field( 1737 default=None, 1738 description="Arbitrary key-value metadata attached to this team. Returns an empty object when no metadata has been set.", 1739 ) 1740 name: str | None = Field(default=None, description="Display name of the team.") 1741 org: str | None = Field( 1742 default=None, 1743 description="ID of the organization this team belongs to (`org_...`). `null` if the team is not org-scoped.", 1744 ) 1745 sandbox: str | None = Field( 1746 default=None, 1747 description="ID of the developer sandbox this team is scoped to (`dsb_...`). `null` outside sandbox contexts.", 1748 ) 1749 slug: str | None = Field( 1750 default=None, 1751 description="URL-safe slug for the team, derived from the team name. `null` if not set.", 1752 ) 1753 updated_at: datetime | None = Field( 1754 default=None, description="When this team was last updated (ISO 8601)." 1755 )
!!! 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.
1758class TeamListResponse(BaseModel): 1759 """ 1760 Successful response 1761 """ 1762 1763 data: list[TeamListResponseDataItem] = Field( 1764 ..., description="Array of team objects for the current page." 1765 ) 1766 has_next: bool = Field(..., description="`true` if there is a subsequent page of results.") 1767 has_prev: bool = Field(..., description="`true` if there is a preceding page of results.") 1768 page: int = Field(..., description="The current page number.") 1769 page_size: int = Field(..., description="The number of results per page.") 1770 total_entries: int = Field( 1771 ..., description="Total number of teams matching the query across all pages." 1772 ) 1773 total_pages: int = Field( 1774 ..., description="Total number of pages given the current `page_size`." 1775 )
Successful response
1778class TeamArtifactsResponseDataItemImageSource(BaseModel): 1779 file: str | None = Field( 1780 default=None, 1781 description="ID of the underlying storage file (`fil_...`). `null` when the image is not backed by a platform storage file.", 1782 ) 1783 height: int | None = Field( 1784 default=None, description="Height of the image in pixels. `null` if not known." 1785 ) 1786 media: str | None = Field( 1787 default=None, 1788 description="ID of the associated media record (`med_...`). `null` when the image is not linked to a media entity.", 1789 ) 1790 mime_type: str | None = Field( 1791 default=None, 1792 description='MIME type of the image, e.g. `"image/png"` or `"image/jpeg"`. `null` if not known.', 1793 ) 1794 refresh_url: str | None = Field( 1795 default=None, 1796 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.", 1797 ) 1798 url: str | None = Field( 1799 default=None, 1800 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.", 1801 ) 1802 width: int | None = Field( 1803 default=None, description="Width of the image in pixels. `null` if not known." 1804 )
!!! 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.
1807class TeamArtifactsResponseDataItem(BaseModel): 1808 agent: str | None = Field( 1809 default=None, 1810 description="ID of the agent that produced this artifact (`agt_...`). `null` if not agent-produced.", 1811 ) 1812 content_type: str | None = Field( 1813 default=None, 1814 description='MIME type of the current version\'s file, e.g. `"text/csv"` or `"image/png"`. `null` if no file is attached.', 1815 ) 1816 created_at: datetime | None = Field( 1817 default=None, description="When the artifact was first created (ISO 8601)." 1818 ) 1819 current_version: str | None = Field( 1820 default=None, 1821 description="ID of the current (latest published) artifact version (`artv_...`). `null` if no version has been published.", 1822 ) 1823 description: str | None = Field( 1824 default=None, 1825 description="Optional longer description of the artifact's contents or purpose. `null` if not set.", 1826 ) 1827 file: str | None = Field( 1828 default=None, 1829 description="Storage file ID for the current version (`fil_...`). `null` if no file is attached.", 1830 ) 1831 file_name: str | None = Field( 1832 default=None, 1833 description='Original filename of the current version\'s file, e.g. `"output.csv"`. `null` if no file is attached.', 1834 ) 1835 file_url: str | None = Field( 1836 default=None, 1837 description="Short-lived signed URL for downloading the current version's file. `null` if no file is attached.", 1838 ) 1839 id: str = Field(..., description="Artifact ID (`art_...`).") 1840 image_source: TeamArtifactsResponseDataItemImageSource | None = Field( 1841 default=None, 1842 description='Image source metadata for rendering the current version\'s file inline. Present only when `content_type` starts with `"image/"`. `null` otherwise.', 1843 ) 1844 name: str | None = Field( 1845 default=None, 1846 description='Human-readable name for the artifact, e.g. `"Q2 Report"`. `null` if not set.', 1847 ) 1848 org: str | None = Field( 1849 default=None, description="ID of the organization this artifact belongs to (`org_...`)." 1850 ) 1851 sandbox: str | None = Field( 1852 default=None, 1853 description="Identifier of the sandbox environment associated with this artifact. `null` if not sandbox-scoped.", 1854 ) 1855 team: str | None = Field( 1856 default=None, 1857 description="ID of the team that owns this artifact (`tea_...`). `null` if not team-scoped.", 1858 ) 1859 thread: str | None = Field( 1860 default=None, 1861 description="ID of the thread in which this artifact was created (`thr_...`). `null` if not thread-scoped.", 1862 ) 1863 updated_at: datetime | None = Field( 1864 default=None, description="When the artifact record was last modified (ISO 8601)." 1865 ) 1866 user: str | None = Field( 1867 default=None, 1868 description="ID of the user who created this artifact (`usr_...`). `null` if not user-scoped.", 1869 ) 1870 version: int | None = Field( 1871 default=None, 1872 description="Current version number of the artifact. Increments each time a new version is published.", 1873 )
!!! 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 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.
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.
ID of the thread in which this artifact was created (thr_...). null if not thread-scoped.
1876class TeamArtifactsResponse(BaseModel): 1877 """ 1878 Successful response 1879 """ 1880 1881 data: list[TeamArtifactsResponseDataItem] = Field( 1882 ..., description="Array of artifact objects belonging to the team." 1883 )
Successful response
1886class TeamInvitesResponse(BaseModel): 1887 """ 1888 Successful response 1889 """ 1890 1891 code: str = Field( 1892 ..., 1893 description="Six-character alphanumeric join code. Present this value to the join-team endpoint to add a user to the team.", 1894 )
Successful response
1897class AsyncTeamCustomObjectResource: 1898 def __init__(self, http: HttpClient): 1899 self._http = http 1900 1901 async def list( 1902 self, 1903 team: str, 1904 type: str, 1905 *, 1906 limit: int | None = None, 1907 offset: int | None = None, 1908 row_key: str | None = None, 1909 sort_key: str | None = None, 1910 query: str | None = None, 1911 ) -> TeamCustomObjectListResponse: 1912 """ 1913 List a team's custom objects 1914 Returns a paginated list of custom objects owned by the specified team, 1915 filtered to a single schema type. Results are ordered by creation time 1916 descending unless `query` is provided, in which case they are ordered by 1917 full-text relevance score descending. 1918 Use `limit` and `offset` for page-based pagination. Use `row_key` or 1919 `sort_key` to narrow results to objects matching those index values. 1920 Full-text search via `query` operates only against the fields configured 1921 as `search_fields` on the schema. 1922 The authenticated user must be a member of the team with sufficient 1923 access. Returns 404 if the team is not found, the caller lacks access, 1924 or `type` does not match a registered schema for the team's organization. 1925 1926 Args: 1927 team: Team ID (`team_...`). Scopes results to objects owned by this team. 1928 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 1929 limit: Maximum number of objects to return per page. 1930 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 1931 row_key: Filter results to objects whose `row_key` exactly matches this value. 1932 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 1933 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. 1934 1935 Returns: 1936 Successful response 1937 """ 1938 query: dict[str, object] = {} 1939 query["type"] = type 1940 if limit is not None: 1941 query["limit"] = limit 1942 if offset is not None: 1943 query["offset"] = offset 1944 if row_key is not None: 1945 query["row_key"] = row_key 1946 if sort_key is not None: 1947 query["sort_key"] = sort_key 1948 if query is not None: 1949 query["query"] = query 1950 return await self._http.request( 1951 f"/api/v1/teams/{team}/custom_objects", 1952 query=query, 1953 response_type=TeamCustomObjectListResponse, 1954 ) 1955 1956 async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 1957 """ 1958 Create a team custom object 1959 Creates a new custom object owned by the specified team. The object is 1960 instantiated against the schema identified by `type` (the schema's 1961 `lookup_key`). All field values are validated against that schema's 1962 field definitions before the object is persisted. 1963 The authenticated user must be a member of the team with sufficient 1964 access. If the team is not found or the caller lacks access, the endpoint 1965 returns 404. If `type` does not match a registered schema for the team's 1966 organization, the endpoint also returns 404. 1967 1968 Args: 1969 team: Team ID (`team_...`). Scopes results to objects owned by this team. 1970 input: Request body. 1971 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 1972 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 1973 1974 Returns: 1975 The newly created custom object. 1976 """ 1977 return await self._http.request( 1978 f"/api/v1/teams/{team}/custom_objects", 1979 method="POST", 1980 body=input, 1981 response_type=CustomObject, 1982 )
1901 async def list( 1902 self, 1903 team: str, 1904 type: str, 1905 *, 1906 limit: int | None = None, 1907 offset: int | None = None, 1908 row_key: str | None = None, 1909 sort_key: str | None = None, 1910 query: str | None = None, 1911 ) -> TeamCustomObjectListResponse: 1912 """ 1913 List a team's custom objects 1914 Returns a paginated list of custom objects owned by the specified team, 1915 filtered to a single schema type. Results are ordered by creation time 1916 descending unless `query` is provided, in which case they are ordered by 1917 full-text relevance score descending. 1918 Use `limit` and `offset` for page-based pagination. Use `row_key` or 1919 `sort_key` to narrow results to objects matching those index values. 1920 Full-text search via `query` operates only against the fields configured 1921 as `search_fields` on the schema. 1922 The authenticated user must be a member of the team with sufficient 1923 access. Returns 404 if the team is not found, the caller lacks access, 1924 or `type` does not match a registered schema for the team's organization. 1925 1926 Args: 1927 team: Team ID (`team_...`). Scopes results to objects owned by this team. 1928 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 1929 limit: Maximum number of objects to return per page. 1930 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 1931 row_key: Filter results to objects whose `row_key` exactly matches this value. 1932 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 1933 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. 1934 1935 Returns: 1936 Successful response 1937 """ 1938 query: dict[str, object] = {} 1939 query["type"] = type 1940 if limit is not None: 1941 query["limit"] = limit 1942 if offset is not None: 1943 query["offset"] = offset 1944 if row_key is not None: 1945 query["row_key"] = row_key 1946 if sort_key is not None: 1947 query["sort_key"] = sort_key 1948 if query is not None: 1949 query["query"] = query 1950 return await self._http.request( 1951 f"/api/v1/teams/{team}/custom_objects", 1952 query=query, 1953 response_type=TeamCustomObjectListResponse, 1954 )
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
1956 async def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 1957 """ 1958 Create a team custom object 1959 Creates a new custom object owned by the specified team. The object is 1960 instantiated against the schema identified by `type` (the schema's 1961 `lookup_key`). All field values are validated against that schema's 1962 field definitions before the object is persisted. 1963 The authenticated user must be a member of the team with sufficient 1964 access. If the team is not found or the caller lacks access, the endpoint 1965 returns 404. If `type` does not match a registered schema for the team's 1966 organization, the endpoint also returns 404. 1967 1968 Args: 1969 team: Team ID (`team_...`). Scopes results to objects owned by this team. 1970 input: Request body. 1971 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 1972 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 1973 1974 Returns: 1975 The newly created custom object. 1976 """ 1977 return await self._http.request( 1978 f"/api/v1/teams/{team}/custom_objects", 1979 method="POST", 1980 body=input, 1981 response_type=CustomObject, 1982 )
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.
1985class AsyncMemberResource: 1986 def __init__(self, http: HttpClient): 1987 self._http = http 1988 1989 async def remove(self, team: str) -> None: 1990 """ 1991 Remove a member or org from a team 1992 Removes a user, agent, or all members of an organization from the specified 1993 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 1994 one or none returns a 400 error. On success, returns 204 No Content. 1995 When `org` is provided, every user and agent membership belonging to that org 1996 is removed in a single call. The caller must be a member of the team's owning 1997 org to perform an org-scoped removal. You cannot target the team's owning org 1998 itself with this parameter. 1999 The caller must have permission to manage the team. When `app` is present, the 2000 request is scoped to that app and requires a valid app-scoped token. 2001 2002 Args: 2003 team: Team ID (`team_...`). The team to remove the member from. 2004 2005 Returns: 2006 Empty response. Returns 204 No Content on success. 2007 """ 2008 await self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 2009 2010 async def list(self, team: str) -> MemberListResponse: 2011 """ 2012 List members of a team 2013 Returns all members of the specified team, including both users and agents. 2014 Members are returned in a single non-paginated array ordered by join time. 2015 Bearer-authenticated users must be a member of the team to retrieve its 2016 member list. Developer and server-to-server callers can retrieve members for 2017 any team visible to their app scope. When `app` is provided, the request is 2018 scoped to that app and requires a valid app-scoped token. 2019 2020 Args: 2021 team: Team ID (`team_...`). The team to remove the member from. 2022 2023 Returns: 2024 Successful response 2025 """ 2026 return await self._http.request( 2027 f"/api/v1/teams/{team}/members", 2028 response_type=MemberListResponse, 2029 ) 2030 2031 async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 2032 """ 2033 Add a member to a team 2034 Adds a user or agent as a member of the specified team and returns the new 2035 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 2036 both or neither returns a 400 error. 2037 The caller must have permission to manage the team. When an `app` is provided, 2038 the request is scoped to that app and the caller must hold a valid app-scoped 2039 token. The default role is `"member"` when `role` is omitted. 2040 2041 Args: 2042 team: Team ID (`team_...`). The team to remove the member from. 2043 input: Request body. 2044 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 2045 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 2046 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 2047 2048 Returns: 2049 The newly created team membership. 2050 """ 2051 return await self._http.request( 2052 f"/api/v1/teams/{team}/members", 2053 method="POST", 2054 body=input, 2055 response_type=TeamMembership, 2056 ) 2057 2058 async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 2059 """ 2060 Update a team member's role 2061 Changes the role of an existing user member on the specified team. Returns the 2062 updated membership on success. 2063 Only user memberships are supported by this endpoint. Attempting to update an 2064 agent membership returns 404. To change an agent's role, remove the existing 2065 membership and re-add the agent with the desired role. 2066 The caller must have permission to modify the team. You cannot change a member's 2067 role across organization boundaries. Demoting the last owner of a team returns 2068 409. An invalid `role` value returns 422. When `app` is provided, the request 2069 is scoped to that app and requires a valid app-scoped token. 2070 2071 Args: 2072 team: Team ID (`team_...`). The team to remove the member from. 2073 user: User ID (`usr_...`) of the existing member whose role should be changed. 2074 input: Request body. 2075 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 2076 2077 Returns: 2078 The updated team membership reflecting the new role. 2079 """ 2080 return await self._http.request( 2081 f"/api/v1/teams/{team}/members/{user}", 2082 method="PATCH", 2083 body=input, 2084 response_type=TeamMembership, 2085 )
1989 async def remove(self, team: str) -> None: 1990 """ 1991 Remove a member or org from a team 1992 Removes a user, agent, or all members of an organization from the specified 1993 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 1994 one or none returns a 400 error. On success, returns 204 No Content. 1995 When `org` is provided, every user and agent membership belonging to that org 1996 is removed in a single call. The caller must be a member of the team's owning 1997 org to perform an org-scoped removal. You cannot target the team's owning org 1998 itself with this parameter. 1999 The caller must have permission to manage the team. When `app` is present, the 2000 request is scoped to that app and requires a valid app-scoped token. 2001 2002 Args: 2003 team: Team ID (`team_...`). The team to remove the member from. 2004 2005 Returns: 2006 Empty response. Returns 204 No Content on success. 2007 """ 2008 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.
2010 async def list(self, team: str) -> MemberListResponse: 2011 """ 2012 List members of a team 2013 Returns all members of the specified team, including both users and agents. 2014 Members are returned in a single non-paginated array ordered by join time. 2015 Bearer-authenticated users must be a member of the team to retrieve its 2016 member list. Developer and server-to-server callers can retrieve members for 2017 any team visible to their app scope. When `app` is provided, the request is 2018 scoped to that app and requires a valid app-scoped token. 2019 2020 Args: 2021 team: Team ID (`team_...`). The team to remove the member from. 2022 2023 Returns: 2024 Successful response 2025 """ 2026 return await self._http.request( 2027 f"/api/v1/teams/{team}/members", 2028 response_type=MemberListResponse, 2029 )
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
2031 async def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 2032 """ 2033 Add a member to a team 2034 Adds a user or agent as a member of the specified team and returns the new 2035 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 2036 both or neither returns a 400 error. 2037 The caller must have permission to manage the team. When an `app` is provided, 2038 the request is scoped to that app and the caller must hold a valid app-scoped 2039 token. The default role is `"member"` when `role` is omitted. 2040 2041 Args: 2042 team: Team ID (`team_...`). The team to remove the member from. 2043 input: Request body. 2044 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 2045 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 2046 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 2047 2048 Returns: 2049 The newly created team membership. 2050 """ 2051 return await self._http.request( 2052 f"/api/v1/teams/{team}/members", 2053 method="POST", 2054 body=input, 2055 response_type=TeamMembership, 2056 )
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.
The caller must have permission to manage the team. 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.
2058 async def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 2059 """ 2060 Update a team member's role 2061 Changes the role of an existing user member on the specified team. Returns the 2062 updated membership on success. 2063 Only user memberships are supported by this endpoint. Attempting to update an 2064 agent membership returns 404. To change an agent's role, remove the existing 2065 membership and re-add the agent with the desired role. 2066 The caller must have permission to modify the team. You cannot change a member's 2067 role across organization boundaries. Demoting the last owner of a team returns 2068 409. An invalid `role` value returns 422. When `app` is provided, the request 2069 is scoped to that app and requires a valid app-scoped token. 2070 2071 Args: 2072 team: Team ID (`team_...`). The team to remove the member from. 2073 user: User ID (`usr_...`) of the existing member whose role should be changed. 2074 input: Request body. 2075 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 2076 2077 Returns: 2078 The updated team membership reflecting the new role. 2079 """ 2080 return await self._http.request( 2081 f"/api/v1/teams/{team}/members/{user}", 2082 method="PATCH", 2083 body=input, 2084 response_type=TeamMembership, 2085 )
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.
2088class AsyncTeamThreadResource: 2089 def __init__(self, http: HttpClient): 2090 self._http = http 2091 2092 async def list(self, team: str) -> TeamThreadListResponse: 2093 """ 2094 List threads for a team 2095 Returns all threads owned by the specified team that the authenticated caller 2096 has permission to view. The caller must have access to the team; requests 2097 without team access are rejected with 404. 2098 Threads are returned in a single `data` array. Use the team-scoped thread 2099 endpoints to create, update, or delete individual threads. 2100 2101 Args: 2102 team: Team ID (`tem_...`) whose threads should be listed. 2103 2104 Returns: 2105 Successful response 2106 """ 2107 return await self._http.request( 2108 f"/api/v1/teams/{team}/threads", 2109 response_type=TeamThreadListResponse, 2110 ) 2111 2112 async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 2113 """ 2114 Create a thread for a team 2115 Creates a new thread owned by the specified team. The authenticated caller must 2116 have access to the team; requests from callers without team access are rejected 2117 with 404. 2118 If a `profile_picture` is provided in the thread params, it must be 2119 base64-encoded image data. The image is uploaded and associated with the thread 2120 before creation completes. Omit `profile_picture` to skip this step. 2121 By default the platform sends an automatic welcome message into the new thread. 2122 Pass `skip_welcome_message: true` to suppress this behavior, for example when 2123 creating threads programmatically in bulk or seeding test data. 2124 2125 Args: 2126 team: Team ID (`tem_...`) whose threads should be listed. 2127 input: Request body. 2128 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 2129 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 2130 2131 Returns: 2132 The newly created thread. 2133 """ 2134 return await self._http.request( 2135 f"/api/v1/teams/{team}/threads", 2136 method="POST", 2137 body=input, 2138 response_type=Thread, 2139 )
2092 async def list(self, team: str) -> TeamThreadListResponse: 2093 """ 2094 List threads for a team 2095 Returns all threads owned by the specified team that the authenticated caller 2096 has permission to view. The caller must have access to the team; requests 2097 without team access are rejected with 404. 2098 Threads are returned in a single `data` array. Use the team-scoped thread 2099 endpoints to create, update, or delete individual threads. 2100 2101 Args: 2102 team: Team ID (`tem_...`) whose threads should be listed. 2103 2104 Returns: 2105 Successful response 2106 """ 2107 return await self._http.request( 2108 f"/api/v1/teams/{team}/threads", 2109 response_type=TeamThreadListResponse, 2110 )
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. Use the team-scoped thread
endpoints to create, update, or delete individual threads.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed.
Returns:
Successful response
2112 async def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 2113 """ 2114 Create a thread for a team 2115 Creates a new thread owned by the specified team. The authenticated caller must 2116 have access to the team; requests from callers without team access are rejected 2117 with 404. 2118 If a `profile_picture` is provided in the thread params, it must be 2119 base64-encoded image data. The image is uploaded and associated with the thread 2120 before creation completes. Omit `profile_picture` to skip this step. 2121 By default the platform sends an automatic welcome message into the new thread. 2122 Pass `skip_welcome_message: true` to suppress this behavior, for example when 2123 creating threads programmatically in bulk or seeding test data. 2124 2125 Args: 2126 team: Team ID (`tem_...`) whose threads should be listed. 2127 input: Request body. 2128 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 2129 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 2130 2131 Returns: 2132 The newly created thread. 2133 """ 2134 return await self._http.request( 2135 f"/api/v1/teams/{team}/threads", 2136 method="POST", 2137 body=input, 2138 response_type=Thread, 2139 )
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.
2142class AsyncTeamResource: 2143 def __init__(self, http: HttpClient): 2144 self._http = http 2145 self.custom_objects = AsyncTeamCustomObjectResource(http) 2146 self.members = AsyncMemberResource(http) 2147 self.threads = AsyncTeamThreadResource(http) 2148 2149 async def list( 2150 self, 2151 *, 2152 page: int | None = None, 2153 page_size: int | None = None, 2154 search: str | None = None, 2155 metadata: dict[str, Any] | None = None, 2156 membership: str | None = None, 2157 ) -> TeamListResponse: 2158 """ 2159 List teams 2160 Returns a paginated list of teams visible to the authenticated user, ordered 2161 by creation time descending. Use `membership` to narrow results to teams the 2162 caller has joined or teams they are eligible to join based on their ACL 2163 visibility. 2164 Supports full-text search across team name and description via `search`, and 2165 structured metadata filtering via `metadata`. When `app` is present, results 2166 are scoped to that app and the caller must hold the corresponding app scope. 2167 2168 Args: 2169 page: Page number to retrieve, starting at 1. Defaults to 1. 2170 page_size: Number of teams to return per page. Defaults to 25. 2171 search: Full-text search string matched against team name and description. 2172 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 2173 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. 2174 2175 Returns: 2176 Successful response 2177 """ 2178 query: dict[str, object] = {} 2179 if page is not None: 2180 query["page"] = page 2181 if page_size is not None: 2182 query["page_size"] = page_size 2183 if search is not None: 2184 query["search"] = search 2185 if metadata is not None: 2186 query["metadata"] = metadata 2187 if membership is not None: 2188 query["membership"] = membership 2189 return await self._http.request( 2190 "/api/v1/teams", 2191 query=query, 2192 response_type=TeamListResponse, 2193 ) 2194 2195 async def create(self, input: TeamCreateInput) -> Team: 2196 """ 2197 Create a team 2198 Creates a new team and returns the created team object. The authenticated 2199 user becomes the team's owner. 2200 When `app` is supplied, the request is scoped to that app and the caller 2201 must hold the corresponding app scope. Omit `org` unless you want the team 2202 pinned to a specific organization. A default chat thread is provisioned for 2203 the team automatically after creation. 2204 2205 Args: 2206 input: Request body. 2207 input.acl: Access control configuration for the team. Controls who can discover and join the team. 2208 input.description: Optional human-readable description of the team's purpose. 2209 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 2210 input.name: Display name for the team. 2211 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 2212 2213 Returns: 2214 The newly created team. 2215 """ 2216 return await self._http.request( 2217 "/api/v1/teams", 2218 method="POST", 2219 body=input, 2220 response_type=Team, 2221 ) 2222 2223 async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 2224 """ 2225 Join a team with an invite code 2226 Adds a principal to a team using a 12-character invite code. The invite 2227 code can be supplied as either `join_code` or `invite_code`; both are 2228 accepted for backwards compatibility. 2229 For user-authenticated requests, the currently authenticated user is added 2230 to the team. For server-to-server requests, you must supply either `agent` 2231 (to add an agent) or `user` (to add a specific user by ID). If the user 2232 is already a member of the team, the request succeeds without creating a 2233 duplicate membership. 2234 This endpoint is rate-limited to 10 requests per minute per IP address to 2235 prevent invite-code enumeration. 2236 2237 Args: 2238 input: Request body. 2239 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. 2240 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 2241 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 2242 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 2243 2244 Returns: 2245 The team the principal has joined. 2246 """ 2247 return await self._http.request( 2248 "/api/v1/teams/join_by_code", 2249 method="POST", 2250 body=input, 2251 response_type=Team, 2252 ) 2253 2254 async def delete(self, team: str) -> None: 2255 """ 2256 Delete a team 2257 Permanently deletes the team identified by `team`. This action is 2258 irreversible all team memberships, settings, and associated data are 2259 removed. 2260 The caller must be the team owner or an org admin. When `app` is present, 2261 the caller must also hold the corresponding app scope. 2262 2263 Args: 2264 team: Team ID (`team_...`) of the team to delete. 2265 2266 Returns: 2267 Empty response the team has been deleted. 2268 """ 2269 await self._http.request(f"/api/v1/teams/{team}", method="DELETE") 2270 2271 async def get(self, team: str) -> Team: 2272 """ 2273 Retrieve a team 2274 Returns the full team object for the given `team` ID, including its current 2275 member list and all associated threads. 2276 The authenticated user must be a member of the team or hold a role that 2277 grants visibility (org admin, app scope). When `app` is supplied, the 2278 caller must hold the corresponding app scope. 2279 2280 Args: 2281 team: Team ID (`team_...`) of the team to retrieve. 2282 2283 Returns: 2284 The requested team, including its members and threads. 2285 """ 2286 return await self._http.request(f"/api/v1/teams/{team}", response_type=Team) 2287 2288 async def update(self, team: str, input: TeamUpdateInput) -> Team: 2289 """ 2290 Update a team 2291 Updates one or more attributes of the team identified by `team`. Only the 2292 fields you provide are changed; omitted fields are left as-is. 2293 To replace the team's profile picture, supply the `profile_picture` object 2294 with base64-encoded image data. The previous picture is deleted after the 2295 new one is successfully uploaded. When `app` is present, the caller must hold 2296 the corresponding app scope. The caller must be a team owner or org admin. 2297 2298 Args: 2299 team: Team ID (`team_...`) of the team to update. 2300 input: Request body. 2301 input.acl: New access control configuration for the team. Replaces the existing ACL. 2302 input.description: New human-readable description of the team's purpose. 2303 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 2304 input.name: New display name for the team. 2305 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 2306 2307 Returns: 2308 The updated team with all changes applied. 2309 """ 2310 return await self._http.request( 2311 f"/api/v1/teams/{team}", 2312 method="PATCH", 2313 body=input, 2314 response_type=Team, 2315 ) 2316 2317 async def artifacts(self, team: str) -> TeamArtifactsResponse: 2318 """ 2319 List a team's artifacts 2320 Returns all artifacts owned by the specified team. Artifacts represent 2321 AI-generated or user-uploaded files associated with agent sessions, 2322 threads, or sandboxes such as images, documents, and code outputs. 2323 The authenticated user must be a member of the team. Attempting to list 2324 artifacts for a team the caller does not have access to returns 404 2325 rather than 403 to avoid leaking team existence. 2326 Results are returned in a single page without cursor pagination. Each 2327 artifact in the response reflects the state of its current version, 2328 including a short-lived signed `file_url` for direct download. 2329 2330 Args: 2331 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 2332 2333 Returns: 2334 Successful response 2335 """ 2336 return await self._http.request( 2337 f"/api/v1/teams/{team}/artifacts", 2338 response_type=TeamArtifactsResponse, 2339 ) 2340 2341 async def invite(self, team: str) -> TeamInvite: 2342 """ 2343 Create a team invite 2344 Generates a new invite code for the specified team. The authenticated user 2345 must be a member of the team with the `owner` or `admin` role. 2346 The returned code is a short alphanumeric string that other users can 2347 present to join the team. Each call produces a new code; previously issued 2348 codes are not invalidated by this request. 2349 2350 Args: 2351 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2352 2353 Returns: 2354 The newly created team invite containing the join code. 2355 """ 2356 return await self._http.request( 2357 f"/api/v1/teams/{team}/invite", 2358 method="POST", 2359 response_type=TeamInvite, 2360 ) 2361 2362 async def invites(self, team: str) -> TeamInvitesResponse: 2363 """ 2364 Create a team invite (server-to-server) 2365 Generates a new invite code for the specified team using server-to-server 2366 authentication. Unlike the user-facing create endpoint, this variant does not 2367 require the caller to be a team member it is intended for privileged 2368 back-end services acting on behalf of your platform. 2369 The returned code is a short alphanumeric string that users can present to 2370 join the team. Each call produces a new code; previously issued codes are 2371 not invalidated by this request. 2372 2373 Args: 2374 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2375 2376 Returns: 2377 Successful response 2378 """ 2379 return await self._http.request( 2380 f"/api/v1/teams/{team}/invites", 2381 method="POST", 2382 response_type=TeamInvitesResponse, 2383 ) 2384 2385 async def join(self, team: str, input: TeamJoinInput) -> None: 2386 """ 2387 Join a team 2388 Adds a principal to a team that is visible to the authenticated user. 2389 By default, the currently authenticated user joins the team. Provide `agent` 2390 to add an agent to the team instead the caller must already be a member of 2391 the team to do so. Provide `user` (by ID) or `email` to add another user from 2392 your organization the caller must be a team owner, team admin, or org admin. 2393 Only one of `agent`, `user`, or `email` may be supplied per request. 2394 If the target principal is already a member of the team, the request succeeds 2395 without creating a duplicate membership. Server-to-server callers are not 2396 permitted to use this endpoint; use the invite-code endpoint instead. 2397 2398 Args: 2399 team: Team ID (`team_...`) to join. 2400 input: Request body. 2401 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 2402 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. 2403 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. 2404 2405 Returns: 2406 Empty response the principal is now a member of the team. 2407 """ 2408 await self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 2409 2410 async def leave(self, team: str) -> None: 2411 """ 2412 Leave a team 2413 Removes a principal from a team. By default, the authenticated user removes 2414 themselves from the team. Provide `agent` to remove an agent instead the 2415 caller must be a member of the team to do so. 2416 Team owners cannot leave their own team. To transfer ownership first, use 2417 the update-membership endpoint, then call this endpoint. 2418 For server-to-server requests, `user` is required to identify which user 2419 should be removed. 2420 2421 Args: 2422 team: Team ID (`team_...`) to leave. 2423 2424 Returns: 2425 Empty response the principal has been removed from the team. 2426 """ 2427 await self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
2149 async def list( 2150 self, 2151 *, 2152 page: int | None = None, 2153 page_size: int | None = None, 2154 search: str | None = None, 2155 metadata: dict[str, Any] | None = None, 2156 membership: str | None = None, 2157 ) -> TeamListResponse: 2158 """ 2159 List teams 2160 Returns a paginated list of teams visible to the authenticated user, ordered 2161 by creation time descending. Use `membership` to narrow results to teams the 2162 caller has joined or teams they are eligible to join based on their ACL 2163 visibility. 2164 Supports full-text search across team name and description via `search`, and 2165 structured metadata filtering via `metadata`. When `app` is present, results 2166 are scoped to that app and the caller must hold the corresponding app scope. 2167 2168 Args: 2169 page: Page number to retrieve, starting at 1. Defaults to 1. 2170 page_size: Number of teams to return per page. Defaults to 25. 2171 search: Full-text search string matched against team name and description. 2172 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 2173 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. 2174 2175 Returns: 2176 Successful response 2177 """ 2178 query: dict[str, object] = {} 2179 if page is not None: 2180 query["page"] = page 2181 if page_size is not None: 2182 query["page_size"] = page_size 2183 if search is not None: 2184 query["search"] = search 2185 if metadata is not None: 2186 query["metadata"] = metadata 2187 if membership is not None: 2188 query["membership"] = membership 2189 return await self._http.request( 2190 "/api/v1/teams", 2191 query=query, 2192 response_type=TeamListResponse, 2193 )
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
2195 async def create(self, input: TeamCreateInput) -> Team: 2196 """ 2197 Create a team 2198 Creates a new team and returns the created team object. The authenticated 2199 user becomes the team's owner. 2200 When `app` is supplied, the request is scoped to that app and the caller 2201 must hold the corresponding app scope. Omit `org` unless you want the team 2202 pinned to a specific organization. A default chat thread is provisioned for 2203 the team automatically after creation. 2204 2205 Args: 2206 input: Request body. 2207 input.acl: Access control configuration for the team. Controls who can discover and join the team. 2208 input.description: Optional human-readable description of the team's purpose. 2209 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 2210 input.name: Display name for the team. 2211 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 2212 2213 Returns: 2214 The newly created team. 2215 """ 2216 return await self._http.request( 2217 "/api/v1/teams", 2218 method="POST", 2219 body=input, 2220 response_type=Team, 2221 )
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.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.
2223 async def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 2224 """ 2225 Join a team with an invite code 2226 Adds a principal to a team using a 12-character invite code. The invite 2227 code can be supplied as either `join_code` or `invite_code`; both are 2228 accepted for backwards compatibility. 2229 For user-authenticated requests, the currently authenticated user is added 2230 to the team. For server-to-server requests, you must supply either `agent` 2231 (to add an agent) or `user` (to add a specific user by ID). If the user 2232 is already a member of the team, the request succeeds without creating a 2233 duplicate membership. 2234 This endpoint is rate-limited to 10 requests per minute per IP address to 2235 prevent invite-code enumeration. 2236 2237 Args: 2238 input: Request body. 2239 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. 2240 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 2241 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 2242 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 2243 2244 Returns: 2245 The team the principal has joined. 2246 """ 2247 return await self._http.request( 2248 "/api/v1/teams/join_by_code", 2249 method="POST", 2250 body=input, 2251 response_type=Team, 2252 )
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.
2254 async def delete(self, team: str) -> None: 2255 """ 2256 Delete a team 2257 Permanently deletes the team identified by `team`. This action is 2258 irreversible all team memberships, settings, and associated data are 2259 removed. 2260 The caller must be the team owner or an org admin. When `app` is present, 2261 the caller must also hold the corresponding app scope. 2262 2263 Args: 2264 team: Team ID (`team_...`) of the team to delete. 2265 2266 Returns: 2267 Empty response the team has been deleted. 2268 """ 2269 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.
2271 async def get(self, team: str) -> Team: 2272 """ 2273 Retrieve a team 2274 Returns the full team object for the given `team` ID, including its current 2275 member list and all associated threads. 2276 The authenticated user must be a member of the team or hold a role that 2277 grants visibility (org admin, app scope). When `app` is supplied, the 2278 caller must hold the corresponding app scope. 2279 2280 Args: 2281 team: Team ID (`team_...`) of the team to retrieve. 2282 2283 Returns: 2284 The requested team, including its members and threads. 2285 """ 2286 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.
2288 async def update(self, team: str, input: TeamUpdateInput) -> Team: 2289 """ 2290 Update a team 2291 Updates one or more attributes of the team identified by `team`. Only the 2292 fields you provide are changed; omitted fields are left as-is. 2293 To replace the team's profile picture, supply the `profile_picture` object 2294 with base64-encoded image data. The previous picture is deleted after the 2295 new one is successfully uploaded. When `app` is present, the caller must hold 2296 the corresponding app scope. The caller must be a team owner or org admin. 2297 2298 Args: 2299 team: Team ID (`team_...`) of the team to update. 2300 input: Request body. 2301 input.acl: New access control configuration for the team. Replaces the existing ACL. 2302 input.description: New human-readable description of the team's purpose. 2303 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 2304 input.name: New display name for the team. 2305 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 2306 2307 Returns: 2308 The updated team with all changes applied. 2309 """ 2310 return await self._http.request( 2311 f"/api/v1/teams/{team}", 2312 method="PATCH", 2313 body=input, 2314 response_type=Team, 2315 )
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.
2317 async def artifacts(self, team: str) -> TeamArtifactsResponse: 2318 """ 2319 List a team's artifacts 2320 Returns all artifacts owned by the specified team. Artifacts represent 2321 AI-generated or user-uploaded files associated with agent sessions, 2322 threads, or sandboxes such as images, documents, and code outputs. 2323 The authenticated user must be a member of the team. Attempting to list 2324 artifacts for a team the caller does not have access to returns 404 2325 rather than 403 to avoid leaking team existence. 2326 Results are returned in a single page without cursor pagination. Each 2327 artifact in the response reflects the state of its current version, 2328 including a short-lived signed `file_url` for direct download. 2329 2330 Args: 2331 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 2332 2333 Returns: 2334 Successful response 2335 """ 2336 return await self._http.request( 2337 f"/api/v1/teams/{team}/artifacts", 2338 response_type=TeamArtifactsResponse, 2339 )
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.
Returns:
Successful response
2341 async def invite(self, team: str) -> TeamInvite: 2342 """ 2343 Create a team invite 2344 Generates a new invite code for the specified team. The authenticated user 2345 must be a member of the team with the `owner` or `admin` role. 2346 The returned code is a short alphanumeric string that other users can 2347 present to join the team. Each call produces a new code; previously issued 2348 codes are not invalidated by this request. 2349 2350 Args: 2351 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2352 2353 Returns: 2354 The newly created team invite containing the join code. 2355 """ 2356 return await self._http.request( 2357 f"/api/v1/teams/{team}/invite", 2358 method="POST", 2359 response_type=TeamInvite, 2360 )
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.
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.
2362 async def invites(self, team: str) -> TeamInvitesResponse: 2363 """ 2364 Create a team invite (server-to-server) 2365 Generates a new invite code for the specified team using server-to-server 2366 authentication. Unlike the user-facing create endpoint, this variant does not 2367 require the caller to be a team member it is intended for privileged 2368 back-end services acting on behalf of your platform. 2369 The returned code is a short alphanumeric string that users can present to 2370 join the team. Each call produces a new code; previously issued codes are 2371 not invalidated by this request. 2372 2373 Args: 2374 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2375 2376 Returns: 2377 Successful response 2378 """ 2379 return await self._http.request( 2380 f"/api/v1/teams/{team}/invites", 2381 method="POST", 2382 response_type=TeamInvitesResponse, 2383 )
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
2385 async def join(self, team: str, input: TeamJoinInput) -> None: 2386 """ 2387 Join a team 2388 Adds a principal to a team that is visible to the authenticated user. 2389 By default, the currently authenticated user joins the team. Provide `agent` 2390 to add an agent to the team instead the caller must already be a member of 2391 the team to do so. Provide `user` (by ID) or `email` to add another user from 2392 your organization the caller must be a team owner, team admin, or org admin. 2393 Only one of `agent`, `user`, or `email` may be supplied per request. 2394 If the target principal is already a member of the team, the request succeeds 2395 without creating a duplicate membership. Server-to-server callers are not 2396 permitted to use this endpoint; use the invite-code endpoint instead. 2397 2398 Args: 2399 team: Team ID (`team_...`) to join. 2400 input: Request body. 2401 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 2402 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. 2403 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. 2404 2405 Returns: 2406 Empty response the principal is now a member of the team. 2407 """ 2408 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.
2410 async def leave(self, team: str) -> None: 2411 """ 2412 Leave a team 2413 Removes a principal from a team. By default, the authenticated user removes 2414 themselves from the team. Provide `agent` to remove an agent instead the 2415 caller must be a member of the team to do so. 2416 Team owners cannot leave their own team. To transfer ownership first, use 2417 the update-membership endpoint, then call this endpoint. 2418 For server-to-server requests, `user` is required to identify which user 2419 should be removed. 2420 2421 Args: 2422 team: Team ID (`team_...`) to leave. 2423 2424 Returns: 2425 Empty response the principal has been removed from the team. 2426 """ 2427 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.
2430class TeamCustomObjectResource: 2431 def __init__(self, http: SyncHttpClient): 2432 self._http = http 2433 2434 def list( 2435 self, 2436 team: str, 2437 type: str, 2438 *, 2439 limit: int | None = None, 2440 offset: int | None = None, 2441 row_key: str | None = None, 2442 sort_key: str | None = None, 2443 query: str | None = None, 2444 ) -> TeamCustomObjectListResponse: 2445 """ 2446 List a team's custom objects 2447 Returns a paginated list of custom objects owned by the specified team, 2448 filtered to a single schema type. Results are ordered by creation time 2449 descending unless `query` is provided, in which case they are ordered by 2450 full-text relevance score descending. 2451 Use `limit` and `offset` for page-based pagination. Use `row_key` or 2452 `sort_key` to narrow results to objects matching those index values. 2453 Full-text search via `query` operates only against the fields configured 2454 as `search_fields` on the schema. 2455 The authenticated user must be a member of the team with sufficient 2456 access. Returns 404 if the team is not found, the caller lacks access, 2457 or `type` does not match a registered schema for the team's organization. 2458 2459 Args: 2460 team: Team ID (`team_...`). Scopes results to objects owned by this team. 2461 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 2462 limit: Maximum number of objects to return per page. 2463 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 2464 row_key: Filter results to objects whose `row_key` exactly matches this value. 2465 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 2466 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. 2467 2468 Returns: 2469 Successful response 2470 """ 2471 query: dict[str, object] = {} 2472 query["type"] = type 2473 if limit is not None: 2474 query["limit"] = limit 2475 if offset is not None: 2476 query["offset"] = offset 2477 if row_key is not None: 2478 query["row_key"] = row_key 2479 if sort_key is not None: 2480 query["sort_key"] = sort_key 2481 if query is not None: 2482 query["query"] = query 2483 return self._http.request( 2484 f"/api/v1/teams/{team}/custom_objects", 2485 query=query, 2486 response_type=TeamCustomObjectListResponse, 2487 ) 2488 2489 def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 2490 """ 2491 Create a team custom object 2492 Creates a new custom object owned by the specified team. The object is 2493 instantiated against the schema identified by `type` (the schema's 2494 `lookup_key`). All field values are validated against that schema's 2495 field definitions before the object is persisted. 2496 The authenticated user must be a member of the team with sufficient 2497 access. If the team is not found or the caller lacks access, the endpoint 2498 returns 404. If `type` does not match a registered schema for the team's 2499 organization, the endpoint also returns 404. 2500 2501 Args: 2502 team: Team ID (`team_...`). Scopes results to objects owned by this team. 2503 input: Request body. 2504 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 2505 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 2506 2507 Returns: 2508 The newly created custom object. 2509 """ 2510 return self._http.request( 2511 f"/api/v1/teams/{team}/custom_objects", 2512 method="POST", 2513 body=input, 2514 response_type=CustomObject, 2515 )
2434 def list( 2435 self, 2436 team: str, 2437 type: str, 2438 *, 2439 limit: int | None = None, 2440 offset: int | None = None, 2441 row_key: str | None = None, 2442 sort_key: str | None = None, 2443 query: str | None = None, 2444 ) -> TeamCustomObjectListResponse: 2445 """ 2446 List a team's custom objects 2447 Returns a paginated list of custom objects owned by the specified team, 2448 filtered to a single schema type. Results are ordered by creation time 2449 descending unless `query` is provided, in which case they are ordered by 2450 full-text relevance score descending. 2451 Use `limit` and `offset` for page-based pagination. Use `row_key` or 2452 `sort_key` to narrow results to objects matching those index values. 2453 Full-text search via `query` operates only against the fields configured 2454 as `search_fields` on the schema. 2455 The authenticated user must be a member of the team with sufficient 2456 access. Returns 404 if the team is not found, the caller lacks access, 2457 or `type` does not match a registered schema for the team's organization. 2458 2459 Args: 2460 team: Team ID (`team_...`). Scopes results to objects owned by this team. 2461 type: Schema type identifier (`lookup_key`) that filters results to objects of this schema. 2462 limit: Maximum number of objects to return per page. 2463 offset: Number of objects to skip before returning results. Use with `limit` for page-based pagination. 2464 row_key: Filter results to objects whose `row_key` exactly matches this value. 2465 sort_key: Filter results to objects whose `sort_key` exactly matches this value. 2466 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. 2467 2468 Returns: 2469 Successful response 2470 """ 2471 query: dict[str, object] = {} 2472 query["type"] = type 2473 if limit is not None: 2474 query["limit"] = limit 2475 if offset is not None: 2476 query["offset"] = offset 2477 if row_key is not None: 2478 query["row_key"] = row_key 2479 if sort_key is not None: 2480 query["sort_key"] = sort_key 2481 if query is not None: 2482 query["query"] = query 2483 return self._http.request( 2484 f"/api/v1/teams/{team}/custom_objects", 2485 query=query, 2486 response_type=TeamCustomObjectListResponse, 2487 )
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
2489 def create(self, team: str, input: TeamCustomObjectCreateInput) -> CustomObject: 2490 """ 2491 Create a team custom object 2492 Creates a new custom object owned by the specified team. The object is 2493 instantiated against the schema identified by `type` (the schema's 2494 `lookup_key`). All field values are validated against that schema's 2495 field definitions before the object is persisted. 2496 The authenticated user must be a member of the team with sufficient 2497 access. If the team is not found or the caller lacks access, the endpoint 2498 returns 404. If `type` does not match a registered schema for the team's 2499 organization, the endpoint also returns 404. 2500 2501 Args: 2502 team: Team ID (`team_...`). Scopes results to objects owned by this team. 2503 input: Request body. 2504 input.fields: Map of field values to set on the new object. Keys and value types must conform to the schema identified by `type`. 2505 input.type: Schema type identifier (`lookup_key`) that defines the object's fields and validation rules. 2506 2507 Returns: 2508 The newly created custom object. 2509 """ 2510 return self._http.request( 2511 f"/api/v1/teams/{team}/custom_objects", 2512 method="POST", 2513 body=input, 2514 response_type=CustomObject, 2515 )
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.
2518class MemberResource: 2519 def __init__(self, http: SyncHttpClient): 2520 self._http = http 2521 2522 def remove(self, team: str) -> None: 2523 """ 2524 Remove a member or org from a team 2525 Removes a user, agent, or all members of an organization from the specified 2526 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 2527 one or none returns a 400 error. On success, returns 204 No Content. 2528 When `org` is provided, every user and agent membership belonging to that org 2529 is removed in a single call. The caller must be a member of the team's owning 2530 org to perform an org-scoped removal. You cannot target the team's owning org 2531 itself with this parameter. 2532 The caller must have permission to manage the team. When `app` is present, the 2533 request is scoped to that app and requires a valid app-scoped token. 2534 2535 Args: 2536 team: Team ID (`team_...`). The team to remove the member from. 2537 2538 Returns: 2539 Empty response. Returns 204 No Content on success. 2540 """ 2541 self._http.request(f"/api/v1/teams/{team}/members", method="DELETE") 2542 2543 def list(self, team: str) -> MemberListResponse: 2544 """ 2545 List members of a team 2546 Returns all members of the specified team, including both users and agents. 2547 Members are returned in a single non-paginated array ordered by join time. 2548 Bearer-authenticated users must be a member of the team to retrieve its 2549 member list. Developer and server-to-server callers can retrieve members for 2550 any team visible to their app scope. When `app` is provided, the request is 2551 scoped to that app and requires a valid app-scoped token. 2552 2553 Args: 2554 team: Team ID (`team_...`). The team to remove the member from. 2555 2556 Returns: 2557 Successful response 2558 """ 2559 return self._http.request(f"/api/v1/teams/{team}/members", response_type=MemberListResponse) 2560 2561 def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 2562 """ 2563 Add a member to a team 2564 Adds a user or agent as a member of the specified team and returns the new 2565 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 2566 both or neither returns a 400 error. 2567 The caller must have permission to manage the team. When an `app` is provided, 2568 the request is scoped to that app and the caller must hold a valid app-scoped 2569 token. The default role is `"member"` when `role` is omitted. 2570 2571 Args: 2572 team: Team ID (`team_...`). The team to remove the member from. 2573 input: Request body. 2574 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 2575 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 2576 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 2577 2578 Returns: 2579 The newly created team membership. 2580 """ 2581 return self._http.request( 2582 f"/api/v1/teams/{team}/members", 2583 method="POST", 2584 body=input, 2585 response_type=TeamMembership, 2586 ) 2587 2588 def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 2589 """ 2590 Update a team member's role 2591 Changes the role of an existing user member on the specified team. Returns the 2592 updated membership on success. 2593 Only user memberships are supported by this endpoint. Attempting to update an 2594 agent membership returns 404. To change an agent's role, remove the existing 2595 membership and re-add the agent with the desired role. 2596 The caller must have permission to modify the team. You cannot change a member's 2597 role across organization boundaries. Demoting the last owner of a team returns 2598 409. An invalid `role` value returns 422. When `app` is provided, the request 2599 is scoped to that app and requires a valid app-scoped token. 2600 2601 Args: 2602 team: Team ID (`team_...`). The team to remove the member from. 2603 user: User ID (`usr_...`) of the existing member whose role should be changed. 2604 input: Request body. 2605 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 2606 2607 Returns: 2608 The updated team membership reflecting the new role. 2609 """ 2610 return self._http.request( 2611 f"/api/v1/teams/{team}/members/{user}", 2612 method="PATCH", 2613 body=input, 2614 response_type=TeamMembership, 2615 )
2522 def remove(self, team: str) -> None: 2523 """ 2524 Remove a member or org from a team 2525 Removes a user, agent, or all members of an organization from the specified 2526 team. Provide exactly one of `user`, `agent`, or `org` supplying more than 2527 one or none returns a 400 error. On success, returns 204 No Content. 2528 When `org` is provided, every user and agent membership belonging to that org 2529 is removed in a single call. The caller must be a member of the team's owning 2530 org to perform an org-scoped removal. You cannot target the team's owning org 2531 itself with this parameter. 2532 The caller must have permission to manage the team. When `app` is present, the 2533 request is scoped to that app and requires a valid app-scoped token. 2534 2535 Args: 2536 team: Team ID (`team_...`). The team to remove the member from. 2537 2538 Returns: 2539 Empty response. Returns 204 No Content on success. 2540 """ 2541 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.
2543 def list(self, team: str) -> MemberListResponse: 2544 """ 2545 List members of a team 2546 Returns all members of the specified team, including both users and agents. 2547 Members are returned in a single non-paginated array ordered by join time. 2548 Bearer-authenticated users must be a member of the team to retrieve its 2549 member list. Developer and server-to-server callers can retrieve members for 2550 any team visible to their app scope. When `app` is provided, the request is 2551 scoped to that app and requires a valid app-scoped token. 2552 2553 Args: 2554 team: Team ID (`team_...`). The team to remove the member from. 2555 2556 Returns: 2557 Successful response 2558 """ 2559 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
2561 def create(self, team: str, input: MemberCreateInput) -> TeamMembership: 2562 """ 2563 Add a member to a team 2564 Adds a user or agent as a member of the specified team and returns the new 2565 membership with HTTP 201. Provide exactly one of `user` or `agent` supplying 2566 both or neither returns a 400 error. 2567 The caller must have permission to manage the team. When an `app` is provided, 2568 the request is scoped to that app and the caller must hold a valid app-scoped 2569 token. The default role is `"member"` when `role` is omitted. 2570 2571 Args: 2572 team: Team ID (`team_...`). The team to remove the member from. 2573 input: Request body. 2574 input.agent: Agent ID (`agt_...`) to add as a member. Provide exactly one of `user` or `agent`. 2575 input.role: Role to assign. One of `"owner"`, `"admin"`, or `"member"`. Defaults to `"member"` when omitted. 2576 input.user: User ID (`usr_...`) to add as a member. Provide exactly one of `user` or `agent`. 2577 2578 Returns: 2579 The newly created team membership. 2580 """ 2581 return self._http.request( 2582 f"/api/v1/teams/{team}/members", 2583 method="POST", 2584 body=input, 2585 response_type=TeamMembership, 2586 )
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.
The caller must have permission to manage the team. 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.
2588 def update(self, team: str, user: str, input: MemberUpdateInput) -> TeamMembership: 2589 """ 2590 Update a team member's role 2591 Changes the role of an existing user member on the specified team. Returns the 2592 updated membership on success. 2593 Only user memberships are supported by this endpoint. Attempting to update an 2594 agent membership returns 404. To change an agent's role, remove the existing 2595 membership and re-add the agent with the desired role. 2596 The caller must have permission to modify the team. You cannot change a member's 2597 role across organization boundaries. Demoting the last owner of a team returns 2598 409. An invalid `role` value returns 422. When `app` is provided, the request 2599 is scoped to that app and requires a valid app-scoped token. 2600 2601 Args: 2602 team: Team ID (`team_...`). The team to remove the member from. 2603 user: User ID (`usr_...`) of the existing member whose role should be changed. 2604 input: Request body. 2605 input.role: New role to assign. One of `"owner"`, `"admin"`, or `"member"`. 2606 2607 Returns: 2608 The updated team membership reflecting the new role. 2609 """ 2610 return self._http.request( 2611 f"/api/v1/teams/{team}/members/{user}", 2612 method="PATCH", 2613 body=input, 2614 response_type=TeamMembership, 2615 )
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.
2618class TeamThreadResource: 2619 def __init__(self, http: SyncHttpClient): 2620 self._http = http 2621 2622 def list(self, team: str) -> TeamThreadListResponse: 2623 """ 2624 List threads for a team 2625 Returns all threads owned by the specified team that the authenticated caller 2626 has permission to view. The caller must have access to the team; requests 2627 without team access are rejected with 404. 2628 Threads are returned in a single `data` array. Use the team-scoped thread 2629 endpoints to create, update, or delete individual threads. 2630 2631 Args: 2632 team: Team ID (`tem_...`) whose threads should be listed. 2633 2634 Returns: 2635 Successful response 2636 """ 2637 return self._http.request( 2638 f"/api/v1/teams/{team}/threads", 2639 response_type=TeamThreadListResponse, 2640 ) 2641 2642 def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 2643 """ 2644 Create a thread for a team 2645 Creates a new thread owned by the specified team. The authenticated caller must 2646 have access to the team; requests from callers without team access are rejected 2647 with 404. 2648 If a `profile_picture` is provided in the thread params, it must be 2649 base64-encoded image data. The image is uploaded and associated with the thread 2650 before creation completes. Omit `profile_picture` to skip this step. 2651 By default the platform sends an automatic welcome message into the new thread. 2652 Pass `skip_welcome_message: true` to suppress this behavior, for example when 2653 creating threads programmatically in bulk or seeding test data. 2654 2655 Args: 2656 team: Team ID (`tem_...`) whose threads should be listed. 2657 input: Request body. 2658 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 2659 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 2660 2661 Returns: 2662 The newly created thread. 2663 """ 2664 return self._http.request( 2665 f"/api/v1/teams/{team}/threads", 2666 method="POST", 2667 body=input, 2668 response_type=Thread, 2669 )
2622 def list(self, team: str) -> TeamThreadListResponse: 2623 """ 2624 List threads for a team 2625 Returns all threads owned by the specified team that the authenticated caller 2626 has permission to view. The caller must have access to the team; requests 2627 without team access are rejected with 404. 2628 Threads are returned in a single `data` array. Use the team-scoped thread 2629 endpoints to create, update, or delete individual threads. 2630 2631 Args: 2632 team: Team ID (`tem_...`) whose threads should be listed. 2633 2634 Returns: 2635 Successful response 2636 """ 2637 return self._http.request( 2638 f"/api/v1/teams/{team}/threads", 2639 response_type=TeamThreadListResponse, 2640 )
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. Use the team-scoped thread
endpoints to create, update, or delete individual threads.
Arguments:
- team: Team ID (
tem_...) whose threads should be listed.
Returns:
Successful response
2642 def create(self, team: str, input: TeamThreadCreateInput) -> Thread: 2643 """ 2644 Create a thread for a team 2645 Creates a new thread owned by the specified team. The authenticated caller must 2646 have access to the team; requests from callers without team access are rejected 2647 with 404. 2648 If a `profile_picture` is provided in the thread params, it must be 2649 base64-encoded image data. The image is uploaded and associated with the thread 2650 before creation completes. Omit `profile_picture` to skip this step. 2651 By default the platform sends an automatic welcome message into the new thread. 2652 Pass `skip_welcome_message: true` to suppress this behavior, for example when 2653 creating threads programmatically in bulk or seeding test data. 2654 2655 Args: 2656 team: Team ID (`tem_...`) whose threads should be listed. 2657 input: Request body. 2658 input.skip_welcome_message: When `true`, suppresses the automatic welcome message that is otherwise sent into the thread on creation. Defaults to `false`. 2659 input.thread: Attributes for the new thread. See ThreadCreateParams for available fields. 2660 2661 Returns: 2662 The newly created thread. 2663 """ 2664 return self._http.request( 2665 f"/api/v1/teams/{team}/threads", 2666 method="POST", 2667 body=input, 2668 response_type=Thread, 2669 )
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.
2672class TeamResource: 2673 def __init__(self, http: SyncHttpClient): 2674 self._http = http 2675 self.custom_objects = TeamCustomObjectResource(http) 2676 self.members = MemberResource(http) 2677 self.threads = TeamThreadResource(http) 2678 2679 def list( 2680 self, 2681 *, 2682 page: int | None = None, 2683 page_size: int | None = None, 2684 search: str | None = None, 2685 metadata: dict[str, Any] | None = None, 2686 membership: str | None = None, 2687 ) -> TeamListResponse: 2688 """ 2689 List teams 2690 Returns a paginated list of teams visible to the authenticated user, ordered 2691 by creation time descending. Use `membership` to narrow results to teams the 2692 caller has joined or teams they are eligible to join based on their ACL 2693 visibility. 2694 Supports full-text search across team name and description via `search`, and 2695 structured metadata filtering via `metadata`. When `app` is present, results 2696 are scoped to that app and the caller must hold the corresponding app scope. 2697 2698 Args: 2699 page: Page number to retrieve, starting at 1. Defaults to 1. 2700 page_size: Number of teams to return per page. Defaults to 25. 2701 search: Full-text search string matched against team name and description. 2702 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 2703 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. 2704 2705 Returns: 2706 Successful response 2707 """ 2708 query: dict[str, object] = {} 2709 if page is not None: 2710 query["page"] = page 2711 if page_size is not None: 2712 query["page_size"] = page_size 2713 if search is not None: 2714 query["search"] = search 2715 if metadata is not None: 2716 query["metadata"] = metadata 2717 if membership is not None: 2718 query["membership"] = membership 2719 return self._http.request("/api/v1/teams", query=query, response_type=TeamListResponse) 2720 2721 def create(self, input: TeamCreateInput) -> Team: 2722 """ 2723 Create a team 2724 Creates a new team and returns the created team object. The authenticated 2725 user becomes the team's owner. 2726 When `app` is supplied, the request is scoped to that app and the caller 2727 must hold the corresponding app scope. Omit `org` unless you want the team 2728 pinned to a specific organization. A default chat thread is provisioned for 2729 the team automatically after creation. 2730 2731 Args: 2732 input: Request body. 2733 input.acl: Access control configuration for the team. Controls who can discover and join the team. 2734 input.description: Optional human-readable description of the team's purpose. 2735 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 2736 input.name: Display name for the team. 2737 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 2738 2739 Returns: 2740 The newly created team. 2741 """ 2742 return self._http.request("/api/v1/teams", method="POST", body=input, response_type=Team) 2743 2744 def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 2745 """ 2746 Join a team with an invite code 2747 Adds a principal to a team using a 12-character invite code. The invite 2748 code can be supplied as either `join_code` or `invite_code`; both are 2749 accepted for backwards compatibility. 2750 For user-authenticated requests, the currently authenticated user is added 2751 to the team. For server-to-server requests, you must supply either `agent` 2752 (to add an agent) or `user` (to add a specific user by ID). If the user 2753 is already a member of the team, the request succeeds without creating a 2754 duplicate membership. 2755 This endpoint is rate-limited to 10 requests per minute per IP address to 2756 prevent invite-code enumeration. 2757 2758 Args: 2759 input: Request body. 2760 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. 2761 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 2762 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 2763 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 2764 2765 Returns: 2766 The team the principal has joined. 2767 """ 2768 return self._http.request( 2769 "/api/v1/teams/join_by_code", 2770 method="POST", 2771 body=input, 2772 response_type=Team, 2773 ) 2774 2775 def delete(self, team: str) -> None: 2776 """ 2777 Delete a team 2778 Permanently deletes the team identified by `team`. This action is 2779 irreversible all team memberships, settings, and associated data are 2780 removed. 2781 The caller must be the team owner or an org admin. When `app` is present, 2782 the caller must also hold the corresponding app scope. 2783 2784 Args: 2785 team: Team ID (`team_...`) of the team to delete. 2786 2787 Returns: 2788 Empty response the team has been deleted. 2789 """ 2790 self._http.request(f"/api/v1/teams/{team}", method="DELETE") 2791 2792 def get(self, team: str) -> Team: 2793 """ 2794 Retrieve a team 2795 Returns the full team object for the given `team` ID, including its current 2796 member list and all associated threads. 2797 The authenticated user must be a member of the team or hold a role that 2798 grants visibility (org admin, app scope). When `app` is supplied, the 2799 caller must hold the corresponding app scope. 2800 2801 Args: 2802 team: Team ID (`team_...`) of the team to retrieve. 2803 2804 Returns: 2805 The requested team, including its members and threads. 2806 """ 2807 return self._http.request(f"/api/v1/teams/{team}", response_type=Team) 2808 2809 def update(self, team: str, input: TeamUpdateInput) -> Team: 2810 """ 2811 Update a team 2812 Updates one or more attributes of the team identified by `team`. Only the 2813 fields you provide are changed; omitted fields are left as-is. 2814 To replace the team's profile picture, supply the `profile_picture` object 2815 with base64-encoded image data. The previous picture is deleted after the 2816 new one is successfully uploaded. When `app` is present, the caller must hold 2817 the corresponding app scope. The caller must be a team owner or org admin. 2818 2819 Args: 2820 team: Team ID (`team_...`) of the team to update. 2821 input: Request body. 2822 input.acl: New access control configuration for the team. Replaces the existing ACL. 2823 input.description: New human-readable description of the team's purpose. 2824 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 2825 input.name: New display name for the team. 2826 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 2827 2828 Returns: 2829 The updated team with all changes applied. 2830 """ 2831 return self._http.request( 2832 f"/api/v1/teams/{team}", 2833 method="PATCH", 2834 body=input, 2835 response_type=Team, 2836 ) 2837 2838 def artifacts(self, team: str) -> TeamArtifactsResponse: 2839 """ 2840 List a team's artifacts 2841 Returns all artifacts owned by the specified team. Artifacts represent 2842 AI-generated or user-uploaded files associated with agent sessions, 2843 threads, or sandboxes such as images, documents, and code outputs. 2844 The authenticated user must be a member of the team. Attempting to list 2845 artifacts for a team the caller does not have access to returns 404 2846 rather than 403 to avoid leaking team existence. 2847 Results are returned in a single page without cursor pagination. Each 2848 artifact in the response reflects the state of its current version, 2849 including a short-lived signed `file_url` for direct download. 2850 2851 Args: 2852 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 2853 2854 Returns: 2855 Successful response 2856 """ 2857 return self._http.request( 2858 f"/api/v1/teams/{team}/artifacts", 2859 response_type=TeamArtifactsResponse, 2860 ) 2861 2862 def invite(self, team: str) -> TeamInvite: 2863 """ 2864 Create a team invite 2865 Generates a new invite code for the specified team. The authenticated user 2866 must be a member of the team with the `owner` or `admin` role. 2867 The returned code is a short alphanumeric string that other users can 2868 present to join the team. Each call produces a new code; previously issued 2869 codes are not invalidated by this request. 2870 2871 Args: 2872 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2873 2874 Returns: 2875 The newly created team invite containing the join code. 2876 """ 2877 return self._http.request( 2878 f"/api/v1/teams/{team}/invite", 2879 method="POST", 2880 response_type=TeamInvite, 2881 ) 2882 2883 def invites(self, team: str) -> TeamInvitesResponse: 2884 """ 2885 Create a team invite (server-to-server) 2886 Generates a new invite code for the specified team using server-to-server 2887 authentication. Unlike the user-facing create endpoint, this variant does not 2888 require the caller to be a team member it is intended for privileged 2889 back-end services acting on behalf of your platform. 2890 The returned code is a short alphanumeric string that users can present to 2891 join the team. Each call produces a new code; previously issued codes are 2892 not invalidated by this request. 2893 2894 Args: 2895 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2896 2897 Returns: 2898 Successful response 2899 """ 2900 return self._http.request( 2901 f"/api/v1/teams/{team}/invites", 2902 method="POST", 2903 response_type=TeamInvitesResponse, 2904 ) 2905 2906 def join(self, team: str, input: TeamJoinInput) -> None: 2907 """ 2908 Join a team 2909 Adds a principal to a team that is visible to the authenticated user. 2910 By default, the currently authenticated user joins the team. Provide `agent` 2911 to add an agent to the team instead the caller must already be a member of 2912 the team to do so. Provide `user` (by ID) or `email` to add another user from 2913 your organization the caller must be a team owner, team admin, or org admin. 2914 Only one of `agent`, `user`, or `email` may be supplied per request. 2915 If the target principal is already a member of the team, the request succeeds 2916 without creating a duplicate membership. Server-to-server callers are not 2917 permitted to use this endpoint; use the invite-code endpoint instead. 2918 2919 Args: 2920 team: Team ID (`team_...`) to join. 2921 input: Request body. 2922 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 2923 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. 2924 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. 2925 2926 Returns: 2927 Empty response the principal is now a member of the team. 2928 """ 2929 self._http.request(f"/api/v1/teams/{team}/join", method="POST", body=input) 2930 2931 def leave(self, team: str) -> None: 2932 """ 2933 Leave a team 2934 Removes a principal from a team. By default, the authenticated user removes 2935 themselves from the team. Provide `agent` to remove an agent instead the 2936 caller must be a member of the team to do so. 2937 Team owners cannot leave their own team. To transfer ownership first, use 2938 the update-membership endpoint, then call this endpoint. 2939 For server-to-server requests, `user` is required to identify which user 2940 should be removed. 2941 2942 Args: 2943 team: Team ID (`team_...`) to leave. 2944 2945 Returns: 2946 Empty response the principal has been removed from the team. 2947 """ 2948 self._http.request(f"/api/v1/teams/{team}/leave", method="DELETE")
2679 def list( 2680 self, 2681 *, 2682 page: int | None = None, 2683 page_size: int | None = None, 2684 search: str | None = None, 2685 metadata: dict[str, Any] | None = None, 2686 membership: str | None = None, 2687 ) -> TeamListResponse: 2688 """ 2689 List teams 2690 Returns a paginated list of teams visible to the authenticated user, ordered 2691 by creation time descending. Use `membership` to narrow results to teams the 2692 caller has joined or teams they are eligible to join based on their ACL 2693 visibility. 2694 Supports full-text search across team name and description via `search`, and 2695 structured metadata filtering via `metadata`. When `app` is present, results 2696 are scoped to that app and the caller must hold the corresponding app scope. 2697 2698 Args: 2699 page: Page number to retrieve, starting at 1. Defaults to 1. 2700 page_size: Number of teams to return per page. Defaults to 25. 2701 search: Full-text search string matched against team name and description. 2702 metadata: Structured metadata filter expression. Only teams whose metadata satisfies the expression are returned. 2703 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. 2704 2705 Returns: 2706 Successful response 2707 """ 2708 query: dict[str, object] = {} 2709 if page is not None: 2710 query["page"] = page 2711 if page_size is not None: 2712 query["page_size"] = page_size 2713 if search is not None: 2714 query["search"] = search 2715 if metadata is not None: 2716 query["metadata"] = metadata 2717 if membership is not None: 2718 query["membership"] = membership 2719 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
2721 def create(self, input: TeamCreateInput) -> Team: 2722 """ 2723 Create a team 2724 Creates a new team and returns the created team object. The authenticated 2725 user becomes the team's owner. 2726 When `app` is supplied, the request is scoped to that app and the caller 2727 must hold the corresponding app scope. Omit `org` unless you want the team 2728 pinned to a specific organization. A default chat thread is provisioned for 2729 the team automatically after creation. 2730 2731 Args: 2732 input: Request body. 2733 input.acl: Access control configuration for the team. Controls who can discover and join the team. 2734 input.description: Optional human-readable description of the team's purpose. 2735 input.metadata: Arbitrary key-value pairs you can attach to the team for your own use. Values must be strings. 2736 input.name: Display name for the team. 2737 input.org: Organization ID (`org_...`) to associate the team with. Omit to create the team without an org affiliation. 2738 2739 Returns: 2740 The newly created team. 2741 """ 2742 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.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.
2744 def join_by_code(self, input: TeamJoinByCodeInput) -> Team: 2745 """ 2746 Join a team with an invite code 2747 Adds a principal to a team using a 12-character invite code. The invite 2748 code can be supplied as either `join_code` or `invite_code`; both are 2749 accepted for backwards compatibility. 2750 For user-authenticated requests, the currently authenticated user is added 2751 to the team. For server-to-server requests, you must supply either `agent` 2752 (to add an agent) or `user` (to add a specific user by ID). If the user 2753 is already a member of the team, the request succeeds without creating a 2754 duplicate membership. 2755 This endpoint is rate-limited to 10 requests per minute per IP address to 2756 prevent invite-code enumeration. 2757 2758 Args: 2759 input: Request body. 2760 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. 2761 input.invite_code: 12-character invite code alias for `join_code` accepted for backwards compatibility. 2762 input.join_code: 12-character invite code that identifies the team. Mutually usable with `invite_code`. 2763 input.user: User ID (`user_...`) to add to the team. Required for server-to-server requests when `agent` is not supplied. 2764 2765 Returns: 2766 The team the principal has joined. 2767 """ 2768 return self._http.request( 2769 "/api/v1/teams/join_by_code", 2770 method="POST", 2771 body=input, 2772 response_type=Team, 2773 )
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.
2775 def delete(self, team: str) -> None: 2776 """ 2777 Delete a team 2778 Permanently deletes the team identified by `team`. This action is 2779 irreversible all team memberships, settings, and associated data are 2780 removed. 2781 The caller must be the team owner or an org admin. When `app` is present, 2782 the caller must also hold the corresponding app scope. 2783 2784 Args: 2785 team: Team ID (`team_...`) of the team to delete. 2786 2787 Returns: 2788 Empty response the team has been deleted. 2789 """ 2790 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.
2792 def get(self, team: str) -> Team: 2793 """ 2794 Retrieve a team 2795 Returns the full team object for the given `team` ID, including its current 2796 member list and all associated threads. 2797 The authenticated user must be a member of the team or hold a role that 2798 grants visibility (org admin, app scope). When `app` is supplied, the 2799 caller must hold the corresponding app scope. 2800 2801 Args: 2802 team: Team ID (`team_...`) of the team to retrieve. 2803 2804 Returns: 2805 The requested team, including its members and threads. 2806 """ 2807 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.
2809 def update(self, team: str, input: TeamUpdateInput) -> Team: 2810 """ 2811 Update a team 2812 Updates one or more attributes of the team identified by `team`. Only the 2813 fields you provide are changed; omitted fields are left as-is. 2814 To replace the team's profile picture, supply the `profile_picture` object 2815 with base64-encoded image data. The previous picture is deleted after the 2816 new one is successfully uploaded. When `app` is present, the caller must hold 2817 the corresponding app scope. The caller must be a team owner or org admin. 2818 2819 Args: 2820 team: Team ID (`team_...`) of the team to update. 2821 input: Request body. 2822 input.acl: New access control configuration for the team. Replaces the existing ACL. 2823 input.description: New human-readable description of the team's purpose. 2824 input.metadata: Arbitrary key-value pairs to set on the team. Replaces the existing metadata map entirely. 2825 input.name: New display name for the team. 2826 input.profile_picture: New profile picture for the team. Provide this object to upload and replace the current picture. 2827 2828 Returns: 2829 The updated team with all changes applied. 2830 """ 2831 return self._http.request( 2832 f"/api/v1/teams/{team}", 2833 method="PATCH", 2834 body=input, 2835 response_type=Team, 2836 )
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.
2838 def artifacts(self, team: str) -> TeamArtifactsResponse: 2839 """ 2840 List a team's artifacts 2841 Returns all artifacts owned by the specified team. Artifacts represent 2842 AI-generated or user-uploaded files associated with agent sessions, 2843 threads, or sandboxes such as images, documents, and code outputs. 2844 The authenticated user must be a member of the team. Attempting to list 2845 artifacts for a team the caller does not have access to returns 404 2846 rather than 403 to avoid leaking team existence. 2847 Results are returned in a single page without cursor pagination. Each 2848 artifact in the response reflects the state of its current version, 2849 including a short-lived signed `file_url` for direct download. 2850 2851 Args: 2852 team: Team ID (`tea_...`). The authenticated user must be a member of this team. 2853 2854 Returns: 2855 Successful response 2856 """ 2857 return self._http.request( 2858 f"/api/v1/teams/{team}/artifacts", 2859 response_type=TeamArtifactsResponse, 2860 )
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.
Returns:
Successful response
2862 def invite(self, team: str) -> TeamInvite: 2863 """ 2864 Create a team invite 2865 Generates a new invite code for the specified team. The authenticated user 2866 must be a member of the team with the `owner` or `admin` role. 2867 The returned code is a short alphanumeric string that other users can 2868 present to join the team. Each call produces a new code; previously issued 2869 codes are not invalidated by this request. 2870 2871 Args: 2872 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2873 2874 Returns: 2875 The newly created team invite containing the join code. 2876 """ 2877 return self._http.request( 2878 f"/api/v1/teams/{team}/invite", 2879 method="POST", 2880 response_type=TeamInvite, 2881 )
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.
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.
2883 def invites(self, team: str) -> TeamInvitesResponse: 2884 """ 2885 Create a team invite (server-to-server) 2886 Generates a new invite code for the specified team using server-to-server 2887 authentication. Unlike the user-facing create endpoint, this variant does not 2888 require the caller to be a team member it is intended for privileged 2889 back-end services acting on behalf of your platform. 2890 The returned code is a short alphanumeric string that users can present to 2891 join the team. Each call produces a new code; previously issued codes are 2892 not invalidated by this request. 2893 2894 Args: 2895 team: Team ID (`tm_...`) identifying the team for which to generate the invite code. 2896 2897 Returns: 2898 Successful response 2899 """ 2900 return self._http.request( 2901 f"/api/v1/teams/{team}/invites", 2902 method="POST", 2903 response_type=TeamInvitesResponse, 2904 )
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
2906 def join(self, team: str, input: TeamJoinInput) -> None: 2907 """ 2908 Join a team 2909 Adds a principal to a team that is visible to the authenticated user. 2910 By default, the currently authenticated user joins the team. Provide `agent` 2911 to add an agent to the team instead the caller must already be a member of 2912 the team to do so. Provide `user` (by ID) or `email` to add another user from 2913 your organization the caller must be a team owner, team admin, or org admin. 2914 Only one of `agent`, `user`, or `email` may be supplied per request. 2915 If the target principal is already a member of the team, the request succeeds 2916 without creating a duplicate membership. Server-to-server callers are not 2917 permitted to use this endpoint; use the invite-code endpoint instead. 2918 2919 Args: 2920 team: Team ID (`team_...`) to join. 2921 input: Request body. 2922 input.agent: Agent ID (`agent_...`) to add to the team. The caller must already be a member of the team. 2923 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. 2924 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. 2925 2926 Returns: 2927 Empty response the principal is now a member of the team. 2928 """ 2929 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.
2931 def leave(self, team: str) -> None: 2932 """ 2933 Leave a team 2934 Removes a principal from a team. By default, the authenticated user removes 2935 themselves from the team. Provide `agent` to remove an agent instead the 2936 caller must be a member of the team to do so. 2937 Team owners cannot leave their own team. To transfer ownership first, use 2938 the update-membership endpoint, then call this endpoint. 2939 For server-to-server requests, `user` is required to identify which user 2940 should be removed. 2941 2942 Args: 2943 team: Team ID (`team_...`) to leave. 2944 2945 Returns: 2946 Empty response the principal has been removed from the team. 2947 """ 2948 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.