lists.sr.ht API Documentation

This is the GraphQL API documentation for the SourceHut service lists.sr.ht. It was generated from the service's GraphQL Schema definition.

Queries

email

@access(scope:EMAILS, kind:RO)

Looks up a specific email by its ID

Returns Email

Arguments
  1. id - Int!
Example Query
query email($id: Int!) {
    email(id: $id) {
        id
        sender {
            ...Entity
        }
        received
        date
        subject
        messageID
        inReplyTo
        header
        addressList {
            ...Mailbox
        }
        body
        envelope
        thread {
            ...Thread
        }
        parent {
            ...Email
        }
        patch {
            ...Patch
        }
        patchset {
            ...Patchset
        }
        list {
            ...MailingList
        }
    }
}

me

@access(scope:PROFILE, kind:RO)

Returns the authenticated user

Returns User!

Example Query
query me {
    me {
        id
        created
        updated
        canonicalName
        username
        email
        url
        location
        bio
        list {
            ...MailingList
        }
        lists {
            ...MailingListCursor
        }
        emails {
            ...EmailCursor
        }
        threads {
            ...ThreadCursor
        }
        patches {
            ...PatchsetCursor
        }
    }
}

message

@access(scope:EMAILS, kind:RO)

Looks up a specific email by its Message-ID header, including the angle brackets ('<' and '>').

Returns Email

Arguments
  1. messageID - String!
Example Query
query message($messageID: String!) {
    message(messageID: $messageID) {
        id
        sender {
            ...Entity
        }
        received
        date
        subject
        messageID
        inReplyTo
        header
        addressList {
            ...Mailbox
        }
        body
        envelope
        thread {
            ...Thread
        }
        parent {
            ...Email
        }
        patch {
            ...Patch
        }
        patchset {
            ...Patchset
        }
        list {
            ...MailingList
        }
    }
}

patchset

@access(scope:EMAILS, kind:RO)

Looks up a patchset by ID

Returns Patchset

Arguments
  1. id - Int!
Example Query
query patchset($id: Int!) {
    patchset(id: $id) {
        id
        created
        updated
        subject
        version
        prefix
        status
        submitter {
            ...Entity
        }
        coverLetter {
            ...Email
        }
        thread {
            ...Thread
        }
        supersededBy {
            ...Patchset
        }
        list {
            ...MailingList
        }
        patches {
            ...EmailCursor
        }
        tools {
            ...PatchsetTool
        }
        mbox
    }
}

subscriptions

@access(scope:SUBSCRIPTIONS, kind:RO)

List of subscriptions of the authenticated user

Returns ActivitySubscriptionCursor

Arguments
  1. cursor - Cursor
Example Query
query subscriptions($cursor: Cursor) {
    subscriptions(cursor: $cursor) {
        results {
            ...ActivitySubscription
        }
        cursor
    }
}

user

@access(scope:PROFILE, kind:RO)

Looks up a specific user

Returns User

Arguments
  1. username - String!
Example Query
query user($username: String!) {
    user(username: $username) {
        id
        created
        updated
        canonicalName
        username
        email
        url
        location
        bio
        list {
            ...MailingList
        }
        lists {
            ...MailingListCursor
        }
        emails {
            ...EmailCursor
        }
        threads {
            ...ThreadCursor
        }
        patches {
            ...PatchsetCursor
        }
    }
}

userWebhook

Returns details of a user webhook subscription by its ID.

Returns WebhookSubscription

Arguments
  1. id - Int!
Example Query
query userWebhook($id: Int!) {
    userWebhook(id: $id) {
        id
        events
        query
        url
        client {
            ...OAuthClient
        }
        deliveries {
            ...WebhookDeliveryCursor
        }
        sample
    }
}

userWebhooks

Returns a list of user webhook subscriptions. For clients authenticated with a personal access token, this returns all webhooks configured by all GraphQL clients for your account. For clients authenticated with an OAuth 2.0 access token, this returns only webhooks registered for your client.

Returns WebhookSubscriptionCursor!

Arguments
  1. cursor - Cursor
Example Query
query userWebhooks($cursor: Cursor) {
    userWebhooks(cursor: $cursor) {
        results {
            ...WebhookSubscription
        }
        cursor
    }
}

version

Returns API version information

Returns Version!

Example Query
query version {
    version {
        major
        minor
        patch
        deprecationDate
    }
}

webhook

Returns information about the webhook currently being processed. This is not valid during normal queries over HTTP, and will return an error if used outside of a webhook context.

Returns WebhookPayload!

Example Query
query webhook {
    webhook {
        uuid
        event
        date
    }
}

Mutations

archiveMessage

Archives an email (RFC 2045 MIME message) into a mailing list. Internal use only.

Returns Boolean!

Arguments
  1. listID - Int!
  2. message - Upload!
Example Query
query archiveMessage($listID: Int!, $message: Upload!) {
    archiveMessage(listID: $listID, message: $message) {
    }
}

confirmSubscription

Confirm a subscription request with a token previously obtained with requestSubscription().

Internal use only.

Returns MailingListSubscription!

Arguments
  1. token - ConfirmationToken!
  2. email - String!
Example Query
query confirmSubscription($token: ConfirmationToken!, $email: String!) {
    confirmSubscription(token: $token, email: $email) {
        id
        created
        list {
            ...MailingList
        }
        subscriber {
            ...Entity
        }
    }
}

confirmUnsubscription

Confirm an unsubscription request with a token previously obtained with requestUnsubscription().

Internal use only.

Returns MailingListSubscription!

Arguments
  1. token - ConfirmationToken!
  2. email - String!
Example Query
query confirmUnsubscription($token: ConfirmationToken!, $email: String!) {
    confirmUnsubscription(token: $token, email: $email) {
        id
        created
        list {
            ...MailingList
        }
        subscriber {
            ...Entity
        }
    }
}

createMailingList

@access(scope:LISTS, kind:RW)

Creates a new mailing list

Returns MailingList!

Arguments
  1. name - String!
  2. description - String
  3. visibility - Visibility!
Example Query
query createMailingList($name: String!, $description: String, $visibility: Visibility!) {
    createMailingList(name: $name, description: $description, visibility: $visibility) {
        id
        created
        updated
        name
        owner {
            ...Entity
        }
        description
        visibility
        permitMime
        rejectMime
        threads {
            ...ThreadCursor
        }
        emails {
            ...EmailCursor
        }
        patches {
            ...PatchsetCursor
        }
        message {
            ...Email
        }
        importing
        access {
            ...ACL
        }
        subscription {
            ...MailingListSubscription
        }
        archive
        last30days
        acl {
            ...MailingListACLCursor
        }
        defaultACL {
            ...GeneralACL
        }
        webhooks {
            ...WebhookSubscriptionCursor
        }
        webhook {
            ...WebhookSubscription
        }
        subscriptions {
            ...MailingListSubscription
        }
        userACL {
            ...GeneralACL
        }
    }
}

createMailingListWebhook

Creates a new mailing list webhook.

Returns WebhookSubscription!

Arguments
  1. listId - Int!
  2. config - MailingListWebhookInput!
Example Query
query createMailingListWebhook($listId: Int!, $config: MailingListWebhookInput!) {
    createMailingListWebhook(listId: $listId, config: $config) {
        id
        events
        query
        url
        client {
            ...OAuthClient
        }
        deliveries {
            ...WebhookDeliveryCursor
        }
        sample
    }
}

createTool

@access(scope:PATCHES, kind:RW)

Create a new patchset tool

Returns PatchsetTool

Arguments
  1. patchsetID - Int!
  2. details - String!
  3. icon - ToolIcon!
Example Query
query createTool($patchsetID: Int!, $details: String!, $icon: ToolIcon!) {
    createTool(patchsetID: $patchsetID, details: $details, icon: $icon) {
        id
        created
        updated
        icon
        details
        patchset {
            ...Patchset
        }
    }
}

createUserWebhook

Creates a new user webhook subscription. When an event from the provided list of events occurs, the 'query' parameter (a GraphQL query) will be evaluated and the results will be sent to the provided URL as the body of an HTTP POST request. The list of events must include at least one event, and no duplicates.

This query is evaluated in the webhook context, such that query { webhook } may be used to access details of the event which trigged the webhook. The query may not make any mutations.

Returns WebhookSubscription!

Arguments
  1. config - UserWebhookInput!
Example Query
query createUserWebhook($config: UserWebhookInput!) {
    createUserWebhook(config: $config) {
        id
        events
        query
        url
        client {
            ...OAuthClient
        }
        deliveries {
            ...WebhookDeliveryCursor
        }
        sample
    }
}

deleteACL

@access(scope:ACLS, kind:RW)

Removes a mailing list ACL. Following this, the default mailing list ACL will apply to this user.

Returns MailingListACL

Arguments
  1. id - Int!
Example Query
query deleteACL($id: Int!) {
    deleteACL(id: $id) {
        id
        created
        list {
            ...MailingList
        }
        entity {
            ...Entity
        }
        browse
        reply
        post
        moderate
    }
}

deleteMailingList

@access(scope:LISTS, kind:RW)

Deletes a mailing list

Returns MailingList

Arguments
  1. id - Int!
Example Query
query deleteMailingList($id: Int!) {
    deleteMailingList(id: $id) {
        id
        created
        updated
        name
        owner {
            ...Entity
        }
        description
        visibility
        permitMime
        rejectMime
        threads {
            ...ThreadCursor
        }
        emails {
            ...EmailCursor
        }
        patches {
            ...PatchsetCursor
        }
        message {
            ...Email
        }
        importing
        access {
            ...ACL
        }
        subscription {
            ...MailingListSubscription
        }
        archive
        last30days
        acl {
            ...MailingListACLCursor
        }
        defaultACL {
            ...GeneralACL
        }
        webhooks {
            ...WebhookSubscriptionCursor
        }
        webhook {
            ...WebhookSubscription
        }
        subscriptions {
            ...MailingListSubscription
        }
        userACL {
            ...GeneralACL
        }
    }
}

deleteMailingListWebhook

Deletes a mailing list webhook.

Returns WebhookSubscription!

Arguments
  1. id - Int!
Example Query
query deleteMailingListWebhook($id: Int!) {
    deleteMailingListWebhook(id: $id) {
        id
        events
        query
        url
        client {
            ...OAuthClient
        }
        deliveries {
            ...WebhookDeliveryCursor
        }
        sample
    }
}

deleteUser

Deletes the authenticated user's account. Internal use only.

Returns Int!

Example Query
query deleteUser {
    deleteUser {
    }
}

deleteUserWebhook

Deletes a user webhook. Any events already queued may still be delivered after this request completes. Clients authenticated with a personal access token may delete any webhook registered for their account, but authorized OAuth 2.0 clients may only delete their own webhooks. Manually deleting a webhook configured by a third-party client may cause unexpected behavior with the third-party integration.

Returns WebhookSubscription!

Arguments
  1. id - Int!
Example Query
query deleteUserWebhook($id: Int!) {
    deleteUserWebhook(id: $id) {
        id
        events
        query
        url
        client {
            ...OAuthClient
        }
        deliveries {
            ...WebhookDeliveryCursor
        }
        sample
    }
}

importMailingListSpool

@access(scope:LISTS, kind:RW)

Imports a mail spool (must be in the Mbox format)

Returns Boolean!

Arguments
  1. listID - Int!
  2. spool - Upload!
Example Query
query importMailingListSpool($listID: Int!, $spool: Upload!) {
    importMailingListSpool(listID: $listID, spool: $spool) {
    }
}

mailingListSubscribe

@access(scope:SUBSCRIPTIONS, kind:RW)

Creates a mailing list subscription

Returns MailingListSubscription

Arguments
  1. listID - Int!
Example Query
query mailingListSubscribe($listID: Int!) {
    mailingListSubscribe(listID: $listID) {
        id
        created
        list {
            ...MailingList
        }
        subscriber {
            ...Entity
        }
    }
}

mailingListUnsubscribe

@access(scope:SUBSCRIPTIONS, kind:RW)

Deletes a mailing list subscription

Returns MailingListSubscription

Arguments
  1. listID - Int!
Example Query
query mailingListUnsubscribe($listID: Int!) {
    mailingListUnsubscribe(listID: $listID) {
        id
        created
        list {
            ...MailingList
        }
        subscriber {
            ...Entity
        }
    }
}

requestSubscription

Request a subscription to a mailing list for a given email address. If the email is linked to a registered account, the subscription will be associated to the account. Otherwise, it will be associated to the mailbox. If a pending subscription request already exists for that list and email pair, the existing confirmation token will be returned.

Internal use only.

Returns ConfirmationToken!

Arguments
  1. listID - Int!
  2. email - String!
Example Query
query requestSubscription($listID: Int!, $email: String!) {
    requestSubscription(listID: $listID, email: $email) {
    }
}

requestUnsubscription

Request unsubscription from a mailing list for a given email address.

Internal use only.

Returns ConfirmationToken!

Arguments
  1. listID - Int!
  2. email - String!
Example Query
query requestUnsubscription($listID: Int!, $email: String!) {
    requestUnsubscription(listID: $listID, email: $email) {
    }
}

triggerListEmailWebhooks

Returns Email!

Arguments
  1. listId - Int!
  2. emailId - Int!
Example Query
query triggerListEmailWebhooks($listId: Int!, $emailId: Int!) {
    triggerListEmailWebhooks(listId: $listId, emailId: $emailId) {
        id
        sender {
            ...Entity
        }
        received
        date
        subject
        messageID
        inReplyTo
        header
        addressList {
            ...Mailbox
        }
        body
        envelope
        thread {
            ...Thread
        }
        parent {
            ...Email
        }
        patch {
            ...Patch
        }
        patchset {
            ...Patchset
        }
        list {
            ...MailingList
        }
    }
}

triggerUserEmailWebhooks

Triggers user webhooks for an email.

The result can be null if the user does not have browse access to the archived email. In this case, no webhook will be triggered.

Returns Email

Arguments
  1. emailId - Int!
Example Query
query triggerUserEmailWebhooks($emailId: Int!) {
    triggerUserEmailWebhooks(emailId: $emailId) {
        id
        sender {
            ...Entity
        }
        received
        date
        subject
        messageID
        inReplyTo
        header
        addressList {
            ...Mailbox
        }
        body
        envelope
        thread {
            ...Thread
        }
        parent {
            ...Email
        }
        patch {
            ...Patch
        }
        patchset {
            ...Patchset
        }
        list {
            ...MailingList
        }
    }
}

updateMailingList

@access(scope:LISTS, kind:RW)

Updates a mailing list.

Returns MailingList

Arguments
  1. id - Int!
  2. input - MailingListInput!
Example Query
query updateMailingList($id: Int!, $input: MailingListInput!) {
    updateMailingList(id: $id, input: $input) {
        id
        created
        updated
        name
        owner {
            ...Entity
        }
        description
        visibility
        permitMime
        rejectMime
        threads {
            ...ThreadCursor
        }
        emails {
            ...EmailCursor
        }
        patches {
            ...PatchsetCursor
        }
        message {
            ...Email
        }
        importing
        access {
            ...ACL
        }
        subscription {
            ...MailingListSubscription
        }
        archive
        last30days
        acl {
            ...MailingListACLCursor
        }
        defaultACL {
            ...GeneralACL
        }
        webhooks {
            ...WebhookSubscriptionCursor
        }
        webhook {
            ...WebhookSubscription
        }
        subscriptions {
            ...MailingListSubscription
        }
        userACL {
            ...GeneralACL
        }
    }
}

updateMailingListACL

@access(scope:ACLS, kind:RW)

Updates the default ACL for a mailing list, which applies to users and senders for whom a more specific ACL does not exist.

Returns MailingList

Arguments
  1. listID - Int!
  2. input - ACLInput!
Example Query
query updateMailingListACL($listID: Int!, $input: ACLInput!) {
    updateMailingListACL(listID: $listID, input: $input) {
        id
        created
        updated
        name
        owner {
            ...Entity
        }
        description
        visibility
        permitMime
        rejectMime
        threads {
            ...ThreadCursor
        }
        emails {
            ...EmailCursor
        }
        patches {
            ...PatchsetCursor
        }
        message {
            ...Email
        }
        importing
        access {
            ...ACL
        }
        subscription {
            ...MailingListSubscription
        }
        archive
        last30days
        acl {
            ...MailingListACLCursor
        }
        defaultACL {
            ...GeneralACL
        }
        webhooks {
            ...WebhookSubscriptionCursor
        }
        webhook {
            ...WebhookSubscription
        }
        subscriptions {
            ...MailingListSubscription
        }
        userACL {
            ...GeneralACL
        }
    }
}

updatePatchset

@access(scope:PATCHES, kind:RW)

Updates the status of a patchset

Returns Patchset

Arguments
  1. id - Int!
  2. status - PatchsetStatus!
Example Query
query updatePatchset($id: Int!, $status: PatchsetStatus!) {
    updatePatchset(id: $id, status: $status) {
        id
        created
        updated
        subject
        version
        prefix
        status
        submitter {
            ...Entity
        }
        coverLetter {
            ...Email
        }
        thread {
            ...Thread
        }
        supersededBy {
            ...Patchset
        }
        list {
            ...MailingList
        }
        patches {
            ...EmailCursor
        }
        tools {
            ...PatchsetTool
        }
        mbox
    }
}

updateSenderACL

@access(scope:ACLS, kind:RW)

Adds or updates the ACL for an email address on a mailing list

Returns MailingListACL

Arguments
  1. listID - Int!
  2. address - String!
  3. input - ACLInput!
Example Query
query updateSenderACL($listID: Int!, $address: String!, $input: ACLInput!) {
    updateSenderACL(listID: $listID, address: $address, input: $input) {
        id
        created
        list {
            ...MailingList
        }
        entity {
            ...Entity
        }
        browse
        reply
        post
        moderate
    }
}

updateTool

@access(scope:PATCHES, kind:RW)

Updates the status of a patchset tool by its ID

Returns PatchsetTool

Arguments
  1. id - Int!
  2. details - String
  3. icon - ToolIcon
Example Query
query updateTool($id: Int!, $details: String, $icon: ToolIcon) {
    updateTool(id: $id, details: $details, icon: $icon) {
        id
        created
        updated
        icon
        details
        patchset {
            ...Patchset
        }
    }
}

updateUserACL

@access(scope:ACLS, kind:RW)

Adds or updates the ACL for a user on a mailing list

Returns MailingListACL

Arguments
  1. listID - Int!
  2. userID - Int!
  3. input - ACLInput!
Example Query
query updateUserACL($listID: Int!, $userID: Int!, $input: ACLInput!) {
    updateUserACL(listID: $listID, userID: $userID, input: $input) {
        id
        created
        list {
            ...MailingList
        }
        entity {
            ...Entity
        }
        browse
        reply
        post
        moderate
    }
}

Definitions

ACL

Fields
  1. browse - Boolean!
    • Permission to browse or subscribe to emails
  2. reply - Boolean!
    • Permission to reply to existing threads
  3. post - Boolean!
    • Permission to start new threads
  4. moderate - Boolean!
    • Permission to moderate the list

ACLInput

Fields
  1. browse - Boolean!
  2. reply - Boolean!
  3. post - Boolean!
  4. moderate - Boolean!

AccessKind

Enum Values
  1. RO
  2. RW

AccessScope

Enum Values
  1. ACLS
  2. EMAILS
  3. LISTS
  4. PATCHES
  5. PROFILE
  6. SUBSCRIPTIONS

ActivitySubscription

Fields
  1. id - Int!
  2. created - Time!

ActivitySubscriptionCursor

A cursor for enumerating subscriptions

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [ActivitySubscription]!
  2. cursor - Cursor

Boolean

The Boolean scalar type represents true or false.

ByteRange

A byte range.

Fields
  1. start - Int!
    • Inclusive start byte offset.
  2. end - Int!
    • Exclusive end byte offset.

ConfirmationToken

Confirmation token associated with a subscription request

Cursor

Opaque string

Email

Fields
  1. id - Int!
  2. sender - Entity!
    • The entity which sent this email. Will be a User if it can be associated with an account, or a Mailbox otherwise.
  3. received - Time!
    • Time we received this email (non-forgable).
  4. date - Time
    • Time given by Date header (forgable).
  5. subject - String!
    • The Subject header.
  6. messageID - String!
    • The Message-ID header, without angle brackets.
  7. inReplyTo - String
    • The In-Reply-To header, if present, without angle brackets.
  8. header - [String]!
    • Provides the value (or values) of a specific header from this email. Note that the returned value is coerced to UTF-8 and may be lossy under certain circumstances.
  9. addressList - [Mailbox]!
    • Retrieves the value of an address list header, such as To or Cc.
  10. body - String!
    • The decoded text/plain message part of the email, i.e. email body.
  11. envelope - URL!
    • A URL from which the full raw message envelope may be downloaded.
  12. thread - Thread!
  13. parent - Email
  14. patch - Patch
  15. patchset - Patchset
  16. list - MailingList!

EmailCursor

A cursor for enumerating emails

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [Email]!
  2. cursor - Cursor

EmailEvent

Fields
  1. uuid - String!
  2. event - WebhookEvent!
  3. date - Time!
  4. email - Email!

Entity

Fields
  1. canonicalName - String!

Float

The Float scalar type represents signed double-precision fractional values as specified by IEEE 754.

GeneralACL

An ACL entry that applies "generally", for example the rights which apply to all subscribers to a list.

Fields
  1. browse - Boolean!
  2. reply - Boolean!
  3. post - Boolean!
  4. moderate - Boolean!

ID

The ID scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as "4") or integer (such as 4) input value will be accepted as an ID.

Int

The Int scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.

Mailbox

A mailbox not associated with a registered user

Fields
  1. canonicalName - String!
  2. name - String!
  3. address - String!

MailingList

Fields
  1. id - Int!
  2. created - Time!
  3. updated - Time!
  4. name - String!
  5. owner - Entity!
  6. description - String
  7. visibility - Visibility!
  8. permitMime - [String]!
    • List of globs for permitted or rejected mimetypes on this list e.g. text/*
  9. rejectMime - [String]!
  10. threads - ThreadCursor!
    • List of threads on this list in order of most recently bumped
  11. emails - EmailCursor!
    • List of emails received on this list in reverse chronological order
  12. patches - PatchsetCursor!
    • List of patches received on this list in order of most recently bumped
  13. message - Email
    • Get a specific email archived in this list by its Message-ID
  14. importing - Boolean!
    • True if an import operation is underway for this list
  15. access - ACL!
    • The access that applies to this user for this list
  16. subscription - MailingListSubscription
    • @access(scope:SUBSCRIPTIONS, kind:RO)
    • The user's subscription for this list, if any
  17. archive - URL!
    • URLs to application/mbox archives for this mailing list
  18. last30days - URL!
  19. acl - MailingListACLCursor!
    • Access control list entries for this mailing list
  20. defaultACL - GeneralACL!
  21. webhooks - WebhookSubscriptionCursor!
    • Returns a list of mailing list webhook subscriptions. For clients authenticated with a personal access token, this returns all webhooks configured by all GraphQL clients for your account. For clients authenticated with an OAuth 2.0 access token, this returns only webhooks registered for your client.
  22. webhook - WebhookSubscription
    • Returns details of a mailing list webhook subscription by its ID.
  23. subscriptions - [MailingListSubscription]!
    • Get the list of subscriptions to this mailing list. Internal use only.
  24. userACL - GeneralACL!
    • Get access permissions for a specific user by their email address. If there is a related ACL entry for the given email address or an account linked to that address, it will be returned. Otherwise, the default ACL of the mailing list will be returned. Internal use only.

MailingListACL

These ACLs are configured for specific entities, and may be used to expand or constrain the rights of a participant.

Fields
  1. id - Int!
  2. created - Time!
  3. list - MailingList!
  4. entity - Entity!
  5. browse - Boolean!
  6. reply - Boolean!
  7. post - Boolean!
  8. moderate - Boolean!

MailingListACLCursor

A cursor for enumerating ACL entries

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [MailingListACL]!
  2. cursor - Cursor

MailingListCursor

A cursor for enumerating mailing lists

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [MailingList]!
  2. cursor - Cursor

MailingListEvent

Fields
  1. uuid - String!
  2. event - WebhookEvent!
  3. date - Time!
  4. list - MailingList!

MailingListInput

Fields
  1. description - String
  2. visibility - Visibility
  3. permitMime - [String]
    • List of globs for permitted or rejected mimetypes on this list e.g. text/*
  4. rejectMime - [String]

MailingListSubscription

Fields
  1. id - Int!
  2. created - Time!
  3. list - MailingList!
  4. subscriber - Entity

MailingListWebhookInput

Fields
  1. url - String!
  2. events - [WebhookEvent]!
  3. query - String!

MailingListWebhookSubscription

Fields
  1. id - Int!
  2. events - [WebhookEvent]!
  3. query - String!
  4. url - String!
  5. client - OAuthClient
  6. deliveries - WebhookDeliveryCursor!
  7. sample - String!
  8. list - MailingList!

OAuthClient

Fields
  1. uuid - String!

Patch

Information parsed from the subject line of a patch, such that the following:

[PATCH myproject v2 3/4] Add foo to bar

Will produce:

index: 3
count: 4
version: 2
prefix: "myproject"
subject: "Add foo to bar"
Fields
  1. index - Int
  2. count - Int
  3. version - Int
  4. prefix - String
  5. subject - String

Patchset

Fields
  1. id - Int!
  2. created - Time!
  3. updated - Time!
  4. subject - String!
  5. version - Int!
  6. prefix - String
  7. status - PatchsetStatus!
  8. submitter - Entity!
  9. coverLetter - Email
  10. thread - Thread!
  11. supersededBy - Patchset
  12. list - MailingList!
  13. patches - EmailCursor!
  14. tools - [PatchsetTool]!
  15. mbox - URL!
    • URL to an application/mbox archive of only the patches in this thread

PatchsetCursor

A cursor for enumerating patchsets

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [Patchset]!
  2. cursor - Cursor

PatchsetEvent

Fields
  1. uuid - String!
  2. event - WebhookEvent!
  3. date - Time!
  4. patchset - Patchset!

PatchsetStatus

Enum Values
  1. UNKNOWN
  2. PROPOSED
  3. NEEDS_REVISION
  4. SUPERSEDED
  5. APPROVED
  6. REJECTED
  7. APPLIED

PatchsetTool

Used to add some kind of indicator for a third-party process associated with a patchset, such as a CI service validating the change.

Fields
  1. id - Int!
  2. created - Time!
  3. updated - Time!
  4. icon - ToolIcon!
  5. details - String!
  6. patchset - Patchset!

String

The Stringscalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Thread

Fields
  1. created - Time!
  2. updated - Time!
  3. subject - String!
  4. replies - Int!
  5. participants - Int!
  6. sender - Entity!
  7. root - Email!
  8. list - MailingList!
  9. descendants - EmailCursor!
    • Replies to this thread, in chronological order
  10. mailto - String!
    • A mailto: URI for replying to the latest message in this thread
  11. mbox - URL!
    • URL to an application/mbox archive of this thread
  12. blocks - [ThreadBlock]!
    • Thread parsed as a tree. The returned list is never empty. The first item is guaranteed to be the root message. The blocks are sorted in topological order.

ThreadBlock

A block of text in an email thread.

Blocks are parts of a message's body that aren't quotes of the parent message. A block can be a reply to a parent block, in which case the parentStart and parentEnd fields indicate which part of the parent message is replied to. A block can have replies, each of which will be represented by a block in the children field.

Fields
  1. key - String!
    • Unique identifier for this block.
  2. body - String!
    • The block's plain-text content.
  3. parent - Int
    • Index of the parent block (if any) in Thread.blocks.
  4. children - [Int]!
    • Replies to this block. The list items are indexes into Thread.blocks.
  5. source - Email!
    • The email this block comes from.
  6. sourceRange - ByteRange!
    • The range of this block in the source email body.
  7. parentRange - ByteRange
    • If this block is a reply to a particular chunk of the parent block, this field indicates the range of that chunk in the parent's email body.

ThreadCursor

A cursor for enumerating threads

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [Thread]!
  2. cursor - Cursor

Time

String of the format %Y-%m-%dT%H:%M:%SZ

ToolIcon

Enum Values
  1. PENDING
  2. WAITING
  3. SUCCESS
  4. FAILED
  5. CANCELLED

URL

URL from which some secondary data may be retrieved. You must provide the same Authentication header to this address as you did to the GraphQL resolver which provided it. The URL is not guaranteed to be consistent for an extended length of time; applications should submit a new GraphQL query each time they wish to access the data at the provided URL.

Upload

User

A registered user

Fields
  1. id - Int!
  2. created - Time!
  3. updated - Time!
  4. canonicalName - String!
  5. username - String!
  6. email - String!
  7. url - String
  8. location - String
  9. bio - String
  10. list - MailingList
  11. lists - MailingListCursor!
  12. emails - EmailCursor!
  13. threads - ThreadCursor!
  14. patches - PatchsetCursor!

UserWebhookInput

Fields
  1. url - String!
  2. events - [WebhookEvent]!
  3. query - String!

UserWebhookSubscription

Fields
  1. id - Int!
  2. events - [WebhookEvent]!
  3. query - String!
  4. url - String!
  5. client - OAuthClient
  6. deliveries - WebhookDeliveryCursor!
  7. sample - String!

Version

Fields
  1. major - Int!
  2. minor - Int!
  3. patch - Int!
  4. deprecationDate - Time
    • If this API version is scheduled for deprecation, this is the date on which it will stop working; or null if this API version is not scheduled for deprecation.

Visibility

Enum Values
  1. PUBLIC
  2. UNLISTED
  3. PRIVATE

WebhookDelivery

Fields
  1. uuid - String!
  2. date - Time!
  3. event - WebhookEvent!
  4. subscription - WebhookSubscription!
  5. requestBody - String!
  6. responseBody - String
    • These details are provided only after a response is received from the remote server. If a response is sent whose Content-Type is not text/*, or cannot be decoded as UTF-8, the response body will be null. It will be truncated after 64 KiB.
  7. responseHeaders - String
  8. responseStatus - Int

WebhookDeliveryCursor

A cursor for enumerating a list of webhook deliveries

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [WebhookDelivery]!
  2. cursor - Cursor

WebhookEvent

Enum Values
  1. LIST_CREATED
  2. LIST_UPDATED
  3. LIST_DELETED
  4. EMAIL_RECEIVED
  5. PATCHSET_RECEIVED

WebhookPayload

Fields
  1. uuid - String!
  2. event - WebhookEvent!
  3. date - Time!

WebhookSubscription

Fields
  1. id - Int!
  2. events - [WebhookEvent]!
  3. query - String!
  4. url - String!
  5. client - OAuthClient
    • If this webhook was registered by an authorized OAuth 2.0 client, this field is non-null.
  6. deliveries - WebhookDeliveryCursor!
    • All deliveries which have been sent to this webhook.
  7. sample - String!
    • Returns a sample payload for this subscription, for testing purposes

WebhookSubscriptionCursor

A cursor for enumerating a list of webhook subscriptions

If there are additional results available, the cursor object may be passed back into the same endpoint to retrieve another page. If the cursor is null, there are no remaining results to return.

Fields
  1. results - [WebhookSubscription]!
  2. cursor - Cursor

Directives

@access

Decorates fields for which access requires a particular OAuth 2.0 scope with read or write access.

Arguments
  1. scope - AccessScope!
  2. kind - AccessKind!

@defer

Directs the executor to defer this fragment when the if argument is true or undefined.

Arguments
  1. if - Boolean
    • Deferred when true or undefined.
  2. label - String
    • Unique name

@deprecated

Marks an element of a GraphQL schema as no longer supported.

Arguments
  1. reason - String
    • Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).

@include

Directs the executor to include this field or fragment only when the if argument is true.

Arguments
  1. if - Boolean!
    • Included when true.

@internal

This is used to decorate fields which are for internal use, and are not available to normal API users.

@oneOf

Indicates exactly one field must be supplied and this field must not be null.

@private

This is used to decorate fields which are only accessible with a personal access token, and are not available to clients using OAuth 2.0 access tokens.

@scopehelp

Used to provide a human-friendly description of an access scope

Arguments
  1. details - String!

@skip

Directs the executor to skip this field or fragment when the if argument is true.

Arguments
  1. if - Boolean!
    • Skipped when true.

@specifiedBy

Exposes a URL that specifies the behavior of this scalar.

Arguments
  1. url - String!
    • The URL that specifies the behavior of this scalar.