Teams, users and feedback¶
Teams (V2, beta; Affinity API 2026-09-17+): the teams the caller may see.
Source code in affinity/services/org.py
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
get(team_id: int, *, includes: bool | Sequence[str] | None = None) -> Team
¶
One team (includes as in :meth:list).
Source code in affinity/services/org.py
213 214 215 216 217 218 219 220 221 222 | |
iter(*, ids: Sequence[int] | None = None, name: str | None = None, name_contains: str | None = None, order_by: str | None = None, includes: bool | Sequence[str] | None = None, limit: int | None = None) -> Iterator[Team]
¶
All teams matching the filters (every page); see :meth:list.
Source code in affinity/services/org.py
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | |
iter_accessible_lists(team_id: int) -> Iterator[ListSummary]
¶
Every list a team has access to (all pages); see :meth:list_accessible_lists.
Source code in affinity/services/org.py
291 292 293 294 295 296 297 298 299 | |
iter_members(team_id: int) -> Iterator[TeamMember]
¶
Every member of a team (all pages); see :meth:list_members.
Source code in affinity/services/org.py
265 266 267 268 269 270 271 | |
list(*, ids: Sequence[int] | None = None, name: str | None = None, name_contains: str | None = None, order_by: str | None = None, includes: bool | Sequence[str] | None = None, limit: int | None = None, total_count: bool = False, cursor: str | None = None) -> PaginatedResponse[Team]
¶
One page of teams, by name unless order_by says otherwise.
name matches exactly, name_contains anywhere (case-insensitive).
order_by: name, -name, createdAt or -createdAt. includes=True
(or ["membersPreview"] / ["accessibleListsPreview"]) fills the first members
and accessible lists, with totals. limit is 1-100.
Source code in affinity/services/org.py
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | |
list_accessible_lists(team_id: int, *, limit: int | None = None, total_count: bool = False, cursor: str | None = None) -> PaginatedResponse[ListSummary]
¶
One page of the lists a team has access to (V2, beta; API 2026-09-17+). limit is
1-100.
Source code in affinity/services/org.py
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 | |
list_members(team_id: int, *, limit: int | None = None, total_count: bool = False, cursor: str | None = None) -> PaginatedResponse[TeamMember]
¶
One page of a team's members (V2, beta; API 2026-09-17+): every member, where
get(includes=True) gives only the first ones. limit is 1-100.
Source code in affinity/services/org.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 | |
The organization's internal users (V2, beta).
Source code in affinity/services/org.py
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 | |
get(user_id: UserId) -> UserAccount
¶
One user (the id is also the user's person id).
Source code in affinity/services/org.py
507 508 509 | |
iter(*, term: str | None = None, ids: Sequence[UserId] | None = None, status: UserStatus | str | None = None, limit: int | None = None) -> Iterator[UserAccount]
¶
All users matching the filters (every page); see :meth:list.
Source code in affinity/services/org.py
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 | |
list(*, term: str | None = None, ids: Sequence[UserId] | None = None, status: UserStatus | str | None = None, limit: int | None = None, cursor: str | None = None) -> PaginatedResponse[UserAccount]
¶
One page of users. term matches first name, last name or primary email;
status is active, invited or deactivated. limit is 1-100.
Source code in affinity/services/org.py
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | |
Feedback to Affinity's product team about the API, the MCP server, or anything else.
Source code in affinity/services/org.py
562 563 564 565 566 567 568 569 570 571 | |
send(kind: FeedbackType, subject: str, body: str) -> None
¶
Send feedback to Affinity. kind is "api", "mcp" or "other"; subject
up to 255 characters, body up to 10,000. It reaches Affinity's team: be specific.
Source code in affinity/services/org.py
568 569 570 571 | |