Requests¶
The typed input models. Each LinearClient
method takes exactly one of these.
Typed request models for each :class:~linear_python_client.client.LinearClient call.
Every client method takes exactly one of these. They carry snake_case fields with
camelCase aliases, and expose helpers (to_variables, to_input) that serialise
them into the GraphQL variables the API expects.
IssueRequest
¶
UserRequest
¶
TeamRequest
¶
ProjectRequest
¶
CommentRequest
¶
PaginatedRequest
¶
Bases: LinearModel
Base for list requests: cursor pagination plus an optional filter.
Attributes:
| Name | Type | Description |
|---|---|---|
first |
int | None
|
Maximum number of results to return (Linear defaults to 50). |
after |
str | None
|
Pagination cursor; pass the previous page's |
filter |
dict[str, Any] | None
|
A Linear filter dict. |
to_variables
¶
Serialise to GraphQL variables (camelCase, omitting unset values).
IssuesRequest
¶
Bases: PaginatedRequest
List issues, optionally filtered and ordered.
Attributes:
| Name | Type | Description |
|---|---|---|
order_by |
str | None
|
Sort order, either |
UsersRequest
¶
TeamsRequest
¶
ProjectsRequest
¶
IssueLabelsRequest
¶
CommentsRequest
¶
Bases: PaginatedRequest
List comments, optionally scoped to a single issue.
Attributes:
| Name | Type | Description |
|---|---|---|
issue_id |
str | None
|
When set, only comments on this issue are returned (merged into
|
WorkflowStatesRequest
¶
Bases: PaginatedRequest
List workflow states, optionally scoped to a single team.
Attributes:
| Name | Type | Description |
|---|---|---|
team_id |
str | None
|
When set, only states belonging to this team are returned (merged
into |
IssueCreateRequest
¶
Bases: LinearModel
Input for creating an issue.
Any field accepted by Linear's IssueCreateInput may also be passed as an
extra keyword argument using its camelCase API name (e.g. dueDate="2026-01-01").
Attributes:
| Name | Type | Description |
|---|---|---|
team_id |
str
|
UUID of the team the issue belongs to (required). |
title |
str
|
The issue title (required). |
description |
str | None
|
Markdown body for the issue. |
assignee_id |
str | None
|
UUID of the user to assign. |
state_id |
str | None
|
UUID of the workflow state to set. |
priority |
int | None
|
Priority from 0 (none) to 4 (low); 1 is urgent. |
label_ids |
list[str] | None
|
UUIDs of labels to attach. |
project_id |
str | None
|
UUID of the project to add the issue to. |
to_input
¶
Serialise to an IssueCreateInput dict (camelCase, omitting unset values).
IssueUpdateRequest
¶
Bases: LinearModel
Input for updating an issue.
At least one field other than id must be set. Any field accepted by Linear's
IssueUpdateInput may also be passed as an extra keyword argument using its
camelCase API name.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID of the issue to update (required). |
title |
str | None
|
New title. |
description |
str | None
|
New markdown body. |
assignee_id |
str | None
|
UUID of the user to assign. |
state_id |
str | None
|
UUID of the workflow state to set. |
priority |
int | None
|
Priority from 0 (none) to 4 (low); 1 is urgent. |
label_ids |
list[str] | None
|
UUIDs of labels to set. |
project_id |
str | None
|
UUID of the project to move the issue to. |
to_input
¶
Serialise the update fields to an IssueUpdateInput dict (excluding id).
IssueArchiveRequest
¶
IssueAddLabelRequest
¶
Bases: LinearModel
Add a single label to an issue, leaving its other labels untouched.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID of the issue. |
label_id |
str
|
UUID of the label to add. |
IssueRemoveLabelRequest
¶
Bases: LinearModel
Remove a single label from an issue, leaving its other labels untouched.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID of the issue. |
label_id |
str
|
UUID of the label to remove. |
IssueShareRequest
¶
Bases: LinearModel
Share an issue with a specific user.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID or human identifier (e.g. |
user_id |
str
|
UUID of the user to grant shared access to. |
Preconditions (enforced by the API, surfaces as
:exc:~linear_python_client.LinearGraphQLError):
- The acting principal must have native access to the issue's entire sub-issue tree, not just the top-level issue.
- The acting principal needs permission to share issues in that issue's
team — the team's
issueSharingEnabledmust be on and the principal must satisfy the team'ssecuritySettings.issueSharingrole (memberorowner). - Issues that inherit sharing from a parent cannot be shared directly.
If
IssueDetail.inherits_shared_accessisTrue, the mutation will error. Setinherits_shared_access=Falsevia :meth:~linear_python_client.client.LinearClient.update_issuefirst.
IssueUnshareRequest
¶
Bases: LinearModel
Remove a user's shared access to an issue.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID or human identifier (e.g. |
user_id |
str
|
UUID of the user whose shared access to revoke. |
Preconditions (enforced by the API, surfaces as
:exc:~linear_python_client.LinearGraphQLError):
- The acting principal must have native access to the issue's entire sub-issue tree, not just the top-level issue.
- The acting principal needs permission to share issues in that issue's
team — the team's
issueSharingEnabledmust be on and the principal must satisfy the team'ssecuritySettings.issueSharingrole (memberorowner). - Issues that inherit sharing from a parent cannot be unshared directly.
If
IssueDetail.inherits_shared_accessisTrue, the mutation will error. Setinherits_shared_access=Falsevia :meth:~linear_python_client.client.LinearClient.update_issuefirst.
IssueSetStateRequest
¶
Bases: LinearModel
Move an issue to a workflow state (status).
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
UUID of the issue. |
state_id |
str
|
UUID of the target workflow state. Resolve one by name with
|
FindWorkflowStateRequest
¶
Bases: LinearModel
Resolve a workflow state by name within a team.
Attributes:
| Name | Type | Description |
|---|---|---|
team_id |
str
|
UUID of the team that owns the state. |
name |
str
|
State name to match, case-insensitively (e.g. |
FindTeamRequest
¶
Bases: LinearModel
Resolve a team by its display name or key.
Provide at least one of name / key. Matching is case-insensitive for the
name and exact for the key.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str | None
|
Team display name (e.g. |
key |
str | None
|
Team key (e.g. |
to_filter
¶
Build the TeamFilter for this lookup.
Source code in src/linear_python_client/models/requests.py
FindUserRequest
¶
Bases: LinearModel
Resolve a user by name, display name, or email.
Provide at least one of name / email. The name value is matched
(case-insensitively) against both the full name and the display name.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str | None
|
Full name or display name (e.g. |
email |
str | None
|
Email address. |
to_filter
¶
Build the UserFilter for this lookup.
Source code in src/linear_python_client/models/requests.py
FindProjectRequest
¶
Bases: LinearModel
Resolve a project by name.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Project name to match, case-insensitively. |
FindLabelRequest
¶
Bases: LinearModel
Resolve an issue label by name, optionally scoped to a team.
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Label name to match, case-insensitively (e.g. |
team_id |
str | None
|
Optional team UUID to disambiguate team-scoped labels. |
to_filter
¶
Build the IssueLabelFilter for this lookup.
Source code in src/linear_python_client/models/requests.py
CommentCreateRequest
¶
Bases: LinearModel
Input for adding a comment to an issue.
Any field accepted by Linear's CommentCreateInput may also be passed as an
extra keyword argument using its camelCase API name.
Attributes:
| Name | Type | Description |
|---|---|---|
issue_id |
str
|
UUID of the issue to comment on (required). |
body |
str
|
Markdown body of the comment (required). |
to_input
¶
Serialise to a CommentCreateInput dict (camelCase, omitting unset values).