Skip to main content
GET
AhaSend Go SDK
The AhaSend API returns the segments that one contact is a member of, newest first. Access requires segments:read and contacts:read, because the request reads a contact. {id_or_email} is the contact ID or its email address. Percent-encode an email address exactly once. See Name a contact in the path. A segment that is building may still list the contact by its previous rules. See States. This is the reverse of List Segment Contacts. To read the lists of the contact, use List Contact’s Lists. A contact that does not exist answers 404. Pages use cursors: send after or before, not both. See Pagination.

Authorizations

Authorization
string
header
required

API key for authentication. Non-empty Security Requirement values are AhaSend API-key roles. Roles listed within one requirement object are jointly required; separate requirement objects are alternatives.

Path Parameters

account_id
string<uuid>
required

Account ID

id_or_email
string
required

Contact UUID or email address. Percent-encode an email exactly once as a path segment; SDK callers pass the raw email value.

Query Parameters

limit
integer
default:100

Maximum number of segments to return

Required range: 1 <= x <= 100
after
string

Cursor for the next page; cannot be combined with before

before
string

Cursor for the previous page; cannot be combined with after

Response

Paginated segments

object
enum<string>
required
Available options:
list
data
object[]
required
pagination
object
required