com.atiproto.repo.subscription.count

atiproto.com

{
  "id": "com.atiproto.repo.subscription.count",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "count"
          ],
          "properties": {
            "count": {
              "type": "integer",
              "description": "Number of active subscriptions matching the filter"
            },
            "amount": {
              "type": "integer",
              "description": "Sum of all subscription amounts in cents. Only returned when the authenticated user is the subject/owner of the target (or when counting their own active subscriptions)."
            },
            "currency": {
              "type": "string",
              "maxLength": 3,
              "description": "Currency of the summed amount. Only returned when the authenticated user is the subject/owner of the target (or when counting their own active subscriptions)."
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "endDate": {
            "type": "string",
            "format": "datetime",
            "description": "Only count subscriptions whose billingStartDate is at or before this timestamp"
          },
          "subject": {
            "type": "string",
            "format": "did",
            "description": "DID of the user being subscribed to. If omitted, the query counts subscriptions the authenticated user has active as the subscriber."
          },
          "startDate": {
            "type": "string",
            "format": "datetime",
            "description": "Only count subscriptions whose billingStartDate is at or after this timestamp"
          }
        }
      },
      "description": "Count active subscriptions. If subject is provided, counts subscriptions received by that DID. If omitted, counts subscriptions the authenticated user has active (as the subscriber). Optionally filtered by a start/end datetime window (matching billingStartDate). When the authenticated user is the subject/owner of the target, the response also includes the sum of amounts."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}

Validate Record

Validate a record against com.atiproto.repo.subscription.count

Validation Options
Treat any remaining unresolved references as valid

Metadata

DID
did:plc:4x5dcv6u4wlkjcssto7f22nu
CID
bafyreiauult5aredxzh4uije665shktp44ru7so3ocdaikgadycaf6v4oa
Indexed At
2026-04-19 18:53 UTC
AT-URI
at://did:plc:4x5dcv6u4wlkjcssto7f22nu/com.atproto.lexicon.schema/com.atiproto.repo.subscription.count

Lexicon Garden

@