com.atiproto.repo.subscription.count

atiproto.com

Documentation

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.

main query

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.

Parameters

endDate string datetime Optional

Only count subscriptions whose billingStartDate is at or before this timestamp

startDate string datetime Optional

Only count subscriptions whose billingStartDate is at or after this timestamp

subject string did Optional

DID of the user being subscribed to. If omitted, the query counts subscriptions the authenticated user has active as the subscriber.

Output

Encodingapplication/json
amount integer Optional

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).

count integer Required

Number of active subscriptions matching the filter

currency string Optional

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).

Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Only count subscriptions whose billingStartDate is at or before this timestamp
Only count subscriptions whose billingStartDate is at or after this timestamp
DID of the user being subscribed to. If omitted, the query counts subscriptions the authenticated user has active as the subscriber.
View raw schema
{
  "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."
}

Lexicon Garden

@