meta.sr.ht API Documentation
Queries
auditLog
@access(scope:AUDIT_LOG, kind:RO)
Returns the audit log for the authenticated user.
Returns AuditLogCursor!
Argumentscursor
- Cursor
Example Query
query auditLog($cursor: Cursor) {
auditLog(cursor: $cursor) {
results {
...AuditLogEntry
}
cursor
}
}
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
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
myOauthGrant
Returns the current OAuth grant in use, if any
Returns OAuthGrant
Example Query
query myOauthGrant {
myOauthGrant {
id
client {
...OAuthClient
}
issued
expires
tokenHash
grants
}
}
oauthClientByID
Returns a specific OAuth client (by database ID)
Returns OAuthClient
Argumentsid
- Int!
Example Query
query oauthClientByID($id: Int!) {
oauthClientByID(id: $id) {
id
uuid
redirectUrl
name
description
url
owner {
...Entity
}
}
}
oauthClientByUUID
Returns a specific OAuth client (by UUID)
Returns OAuthClient
Argumentsuuid
- String!
Example Query
query oauthClientByUUID($uuid: String!) {
oauthClientByUUID(uuid: $uuid) {
id
uuid
redirectUrl
name
description
url
owner {
...Entity
}
}
}
oauthClients
List of OAuth clients this user administrates
Returns [OAuthClient]!
Example Query
query oauthClients {
oauthClients {
id
uuid
redirectUrl
name
description
url
owner {
...Entity
}
}
}
oauthGrants
Returns OAuth grants issued for the authenticated user
Returns [OAuthGrant]!
Example Query
query oauthGrants {
oauthGrants {
id
client {
...OAuthClient
}
issued
expires
tokenHash
grants
}
}
personalAccessTokens
Returns a list of personal OAuth tokens issued
Returns [OAuthPersonalToken]!
Example Query
query personalAccessTokens {
personalAccessTokens {
id
issued
expires
comment
grants
}
}
pgpKeyByFingerprint
@access(scope:PGP_KEYS, kind:RO)
Returns a specific PGP key by its fingerprint, in hexadecimal.
Returns PGPKey
Argumentsfingerprint
- String!
Example Query
query pgpKeyByFingerprint($fingerprint: String!) {
pgpKeyByFingerprint(fingerprint: $fingerprint) {
id
created
user {
...User
}
key
fingerprint
}
}
product
Returns information about a subscription product available for purchase.
Returns Product
Argumentsid
- Int!
Example Query
query product($id: Int!) {
product(id: $id) {
id
name
prices {
...ProductPrice
}
retired
}
}
products
Returns a list of paid subscriptions available for purchase.
Returns [Product]!
Example Query
query products {
products {
id
name
prices {
...ProductPrice
}
retired
}
}
profileWebhook
Returns details of a user profile webhook subscription by its ID.
Returns WebhookSubscription
Argumentsid
- Int!
Example Query
query profileWebhook($id: Int!) {
profileWebhook(id: $id) {
id
events
query
url
client {
...OAuthClient
}
deliveries {
...WebhookDeliveryCursor
}
sample
}
}
profileWebhooks
Returns a list of user profile 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!
Argumentscursor
- Cursor
Example Query
query profileWebhooks($cursor: Cursor) {
profileWebhooks(cursor: $cursor) {
results {
...WebhookSubscription
}
cursor
}
}
sshKeyByFingerprint
@access(scope:SSH_KEYS, kind:RO)
Returns a specific SSH key by its fingerprint, in hexadecimal
Returns SSHKey
Argumentsfingerprint
- String!
Example Query
query sshKeyByFingerprint($fingerprint: String!) {
sshKeyByFingerprint(fingerprint: $fingerprint) {
id
created
lastUsed
user {
...User
}
key
fingerprint
comment
username
}
}
sshKeyByFingerprintInternal
Returns SSHKey
Argumentsfingerprint
- String!
Example Query
query sshKeyByFingerprintInternal($fingerprint: String!) {
sshKeyByFingerprintInternal(fingerprint: $fingerprint) {
id
created
lastUsed
user {
...User
}
key
fingerprint
comment
username
}
}
tokenRevocationStatus
Returns the revocation status of a given OAuth 2.0 token hash (SHA-512). If the token or client ID has been revoked, this returns true, and the key should not be trusted. Client ID is optional for personal access tokens.
Returns Boolean!
ArgumentsExample Query
query tokenRevocationStatus($hash: String!, $clientId: String) {
tokenRevocationStatus(hash: $hash, clientId: $clientId) {
}
}
user
Returns a specific user by username
Returns User
Argumentsusername
- String!
Example Query
query user($username: String!) {
user(username: $username) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
userByEmail
@access(scope:PROFILE, kind:RO)
Returns User
Argumentsemail
- String!
Example Query
query userByEmail($email: String!) {
userByEmail(email: $email) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
userByID
Returns a specific user by ID
Returns User
Argumentsid
- Int!
Example Query
query userByID($id: Int!) {
userByID(id: $id) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
userByName
@access(scope:PROFILE, kind:RO)
Returns a specific user
Returns User
Argumentsusername
- String!
Example Query
query userByName($username: String!) {
userByName(username: $username) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
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
billingTransfer
Transfers billing details from one user account to another, returning the target account.
Returns User!
ArgumentsExample Query
query billingTransfer($from: String!, $to: String!) {
billingTransfer(from: $from, to: $to) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
confirmEmailChange
Confirm a user's change of email address
Returns User
Argumentstoken
- String!
Example Query
query confirmEmailChange($token: String!) {
confirmEmailChange(token: $token) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
confirmPasswordChange
Confirm a user's password change
Returns User
ArgumentsExample Query
query confirmPasswordChange($token: String!, $newPassword: String!) {
confirmPasswordChange(token: $token, newPassword: $newPassword) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
confirmRegistration
Confirm an account registration email.
Returns User
Argumentstoken
- String!
Example Query
query confirmRegistration($token: String!) {
confirmRegistration(token: $token) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
createPGPKey
@access(scope:PGP_KEYS, kind:RW)
Returns PGPKey!
Argumentskey
- String!
Example Query
query createPGPKey($key: String!) {
createPGPKey(key: $key) {
id
created
user {
...User
}
key
fingerprint
}
}
createProduct
Create a new paid product.
Returns Product!
Argumentsname
- String!prices
- [ProductPriceInput]!
Example Query
query createProduct($name: String!, $prices: [ProductPriceInput!]!) {
createProduct(name: $name, prices: $prices) {
id
name
prices {
...ProductPrice
}
retired
}
}
createSSHKey
@access(scope:SSH_KEYS, kind:RW)
Returns SSHKey!
Argumentskey
- String!
Example Query
query createSSHKey($key: String!) {
createSSHKey(key: $key) {
id
created
lastUsed
user {
...User
}
key
fingerprint
comment
username
}
}
createWebhook
Creates a new user profile 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!
Argumentsconfig
- ProfileWebhookInput!
Example Query
query createWebhook($config: ProfileWebhookInput!) {
createWebhook(config: $config) {
id
events
query
url
client {
...OAuthClient
}
deliveries {
...WebhookDeliveryCursor
}
sample
}
}
deletePGPKey
@access(scope:PGP_KEYS, kind:RW)
Returns PGPKey
Argumentsid
- Int!
Example Query
query deletePGPKey($id: Int!) {
deletePGPKey(id: $id) {
id
created
user {
...User
}
key
fingerprint
}
}
deleteSSHKey
@access(scope:SSH_KEYS, kind:RW)
Returns SSHKey
Argumentsid
- Int!
Example Query
query deleteSSHKey($id: Int!) {
deleteSSHKey(id: $id) {
id
created
lastUsed
user {
...User
}
key
fingerprint
comment
username
}
}
deleteUser
Deletes the authenticated user's account.
Returns Int!
Argumentsreserve
- Boolean!
Example Query
query deleteUser($reserve: Boolean!) {
deleteUser(reserve: $reserve) {
}
}
deleteWebhook
Deletes a user profile 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!
Argumentsid
- Int!
Example Query
query deleteWebhook($id: Int!) {
deleteWebhook(id: $id) {
id
events
query
url
client {
...OAuthClient
}
deliveries {
...WebhookDeliveryCursor
}
sample
}
}
issueAuthorizationCode
Issues an OAuth 2.0 authorization code. Used after the user has consented to the access grant request.
Returns String!
ArgumentsExample Query
query issueAuthorizationCode($clientUUID: String!, $grants: String!) {
issueAuthorizationCode(clientUUID: $clientUUID, grants: $grants) {
}
}
issueOAuthGrant
Completes the OAuth 2.0 grant process and issues an OAuth token for a specific OAuth client.
Returns OAuthGrantRegistration
ArgumentsExample Query
query issueOAuthGrant($authorization: String!, $clientUUID: String, $clientSecret: String!, $redirectUri: String) {
issueOAuthGrant(authorization: $authorization, clientUUID: $clientUUID, clientSecret: $clientSecret, redirectUri: $redirectUri) {
grant {
...OAuthGrant
}
grants
secret
refreshToken
}
}
issuePersonalAccessToken
Issues an OAuth personal access token.
Returns OAuthPersonalTokenRegistration!
ArgumentsExample Query
query issuePersonalAccessToken($grants: String, $comment: String) {
issuePersonalAccessToken(grants: $grants, comment: $comment) {
token {
...OAuthPersonalToken
}
secret
}
}
refreshOAuthGrant
Refreshes an existing OAuth 2.0 grant. This invalidates the previous grant and returns a new one.
Returns OAuthGrantRegistration
ArgumentsExample Query
query refreshOAuthGrant($refreshToken: String!, $clientUUID: String!, $clientSecret: String!, $grants: String) {
refreshOAuthGrant(refreshToken: $refreshToken, clientUUID: $clientUUID, clientSecret: $clientSecret, grants: $grants) {
grant {
...OAuthGrant
}
grants
secret
refreshToken
}
}
registerAccount
Registers a new account.
Returns User
ArgumentsExample Query
query registerAccount($email: String!, $username: String!, $password: String!, $pgpKey: String) {
registerAccount(email: $email, username: $username, password: $password, pgpKey: $pgpKey) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
registerOAuthClient
Registers an OAuth client. Only OAuth 2.0 confidental clients are supported.
Returns OAuthClientRegistration!
ArgumentsExample Query
query registerOAuthClient($redirectUri: String!, $clientName: String!, $clientDescription: String, $clientUrl: String) {
registerOAuthClient(redirectUri: $redirectUri, clientName: $clientName, clientDescription: $clientDescription, clientUrl: $clientUrl) {
client {
...OAuthClient
}
secret
}
}
resetPassword
Requests a password reset. The return value is meaningless.
Returns Int
Argumentsemail
- String!
Example Query
query resetPassword($email: String!) {
resetPassword(email: $email) {
}
}
retireProduct
Retires a paid product.
Returns Product
Argumentsid
- Int!
Example Query
query retireProduct($id: Int!) {
retireProduct(id: $id) {
id
name
prices {
...ProductPrice
}
retired
}
}
revokeOAuthClient
Revokes this OAuth client, revoking all tokens for it and preventing future use.
Returns OAuthClient
Argumentsuuid
- String!
Example Query
query revokeOAuthClient($uuid: String!) {
revokeOAuthClient(uuid: $uuid) {
id
uuid
redirectUrl
name
description
url
owner {
...Entity
}
}
}
revokeOAuthGrant
Revokes a specific OAuth grant.
Returns OAuthGrant
Argumentshash
- String!
Example Query
query revokeOAuthGrant($hash: String!) {
revokeOAuthGrant(hash: $hash) {
id
client {
...OAuthClient
}
issued
expires
tokenHash
grants
}
}
revokePersonalAccessToken
Revokes a personal access token.
Returns OAuthPersonalToken
Argumentsid
- Int!
Example Query
query revokePersonalAccessToken($id: Int!) {
revokePersonalAccessToken(id: $id) {
id
issued
expires
comment
grants
}
}
sendEmail
Send a notification email.
The 'address' parameter must be a single RFC 5322 address (e.g. "Barry Gibbs bg@example.com", or "bg@example.com"). The 'message' parameter must be a RFC 5322 compliant Internet message with the special requirement that it must not contain any recipients (i.e. no 'To', 'Cc', or 'Bcc' header).
The message will be signed with the site key. If the address is that of a registered user it will be encrypted according to the user's privacy settings.
Returns Boolean!
ArgumentsExample Query
query sendEmail($address: String!, $message: String!) {
sendEmail(address: $address, message: $message) {
}
}
subsidizeUser
Grants free service to the given user ID until the provided expiration date.
Returns User!
ArgumentsExample Query
query subsidizeUser($userID: Int!, $until: Time!) {
subsidizeUser(userID: $userID, until: $until) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
updateBillingAddress
@access(scope:BILLING, kind:RW)
Update the authenticated user's billing address.
Returns BillingAddress!
Argumentsinput
- BillingAddressInput!
Example Query
query updateBillingAddress($input: BillingAddressInput!) {
updateBillingAddress(input: $input) {
fullName
businessName
address1
address2
city
region
postcode
country
vat
}
}
updateSSHKeyLastUsed
Causes the "last used" time of this SSH key to be set to the current time.
Returns SSHKey!
Argumentsid
- Int!
Example Query
query updateSSHKeyLastUsed($id: Int!) {
updateSSHKeyLastUsed(id: $id) {
id
created
lastUsed
user {
...User
}
key
fingerprint
comment
username
}
}
updateUser
@access(scope:PROFILE, kind:RW)
Returns User!
Argumentsinput
- UserInput
Example Query
query updateUser($input: UserInput) {
updateUser(input: $input) {
id
created
updated
canonicalName
username
email
url
location
bio
sshKeys {
...SSHKeyCursor
}
pgpKeys {
...PGPKeyCursor
}
paymentStatus
paymentDue
subscription {
...BillingSubscription
}
invoices {
...InvoiceCursor
}
billingAddress {
...BillingAddress
}
userType
receivesPaidServices
suspensionNotice
}
}
Definitions
AccessKind
Enum ValuesRO
RW
AccessScope
Enum ValuesAUDIT_LOG
BILLING
PGP_KEYS
SSH_KEYS
PROFILE
AuditLogCursor
A cursor for enumerating a list of audit log 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.
Fieldsresults
- [AuditLogEntry]!cursor
- Cursor
AuditLogEntry
FieldsBillingAddress
Billing address for invoicing.
FieldsBillingAddressInput
All fields are optional. If a field is omitted, it is unchanged. If a field is null, it is set to null.
FieldsBillingSubscription
Fieldsid
- Int!user
- User!@access(scope:PROFILE, kind:RO)
created
- Time!updated
- Time!status
- SubscriptionStatus!autorenew
- Boolean!- If true, payment is automatically renewed when term ellapses.
currency
- Currency!interval
- PaymentInterval!product
- Product!- Selected product associated with this subscription.
price
- ProductPrice!- Shortcut to get the applicable price point for this subscription's product ID and applicable currency
subtotal
- Int!- Total price, not including applicable taxes, in the smallest denomination of the currency, e.g. cents USD.
Boolean
The Boolean
scalar type represents true
or false
.
Currency
Enum ValuesEUR
USD
Cursor
Entity
FieldsFloat
The Float
scalar type represents signed double-precision fractional values as specified by IEEE 754.
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.
Invoice
Fieldsid
- Int!invoiceNo
- String!issued
- Time!entity
- Entity!@access(scope:PROFILE, kind:RO)
product
- Product!serviceStart
- Time!- Start of service period for which this invoice applies
serviceEnd
- Time!- End of service period for which this invoice applies
currency
- Currency!total
- Int!- Amount charged denoted in the smallest denomination of the applicable currency, e.g. cents USD.
InvoiceCursor
A cursor for enumerating a list of invoices
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.
FieldsOAuthClient
FieldsOAuthClientRegistration
Fieldsclient
- OAuthClient!secret
- String!
OAuthGrant
FieldsOAuthGrantRegistration
Fieldsgrant
- OAuthGrant!grants
- String!secret
- String!refreshToken
- String!
OAuthPersonalToken
FieldsOAuthPersonalTokenRegistration
Fieldstoken
- OAuthPersonalToken!secret
- String!
PGPKey
FieldsPGPKeyCursor
A cursor for enumerating a list of PGP keys
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.
FieldsPGPKeyEvent
Fieldsuuid
- String!event
- WebhookEvent!date
- Time!key
- PGPKey!
PaymentInterval
Enum ValuesMONTHLY
ANNUALLY
PaymentStatus
Enum ValuesUNPAID
- User does not pay for their account
CURRENT
- User is paid and their payment is current
DELINQUENT
- User's payment has lapsed
SUBSIDIZED
- User's paid services are subsidized
FREE
- User receives paid services for free
Product
A paid product available for purchase.
Fieldsid
- Int!name
- String!prices
- [ProductPrice]!retired
- Boolean!
ProductPrice
Price point for a product in a given currency.
FieldsProductPriceInput
FieldsProfileUpdateEvent
Fieldsuuid
- String!event
- WebhookEvent!date
- Time!profile
- User!
ProfileWebhookInput
Fieldsurl
- String!events
- [WebhookEvent]!query
- String!
ProfileWebhookSubscription
Fieldsid
- Int!events
- [WebhookEvent]!query
- String!url
- String!client
- OAuthClientdeliveries
- WebhookDeliveryCursor!sample
- String!
SSHKey
FieldsSSHKeyCursor
A cursor for enumerating a list of SSH keys
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.
FieldsSSHKeyEvent
Fieldsuuid
- String!event
- WebhookEvent!date
- Time!key
- SSHKey!
String
The String
scalar 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.
SubscriptionStatus
Enum ValuesPENDING
- This subscription is pending and will become active once the first payment is successfully recieved.
SETTLEMENT
- This subscription is paid but the payment has not settled. Paid services are available while awaiting settlement.
ACTIVE
- This is the user's active subscription.
INACTIVE
- This subscription has been cancelled and the service term is complete.
Time
User
Fieldsid
- Int!created
- Time!updated
- Time!canonicalName
- String!username
- String!email
- String!url
- Stringlocation
- Stringbio
- StringsshKeys
- SSHKeyCursor!@access(scope:SSH_KEYS, kind:RO)
pgpKeys
- PGPKeyCursor!@access(scope:PGP_KEYS, kind:RO)
paymentStatus
- PaymentStatus!@access(scope:BILLING, kind:RO)
- User's current payment status. Only available if authenticated as this user.
paymentDue
- Time@access(scope:BILLING, kind:RO)
- Date at which next payment is due. Only available if authenticated as this user.
subscription
- BillingSubscription@access(scope:BILLING, kind:RO)
- Details about the user's current paid subscription. Only available if authenticated as this user.
invoices
- InvoiceCursor!@access(scope:BILLING, kind:RO)
- Returns invoices for this user. Only available if authenticated as this user.
billingAddress
- BillingAddress@access(scope:BILLING, kind:RO)
- User's billing address, if applicable, for invoicing.
userType
- UserType!- Internal user type (e.g. is admin)
receivesPaidServices
- Boolean!- Returns true if this user should have access to paid services.
suspensionNotice
- String- Notice to provide to a suspended account
UserInput
Omit these fields to leave them unchanged, or set them to null to clear their value.
FieldsUserType
Enum ValuesPENDING
USER
ADMIN
SUSPENDED
Version
FieldsWebhookDelivery
Fieldsuuid
- String!date
- Time!event
- WebhookEvent!subscription
- WebhookSubscription!requestBody
- String!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.
responseHeaders
- StringresponseStatus
- 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.
Fieldsresults
- [WebhookDelivery]!cursor
- Cursor
WebhookEvent
Enum ValuesPROFILE_UPDATE
- Used for user profile webhooks
PGP_KEY_ADDED
PGP_KEY_REMOVED
SSH_KEY_ADDED
SSH_KEY_REMOVED
WebhookPayload
Fieldsuuid
- String!event
- WebhookEvent!date
- Time!
WebhookSubscription
Fieldsid
- Int!events
- [WebhookEvent]!query
- String!url
- String!client
- OAuthClient- If this webhook was registered by an authorized OAuth 2.0 client, this field is non-null.
deliveries
- WebhookDeliveryCursor!- All deliveries which have been sent to this webhook.
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.
Fieldsresults
- [WebhookSubscription]!cursor
- Cursor
Directives
@access
Decorates fields for which access requires a particular OAuth 2.0 scope with read or write access. For the meta.sr.ht API, you have access to all public information without any special permissions - user profile information, public keys, and so on.
Argumentsscope
- AccessScope!kind
- AccessKind!
@admin
Used to decorate fields which are only available to admin accounts.
@anoninternal
Used to decorate fields which are for internal use, and are not available to normal API users.
@defer
Directs the executor to defer this fragment when the if
argument is true or undefined.
@deprecated
Marks an element of a GraphQL schema as no longer supported.
Argumentsreason
- 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.
if
- Boolean!- Included when true.
@internal
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.
Argumentsdetails
- String!
@skip
Directs the executor to skip this field or fragment when the if
argument is true.
if
- Boolean!- Skipped when true.
@specifiedBy
Exposes a URL that specifies the behavior of this scalar.
Argumentsurl
- String!- The URL that specifies the behavior of this scalar.