> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/003_definitions/queries.md).

# Queries

## ai\_task (company)

**Schema:** company

A single task of the calling company's, by id.

Backs the runs page, which is reached by link and knows only the id. Null when the id isn't theirs — a caller can't tell "someone else's" from "gone", and doesn't need to.

**Type:** Query

**Returns:** `AiTask`

```graphql
ai_task(
  id: Id!
): AiTask
```

## ai\_task (user)

**Schema:** user

A single task of the calling user's, by id.

Backs the runs page, which is reached by link and knows only the id. Null when the id isn't theirs — a caller can't tell "someone else's" from "gone", and doesn't need to.

**Type:** Query

**Returns:** `AiTask`

```graphql
ai_task(
  id: Id!
): AiTask
```

## ai\_task\_runs

**Schema:** user, company

**Type:** Query

**Returns:** `PaginatedAiTaskRuns`

```graphql
ai_task_runs(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  task_id: Id!
): PaginatedAiTaskRuns
```

## ai\_tasks

**Schema:** user, company

**Type:** Query

**Returns:** `PaginatedAiTasks`

```graphql
ai_tasks(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter to tasks that watch this folder. A task watching an ancestor covers the folder's documents without being about the folder, and is left out"
  folder_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedAiTasks
```

## b2b\_connections

**Schema:** company

**Type:** Query

**Returns:** `[B2bConnection]`

```graphql
b2b_connections(
  "Filter by excluding the type of the connection"
  excluded_type: B2bConnectionType
  "Filter by the type of the connection"
  included_type: B2bConnectionType
  "Limit number of results"
  limit: Integer
): [B2bConnection]
```

## b2c\_connection\_notification\_settings

**Schema:** user

**Type:** Query

**Returns:** `B2cConnectionNotificationSettings`

```graphql
b2c_connection_notification_settings(
  "The ID of the B2C connection"
  b2c_connection_id: Id!
): B2cConnectionNotificationSettings
```

## b2c\_connections

**Schema:** user, company

**Type:** Query

**Returns:** `[B2cConnection]`

```graphql
b2c_connections(
  "Filter by excluding the type of the connection"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection"
  included_type: B2cConnectionType
  "Limit number of results"
  limit: Integer
): [B2cConnection]
```

## b2c\_subscription\_topics

**Schema:** company

**Type:** Query

**Returns:** `[B2cSubscriptionTopic]`

```graphql
b2c_subscription_topics: [B2cSubscriptionTopic]
```

## b2c\_subscriptions

**Schema:** user, company

**Type:** Query

**Returns:** `PaginatedB2cSubscriptions`

```graphql
b2c_subscriptions(
  "Filter by the company of the subscription"
  company_id: Id
  "Cursor to get the next batch of results (null if none)"
  cursor: String
  "Filter by excluding subscriptions with the B2C subscription topic by passing the topic"
  excluded_topic: String
  "Filter by the expiration date of the subscription"
  expiration_date_after: Date
  "Filter by the expiration date of the subscription"
  expiration_date_before: Date
  "Filter by including subscriptions with the B2C subscription topic by passing the topic"
  included_topic: String
  "Limit number of results"
  limit: Integer
  "Filter by the type (channel) of the subscription"
  types: [B2cSubscriptionType!]
  "Filter by the user of the subscription"
  user_id: Id
): PaginatedB2cSubscriptions
```

## c2c\_connections

**Schema:** user

**Type:** Query

**Returns:** `[C2cConnection]`

```graphql
c2c_connections(
  "Filter by excluding the type of the connection"
  excluded_type: C2cConnectionType
  "Filter by the type of the connection"
  included_type: C2cConnectionType
  "Limit number of results"
  limit: Integer
): [C2cConnection]
```

## client\_secrets

**Schema:** company

**Type:** Query

**Returns:** `[ClientSecret!]!`

```graphql
client_secrets: [ClientSecret!]!
```

## companies

**Schema:** user, company

**Type:** Query

**Returns:** `[Company]`

```graphql
companies(
  email: String
  id: Id
  limit: Integer
  "Filter by metadata, e.g. {"key" => "value"}, only exact match is supported"
  metadata: Json
  "Filter by legal name, brand name or profile name"
  name: String
  tax_id: String
  telephone_number: String
  webpage: String
): [Company]
```

## company\_dashboard\_stats

**Schema:** company

**Type:** Query

**Returns:** `CompanyDashboardStats`

```graphql
company_dashboard_stats: CompanyDashboardStats
```

## company\_document

**Schema:** company

**Type:** Query

**Returns:** `Document`

```graphql
company_document(
  "The document id"
  id: Id!
): Document
```

## company\_documents

**Schema:** company

**Type:** Query

**Returns:** `PaginatedDocuments`

```graphql
company_documents(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Scope to a folder's contents, or with an explicit null to the repository root; omit for no folder filter"
  folder_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Filter by file name"
  search: String
  "Filter by status; defaults to accepted"
  status: DocumentStatus
  "Filter to documents carrying any of these tag ids"
  tag_ids: [Id!]
): PaginatedDocuments
```

## company\_folders

**Schema:** company

**Type:** Query

**Returns:** `FoldersPage`

```graphql
company_folders: FoldersPage
```

## company\_form

**Schema:** company

**Type:** Query

**Returns:** `Form`

```graphql
company_form(
  "The ID of the form"
  id: Id!
): Form
```

## company\_forms

**Schema:** company

**Type:** Query

**Returns:** `PaginatedForms`

```graphql
company_forms(
  "Cursor for pagination"
  cursor: String
  "Limit number of results"
  limit: Integer
): PaginatedForms
```

## company\_invitation\_links

**Schema:** company

**Type:** Query

**Returns:** `[InvitationLink]`

```graphql
company_invitation_links(
  "Limit number of results"
  limit: Integer
): [InvitationLink]
```

## company\_rcs\_information

**Schema:** company

**Type:** Query

**Returns:** `CompanyRcsInformation`

```graphql
company_rcs_information: CompanyRcsInformation
```

## company\_settings

**Schema:** company

**Type:** Query

**Returns:** `CompanySettings`

```graphql
company_settings: CompanySettings
```

## company\_tags

**Schema:** company

**Type:** Query

**Returns:** `[Tag]`

```graphql
company_tags: [Tag]
```

## company\_webhooks

**Schema:** company

**Type:** Query

**Returns:** `[CompanyWebhook]`

```graphql
company_webhooks: [CompanyWebhook]
```

## current\_company

**Schema:** company

**Type:** Query

**Returns:** `Company`

```graphql
current_company: Company
```

## current\_user

**Schema:** user

**Type:** Query

**Returns:** `User`

```graphql
current_user: User
```

## current\_user\_settings

**Schema:** user

**Type:** Query

**Returns:** `User`

```graphql
current_user_settings: User
```

## dashboard\_stats

**Schema:** user

**Type:** Query

**Returns:** `UserDashboardStats`

```graphql
dashboard_stats: UserDashboardStats
```

## document

**Schema:** user

**Type:** Query

**Returns:** `Document`

```graphql
document(
  "The document id"
  id: Id!
): Document
```

## documents

**Schema:** user

**Type:** Query

**Returns:** `PaginatedDocuments`

```graphql
documents(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Scope to a folder's contents, or with an explicit null to the repository root; omit for no folder filter"
  folder_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Filter by file name"
  search: String
  "Filter by status; defaults to accepted"
  status: DocumentStatus
  "Filter to documents carrying any of these tag ids"
  tag_ids: [Id!]
): PaginatedDocuments
```

## folders

**Schema:** user

**Type:** Query

**Returns:** `FoldersPage`

```graphql
folders: FoldersPage
```

## form\_submission

**Schema:** company

**Type:** Query

**Returns:** `FormInstance`

```graphql
form_submission(
  "The ID of the form"
  form_id: Id!
  "The ID of the form instance"
  form_instance_id: Id!
): FormInstance
```

## form\_submissions

**Schema:** company

**Type:** Query

**Returns:** `PaginatedFormSubmissions`

```graphql
form_submissions(
  "Cursor for pagination"
  cursor: String
  "The ID of the form"
  form_id: Id!
  "Limit number of results"
  limit: Integer
): PaginatedFormSubmissions
```

## global\_search

**Schema:** user, company

**Type:** Query

**Returns:** `[SearchResult!]!`

```graphql
global_search(
  "Maximum number of results per entity kind (user/company/group); defaults to 10"
  limit: Integer
  "Search term; at least 3 characters are required to return any results"
  query: String!
  "When true, include the viewer-visible subset of contact info (emails, phone numbers, addresses) on each row. Defaults to false."
  show_sensitive_data: Boolean
): [SearchResult!]!
```

## group

**Schema:** user

**Type:** Query

**Returns:** `Group`

```graphql
group(
  "Id of the group"
  id: Id!
): Group
```

## group\_notification\_settings

**Schema:** user

**Type:** Query

**Returns:** `GroupNotificationSettings`

```graphql
group_notification_settings(
  "The ID of the group user member record"
  group_user_member_id: Id!
): GroupNotificationSettings
```

## groups

**Schema:** user

**Type:** Query

**Returns:** `[Group]`

```graphql
groups(
  limit: Integer
  "Filter by metadata, e.g. {"key" => "value"}, only exact match is supported"
  metadata: Json
  "Filter by group name"
  name: String
): [Group]
```

## interests

**Schema:** user

**Type:** Query

**Returns:** `[Interest]`

```graphql
interests: [Interest]
```

## notification

**Schema:** user, company

A single notification of the current actor's, by id.

Null when the id isn't the actor's — a caller can't tell "someone else's" from "gone", and doesn't need to.

**Type:** Query

**Returns:** `Notification`

```graphql
notification(
  id: Id!
): Notification
```

## notification\_settings

**Schema:** user

**Type:** Query

**Returns:** `UserNotificationSettings`

```graphql
notification_settings: UserNotificationSettings
```

## notifications

**Schema:** user, company

**Type:** Query

**Returns:** `PaginatedNotifications`

```graphql
notifications(
  "Cursor to get the next batch of results (null if none)"
  cursor: String
  "Limit number of results"
  limit: Integer
  "Filter to only read or unread notifications"
  status: NotificationStatus
): PaginatedNotifications
```

## onboarding\_status

**Schema:** user

**Type:** Query

**Returns:** `OnboardingStatus`

```graphql
onboarding_status: OnboardingStatus
```

## opt\_out\_requests

**Schema:** company

**Type:** Query

**Returns:** `[OptOutRequest]`

```graphql
opt_out_requests(
  "Filter by the destination of the opt out request"
  destination: String
  "Filter by the external_id of the opt out request"
  external_id: String
  "Limit number of results"
  limit: Integer
  "Filter by the source of the opt out request"
  source: String
  "Filter by the status of the opt out request"
  status: OptOutRequestStatus
  "Filter by the timestamp of the opt out request"
  timestamp_after: NaiveDatetime
  "Filter by the timestamp of the opt out request"
  timestamp_before: NaiveDatetime
  "Filter by the type of the opt out request"
  type: OptOutRequestType
): [OptOutRequest]
```

## organization\_types

**Schema:** company

**Type:** Query

**Returns:** `[OrganizationType]`

```graphql
organization_types: [OrganizationType]
```

## paginated\_b2b\_connections

**Schema:** company

**Type:** Query

**Returns:** `PaginatedB2bConnections`

```graphql
paginated_b2b_connections(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter to one or more B2B connection types (any-of)"
  included_types: [B2bConnectionType!]
  "Fuzzy substring match on the other party's legal name; the calling company is never returned"
  legal_name: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2bConnections
```

## paginated\_b2c\_connections

**Schema:** user

**Type:** Query

**Returns:** `PaginatedB2cConnections`

```graphql
paginated_b2c_connections(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter to one or more B2C connection types (any-of)"
  included_types: [B2cConnectionType!]
  "Fuzzy substring match on the connected company's legal name"
  legal_name: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2cConnections
```

## paginated\_b2c\_connections\_as\_company

**Schema:** company

**Type:** Query

**Returns:** `PaginatedB2cConnections`

```graphql
paginated_b2c_connections_as_company(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter to one or more B2C connection types (any-of)"
  included_types: [B2cConnectionType!]
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Fuzzy substring match on the connected user's full name"
  user_name: String
): PaginatedB2cConnections
```

## paginated\_c2c\_connections

**Schema:** user

**Type:** Query

**Returns:** `PaginatedC2cConnections`

```graphql
paginated_c2c_connections(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter to one or more C2C connection types (any-of)"
  included_types: [C2cConnectionType!]
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Fuzzy substring match on the other party's full name; the calling user is never returned"
  user_name: String
): PaginatedC2cConnections
```

## paginated\_client\_secrets

**Schema:** company

**Type:** Query

**Returns:** `PaginatedClientSecrets`

```graphql
paginated_client_secrets(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedClientSecrets
```

## paginated\_company\_invitation\_links

**Schema:** company

**Type:** Query

**Returns:** `PaginatedInvitationLinks`

```graphql
paginated_company_invitation_links(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedInvitationLinks
```

## paginated\_form\_versions

**Schema:** company

**Type:** Query

**Returns:** `PaginatedCompanyFormVersions`

```graphql
paginated_form_versions(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "The ID of the form"
  form_id: Id!
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedCompanyFormVersions
```

## paginated\_pending\_b2b\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedB2bConnectionRequests`

```graphql
paginated_pending_b2b_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: B2bConnectionType
  "Filter by the type of the connection request"
  included_type: B2bConnectionType
  "Filter by invited company id"
  invited_company_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2bConnectionRequests
```

## paginated\_pending\_b2c\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedB2cConnectionRequests`

```graphql
paginated_pending_b2c_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2cConnectionRequests
```

## paginated\_pending\_b2c\_subscription\_requests

**Schema:** user, company

**Type:** Query

**Returns:** `PaginatedB2cSubscriptionRequests`

```graphql
paginated_pending_b2c_subscription_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2cSubscriptionRequests
```

## paginated\_pending\_c2b\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedC2bConnectionRequests`

```graphql
paginated_pending_c2b_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedC2bConnectionRequests
```

## paginated\_pending\_c2c\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedC2cConnectionRequests`

```graphql
paginated_pending_c2c_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: C2cConnectionType
  "Filter by the type of the connection request"
  included_type: C2cConnectionType
  "Filter by invited user id"
  invited_user_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedC2cConnectionRequests
```

## paginated\_pending\_group\_user\_member\_invites

**Schema:** user

**Type:** Query

**Returns:** `PaginatedGroupUserMemberInvites`

```graphql
paginated_pending_group_user_member_invites(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by group id"
  group_id: Id
  "Filter by invited user id"
  invited_user_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedGroupUserMemberInvites
```

## paginated\_pending\_group\_user\_member\_join\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedGroupUserMemberJoinRequests`

```graphql
paginated_pending_group_user_member_join_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedGroupUserMemberJoinRequests
```

## paginated\_received\_b2b\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedB2bConnectionRequests`

```graphql
paginated_received_b2b_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: B2bConnectionType
  "Filter by the type of the connection request"
  included_type: B2bConnectionType
  "Filter by inviting company id - the one that invited you"
  inviting_company_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2bConnectionRequests
```

## paginated\_received\_b2b\_form\_submission\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedReceivedB2bFormSubmissionRequests`

```graphql
paginated_received_b2b_form_submission_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by form instance status"
  form_instance_status: FormBuilderFormInstanceStatus
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Search by company name or form title"
  search_query: String
): PaginatedReceivedB2bFormSubmissionRequests
```

## paginated\_received\_b2c\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedB2cConnectionRequests`

```graphql
paginated_received_b2c_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedB2cConnectionRequests
```

## paginated\_received\_c2b\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedC2bConnectionRequests`

```graphql
paginated_received_c2b_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Filter by inviter user id"
  user_id: Id
): PaginatedC2bConnectionRequests
```

## paginated\_received\_c2c\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedC2cConnectionRequests`

```graphql
paginated_received_c2c_connection_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the type of the connection request"
  excluded_type: C2cConnectionType
  "Filter by the type of the connection request"
  included_type: C2cConnectionType
  "Filter by inviting user id - the one that invited you"
  inviting_user_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedC2cConnectionRequests
```

## paginated\_received\_form\_submission\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedReceivedB2cFormSubmissionRequests`

```graphql
paginated_received_form_submission_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by form instance status"
  form_instance_status: FormBuilderFormInstanceStatus
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Search by company name or form title"
  search_query: String
): PaginatedReceivedB2cFormSubmissionRequests
```

## paginated\_received\_group\_user\_member\_invites

**Schema:** user

**Type:** Query

**Returns:** `PaginatedGroupUserMemberInvites`

```graphql
paginated_received_group_user_member_invites(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by inviting user id - the one that invited you"
  inviting_user_id: Id
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedGroupUserMemberInvites
```

## paginated\_received\_group\_user\_member\_join\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedGroupUserMemberJoinRequests`

```graphql
paginated_received_group_user_member_join_requests(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Id of the Group"
  group_id: Id!
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedGroupUserMemberJoinRequests
```

## paginated\_sentiment\_analysis\_results

**Schema:** company

**Type:** Query

**Returns:** `PaginatedSentimentAnalysisResults`

```graphql
paginated_sentiment_analysis_results(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by host address"
  host_address: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
  "Filter by remote address"
  remote_address: String
  "Filter by timestamp from"
  timestamp_from: NaiveDatetime
  "Filter by timestamp to"
  timestamp_to: NaiveDatetime
  "Filter by communication type"
  type: ExternalCommunicationType
): PaginatedSentimentAnalysisResults
```

## paginated\_spam\_reports

**Schema:** user

**Type:** Query

**Returns:** `PaginatedSpamReports`

```graphql
paginated_spam_reports(
  "Filter by the channel type of the spam report"
  channel_type: SpamReportChannelType
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Filter by excluding the status of the spam report"
  excluded_status: SpamReportStatus
  "Filter by the status of the spam report"
  included_status: SpamReportStatus
  "Filter by the issue type of the spam report"
  issue_type: SpamReportIssueType
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedSpamReports
```

## paginated\_user\_groups

**Schema:** user

**Type:** Query

**Returns:** `PaginatedGroupUserMembers`

```graphql
paginated_user_groups(
  "Cursor for the next page; pass back `pagination_info.next_cursor` from the previous response"
  cursor: String
  "Limit number of results per page; defaults are applied if omitted"
  limit: Integer
): PaginatedGroupUserMembers
```

## pending\_action\_counts (company)

**Schema:** company

**Type:** Query

**Returns:** `CompanyPendingActionCounts`

```graphql
pending_action_counts: CompanyPendingActionCounts
```

## pending\_action\_counts (user)

**Schema:** user

**Type:** Query

**Returns:** `UserPendingActionCounts`

```graphql
pending_action_counts: UserPendingActionCounts
```

## pending\_b2b\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `[B2bConnectionRequest]`

```graphql
pending_b2b_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: B2bConnectionType
  "Filter by the type of the connection request"
  included_type: B2bConnectionType
  "Filter by invited company id"
  invited_company_id: Id
  "Limit number of results"
  limit: Integer
): [B2bConnectionRequest]
```

## pending\_b2c\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `[B2cConnectionRequest]`

```graphql
pending_b2c_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Filter by invited user id"
  invited_user_id: Id
  "Limit number of results"
  limit: Integer
): [B2cConnectionRequest]
```

## pending\_b2c\_subscription\_requests

**Schema:** user, company

**Type:** Query

**Returns:** `[B2cSubscriptionRequest]`

```graphql
pending_b2c_subscription_requests: [B2cSubscriptionRequest]
```

## pending\_c2b\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `[C2bConnectionRequest]`

```graphql
pending_c2b_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results"
  limit: Integer
): [C2bConnectionRequest]
```

## pending\_c2c\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `[C2cConnectionRequest]`

```graphql
pending_c2c_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: C2cConnectionType
  "Filter by the type of the connection request"
  included_type: C2cConnectionType
  "Filter by invited user id"
  invited_user_id: Id
  "Limit number of results"
  limit: Integer
): [C2cConnectionRequest]
```

## pending\_group\_user\_member\_invites

**Schema:** user

**Type:** Query

**Returns:** `[GroupUserMemberInvite]`

```graphql
pending_group_user_member_invites(
  "Filter by group id"
  group_id: Id
  "Filter by invited user id"
  invited_user_id: Id
  "Limit number of results"
  limit: Integer
): [GroupUserMemberInvite]
```

## pending\_group\_user\_member\_join\_requests

**Schema:** user

**Type:** Query

**Returns:** `[GroupUserMemberJoinRequest]`

```graphql
pending_group_user_member_join_requests(
  "Limit number of results"
  limit: Integer
): [GroupUserMemberJoinRequest]
```

## received\_b2b\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `[B2bConnectionRequest]`

```graphql
received_b2b_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: B2bConnectionType
  "Filter by the type of the connection request"
  included_type: B2bConnectionType
  "Filter by inviting company id - the one that invited you"
  inviting_company_id: Id
  "Limit number of results"
  limit: Integer
): [B2bConnectionRequest]
```

## received\_b2b\_form\_submission\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedB2bFormSubmissionRequests`

```graphql
received_b2b_form_submission_requests(
  "Filter by form instance status"
  form_instance_status: FormBuilderFormInstanceStatus
  "Limit number of results per page"
  limit: Integer
  "Page number"
  page: Integer
  "Search by company name or form title"
  search_query: String
): PaginatedB2bFormSubmissionRequests
```

## received\_b2c\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `[B2cConnectionRequest]`

```graphql
received_b2c_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results"
  limit: Integer
): [B2cConnectionRequest]
```

## received\_c2b\_connection\_requests

**Schema:** company

**Type:** Query

**Returns:** `[C2bConnectionRequest]`

```graphql
received_c2b_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: B2cConnectionType
  "Filter by the type of the connection request"
  included_type: B2cConnectionType
  "Limit number of results"
  limit: Integer
  "Filter by inviter user id"
  user_id: Id
): [C2bConnectionRequest]
```

## received\_c2c\_connection\_requests

**Schema:** user

**Type:** Query

**Returns:** `[C2cConnectionRequest]`

```graphql
received_c2c_connection_requests(
  "Filter by excluding the type of the connection request"
  excluded_type: C2cConnectionType
  "Filter by the type of the connection request"
  included_type: C2cConnectionType
  "Filter by inviting user id - the one that invited you"
  inviting_user_id: Id
  "Limit number of results"
  limit: Integer
): [C2cConnectionRequest]
```

## received\_form\_submission\_requests

**Schema:** user

**Type:** Query

**Returns:** `PaginatedB2cFormSubmissionRequests`

```graphql
received_form_submission_requests(
  "Filter by form instance status"
  form_instance_status: FormBuilderFormInstanceStatus
  "Limit number of results per page"
  limit: Integer
  "Page number"
  page: Integer
  "Search by company name or form title"
  search_query: String
): PaginatedB2cFormSubmissionRequests
```

## received\_group\_user\_member\_invites

**Schema:** user

**Type:** Query

**Returns:** `[GroupUserMemberInvite]`

```graphql
received_group_user_member_invites(
  "Filter by inviting user id - the one that invited you"
  inviting_user_id: Id
  "Limit number of results"
  limit: Integer
): [GroupUserMemberInvite]
```

## received\_group\_user\_member\_join\_requests

**Schema:** user

**Type:** Query

**Returns:** `[GroupUserMemberJoinRequest]`

```graphql
received_group_user_member_join_requests(
  "Id of the Group"
  group_id: Id!
  "Limit number of results"
  limit: Integer
): [GroupUserMemberJoinRequest]
```

## recent\_notifications

**Schema:** user, company

**Type:** Query

**Returns:** `[Notification!]!`

```graphql
recent_notifications(
  "Maximum number of records to return (default 5)"
  limit: Integer
): [Notification!]!
```

## sent\_b2b\_form\_submission\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedSentB2bFormSubmissionRequests`

```graphql
sent_b2b_form_submission_requests(
  "Cursor for pagination"
  cursor: String
  "The ID of the form"
  form_id: Id!
  "Limit number of results"
  limit: Integer
): PaginatedSentB2bFormSubmissionRequests
```

## sent\_b2c\_form\_submission\_requests

**Schema:** company

**Type:** Query

**Returns:** `PaginatedSentB2cFormSubmissionRequests`

```graphql
sent_b2c_form_submission_requests(
  "Cursor for pagination"
  cursor: String
  "The ID of the form"
  form_id: Id!
  "Limit number of results"
  limit: Integer
): PaginatedSentB2cFormSubmissionRequests
```

## sentiment\_analysis\_result

**Schema:** company

**Type:** Query

**Returns:** `SentimentAnalysisReport`

```graphql
sentiment_analysis_result(
  "The ID of the sentiment analysis report"
  id: Id!
): SentimentAnalysisReport
```

## sentiment\_analysis\_results

**Schema:** company

**Type:** Query

**Returns:** `PaginatedSentimentAnalysisReports`

```graphql
sentiment_analysis_results(
  "Filter by host address"
  host_address: String
  "Limit number of results per page"
  limit: Integer
  "Page number"
  page: Integer
  "Filter by remote address"
  remote_address: String
  "Filter by timestamp from"
  timestamp_from: NaiveDatetime
  "Filter by timestamp to"
  timestamp_to: NaiveDatetime
  "Filter by communication type"
  type: ExternalCommunicationType
): PaginatedSentimentAnalysisReports
```

## spam\_reports

**Schema:** user

**Type:** Query

**Returns:** `[SpamReport]`

```graphql
spam_reports(
  "Filter by the channel type of the spam report"
  channel_type: SpamReportChannelType
  "Filter by excluding the status of the spam report"
  excluded_status: SpamReportStatus
  "Filter by the status of the spam report"
  included_status: SpamReportStatus
  "Filter by the issue type of the spam report"
  issue_type: SpamReportIssueType
  "Limit number of results"
  limit: Integer
): [SpamReport]
```

## specialties

**Schema:** user, company

**Type:** Query

**Returns:** `[Specialty]`

```graphql
specialties: [Specialty]
```

## switchable\_companies

**Schema:** user, company

**Type:** Query

**Returns:** `[ShallowCompany]`

```graphql
switchable_companies(
  "Limit number of results (defaults to 20)"
  limit: Integer
  "Fuzzy substring match by legal name"
  search: String
): [ShallowCompany]
```

## tags

**Schema:** user

**Type:** Query

**Returns:** `[Tag]`

```graphql
tags: [Tag]
```

## ten\_dlc\_api\_key\_authorizations

**Schema:** company

**Type:** Query

**Returns:** `[TenDlcApiKeyAuthorization]`

```graphql
ten_dlc_api_key_authorizations: [TenDlcApiKeyAuthorization]
```

## ten\_dlc\_api\_keys

**Schema:** company

**Type:** Query

**Returns:** `[TenDlcApiKey]`

```graphql
ten_dlc_api_keys(
  "Filter by key type (owned or authorized), optional"
  api_key_type: TenDlcApiKeyType
): [TenDlcApiKey]
```

## ten\_dlc\_brand

**Schema:** company

**Type:** Query

**Returns:** `TenDlcBrand`

```graphql
ten_dlc_brand(
  "Internal brand identifier (UUID)"
  id: Id!
): TenDlcBrand
```

## ten\_dlc\_brands

**Schema:** company

**Type:** Query

**Returns:** `PaginatedTenDlcBrands`

```graphql
ten_dlc_brands(
  "Filter by TCR Brand ID (e.g., B123456)"
  brand_id: String
  "Filter by company_id"
  company_id: Id
  "Filter by ownership type"
  ownership_type: TenDlcOwnershipType
  "Page number"
  page: Integer
  "Page size"
  page_size: Integer
  "Filter by status"
  status: TenDlcBrandStatus
  "Filter by workflow status"
  workflow_status: TenDlcBrandWorkflowStatus
): PaginatedTenDlcBrands
```

## ten\_dlc\_campaign

**Schema:** company

**Type:** Query

**Returns:** `TenDlcCampaign`

```graphql
ten_dlc_campaign(
  "Internal campaign identifier (UUID)"
  id: Id!
): TenDlcCampaign
```

## ten\_dlc\_campaign\_with\_telephone\_numbers

**Schema:** company

**Type:** Query

**Returns:** `TenDlcCampaignWithTelephoneNumbers`

```graphql
ten_dlc_campaign_with_telephone_numbers(
  "Internal campaign identifier (UUID)"
  id: Id!
): TenDlcCampaignWithTelephoneNumbers
```

## ten\_dlc\_campaigns

**Schema:** company

**Type:** Query

**Returns:** `PaginatedTenDlcCampaigns`

```graphql
ten_dlc_campaigns(
  "Filter by TCR Brand ID (e.g., B123456)"
  brand_id: String
  "Filter by TCR Campaign ID (e.g., C123456)"
  campaign_id: String
  "Filter by company_id"
  company_id: Id
  "Filter by ownership type: direct = owned by the company, partner = shared by a partner company"
  ownership_type: TenDlcOwnershipType
  "Page number"
  page: Integer
  "Page size"
  page_size: Integer
  "Filter by status"
  status: TenDlcCampaignStatus
  "Filter by usecase"
  usecase: String
  "Filter by vertical"
  vertical: String
  "Filter by workflow status"
  workflow_status: TenDlcCampaignWorkflowStatus
): PaginatedTenDlcCampaigns
```

## unread\_notification\_count

**Schema:** user, company

**Type:** Query

**Returns:** `Integer`

```graphql
unread_notification_count: Integer
```

## user

**Schema:** user, company

**Type:** Query

**Returns:** `User`

```graphql
user(
  "The ID of the user to retrieve"
  id: Id!
): User
```

## user\_by\_username

**Schema:** user, company

**Type:** Query

**Returns:** `User`

```graphql
user_by_username(
  "The username of the user to retrieve"
  username: String!
): User
```

## user\_group\_members

**Schema:** user

**Type:** Query

**Returns:** `GroupUserMemberList`

```graphql
user_group_members(
  "Cursor to get the next batch of results (null if none)"
  cursor: String
  "The ID of the group to list members for"
  group_id: Id!
  "Number of records to return (max. 50)"
  limit: Integer
): GroupUserMemberList
```

## user\_groups

**Schema:** user

**Type:** Query

**Returns:** `[GroupUserMember]`

```graphql
user_groups(
  "Limit number of results"
  limit: Integer
): [GroupUserMember]
```

## user\_import

**Schema:** company

**Type:** Query

**Returns:** `UserImport`

```graphql
user_import(
  "The ID of the user import"
  id: Id!
): UserImport
```

## user\_imports

**Schema:** company

**Type:** Query

**Returns:** `PaginatedUserImports`

```graphql
user_imports(
  "Cursor to get the next batch of results (null if none)"
  cursor: String
  "Limit number of results"
  limit: Integer
): PaginatedUserImports
```

## users

**Schema:** user, company

**Type:** Query

**Returns:** `[User]`

```graphql
users(
  email: String
  limit: Integer
  "Filter by metadata, e.g. {"key" => "value"}, only exact match is supported"
  metadata: Json
  "Filter by username or full name"
  name: String
  telephone_number: String
): [User]
```

## vertical\_types

**Schema:** user, company

**Type:** Query

**Returns:** `[VerticalType]`

```graphql
vertical_types: [VerticalType]
```
