/v1/workspaces/{workspace_id}/segments/{segment_id}/metricsAuthA segment's size and unsubscribed share
Counted on request.
Path parameters
workspace_id*string · uuidId of the workspace.
segment_id*string · uuidId of the segment.
Response · 200
segment_id*string · uuidNull on a preview.
contact_count*numberContacts in the segment now.
Example: 1240
unsubscribed_count*numberOf those, globally unsubscribed.
Example: 31
unsubscribed_share*number`unsubscribed_count / contact_count`, 0 to 1 (4 decimals); 0 for an empty segment.
Example: 0.025
consented_count*numberOf those, with a recorded marketing consent.
Example: 1100
computed_at*string · date-timeWhen the counts were taken (rule segments change as contacts do).
Example
Request
GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/segments/{segment_id}/metrics
Authorization: Bearer YOUR_TOKENResponse
{
"segment_id": "00000000-0000-0000-0000-000000000000",
"contact_count": 1240,
"unsubscribed_count": 31,
"unsubscribed_share": 0.025,
"consented_count": 1100,
"computed_at": "2026-01-01T00:00:00.000Z"
}