com.atiproto.repo.subscription.count
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.
Details · query
| Kind | query |
|---|---|
| Authority | subscription.repo.atiproto.com |
| Indexed |
Checks
Valid Lint pass{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"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.",
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"amount": {
"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).",
"type": "integer"
},
"count": {
"description": "Number of active subscriptions matching the filter",
"type": "integer"
},
"currency": {
"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).",
"maxLength": 3,
"type": "string"
}
},
"required": [
"count"
],
"type": "object"
}
},
"parameters": {
"properties": {
"endDate": {
"description": "Only count subscriptions whose billingStartDate is at or before this timestamp",
"format": "datetime",
"type": "string"
},
"startDate": {
"description": "Only count subscriptions whose billingStartDate is at or after this timestamp",
"format": "datetime",
"type": "string"
},
"subject": {
"description": "DID of the user being subscribed to. If omitted, the query counts subscriptions the authenticated user has active as the subscriber.",
"format": "did",
"type": "string"
}
},
"type": "params"
},
"type": "query"
}
},
"id": "com.atiproto.repo.subscription.count",
"lexicon": 1
}