API referenceAudience Counts
Get an audience count
Its status, and the number once it’s done. Counts are kept for a day.
GET
Its status, and the number once it’s done. Counts are kept for a day.
apiKey readheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: read
id*stringFormat
uuidOK
application/json- response
id*stringFormat
uuidstatus*stringValue in
"queued""running""done""failed""cancelled"count*integer|nullerror*string|nullcreatedAt*stringFormat
date-timestartedAt*|Format
date-timefinishedAt*|Format
date-timecurl -X GET 'https://api.postforge.dev/v1/audience-counts/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "status": "queued", "count": 0, "error": "string", "createdAt": "2019-08-24T14:15:22Z", "startedAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z"}Count an audience POST
Starts counting the profiles (the known ones the profiles list shows) that meet `conditions`, or a segment’s: its published version or its draft. Answers at once with the count’s id; read it until it’s `done`. A condition that can’t be answered is a 400 with its path, before anything is counted.
Cancel an audience count POST
Stops it where it is; a count that’s done stays as it is.