Skip to content
Power301/API
Sign inGet API key
Short Links · link.count
GET/link/countlink.count

Count short links

Returns how many short links match the current filters — cheaper than paging through GET /link when all you need is a total.

Base URL
https://api.power301.com/v1
Auth
Bearer token
Idempotent
Yes
Returns
application/json

The request

Call GET /link/count with your bearer token. Narrow or order the result with the query parameters below.

# Count short links
curl "https://api.power301.com/v1/link/count" \
  -H "Authorization: Bearer $POWER301_TOKEN"

Query parameters

ParameterDescription
sortoptionalstringSort results by field. Prefix with - for descending order. Available sorts: id, created_at, updated_at, total_clicksid-idcreated_at-created_atupdated_at-updated_attotal_clicks-total_clicks
filteroptionalobjectFilter results by one or more fields. Available filters: id, host, path, tld, handler, type, destination, search, tags, traffic, dns_correct, status, created_after, created_before
filter[id]optionalstring
filter[host]optionalstringA hostname already connected to the workspace. See List hostnames.
filter[path]optionalstring
filter[tld]optionalstring
filter[handler]optionalstring
filter[type]optionalstringRecord type. List the available types with GET /shared/types.
filter[destination]optionalstringWhere matching traffic is sent.
filter[search]optionalstring
filter[tags]optionalstringFreeform labels. Filter on them with filter[tags].
filter[traffic]optionalstring
filter[dns_correct]optionalstring
filter[status]optionalstringThe HTTP status code used for the redirect response.
filter[created_after]optionalstring
filter[created_before]optionalstring

The response

A 200 returns the record as JSON.

{
  "total": 1,
  "paused": 1
}

Status codes

200
SuccessShort link totals for the current filter.
401
UnauthenticatedUnauthenticated
429
Too many requestsToo many requests