segments
GET
https://hermeticor.com /v1/segments/{id}/members Current members with the time each joined; filter by email, phone or join date, sort by join date
Parameters
limitintegerquerycursorstringqueryemailstringqueryphonestringqueryjoinedFromstringqueryjoinedTostringquerysortstringqueryidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/segments/{id}/members" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"emailPrimary": "string",
"phonePrimary": "string",
"firstName": "string",
"lastName": "string",
"timezone": "string",
"locale": "string",
"country": "string",
"city": "string",
"region": "string",
"source": "string",
"lifecycleStage": "string",
"ownerUserId": "string",
"attributes": {},
"tags": [
"string"
],
"mergedIntoId": "string",
"archivedAt": "2024-01-01T00:00:00Z",
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z",
"consentIgnored": [
"email"
],
"joinedAt": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequiredemailPrimarystringrequiredphonePrimarystringrequiredfirstNamestringrequiredlastNamestringrequiredtimezonestringrequiredlocalestringrequiredcountrystringrequiredcitystringrequiredregionstringrequiredsourcestringrequiredlifecycleStagestringrequiredownerUserIdstringrequiredattributesobjectrequiredtagsstring[]requiredmergedIntoIdstringrequiredarchivedAtstringcreatedAtstringrequiredupdatedAtstringrequiredconsentIgnoredstring[]joinedAtstringrequirednextCursorstringrequired4XX Default Response
Example
{
"error": {
"code": "string",
"message": "string",
"details": {}
}
}Schema
errorobjectrequiredShow child parameters
codestringrequiredmessagestringrequireddetailsobjectPOST
https://hermeticor.com /v1/segments/{id}/members Add existing contacts to a hand-picked segment by profile id or email (grants no consent)
Parameters
idstringpathrequiredRequest body
application/json
profileIdsstring[]emailsstring[]{
"profileIds": [],
"emails": []
}Code samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/{id}/members" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"profileIds":[],"emails":[]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"changed": 0,
"notFound": [
"string"
]
}Schema
changedintegerrequirednotFoundstring[]requiredDELETE
https://hermeticor.com /v1/segments/{id}/members Remove contacts from a hand-picked segment by profile id or email
Parameters
idstringpathrequiredRequest body
application/json
profileIdsstring[]emailsstring[]{
"profileIds": [],
"emails": []
}Code samples
cURL
curl -X DELETE "https://hermeticor.com/v1/segments/{id}/members" \
-H "Authorization: Bearer $HERMETICOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"profileIds":[],"emails":[]}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
GET
https://hermeticor.com /v1/segments/{id}/objects Members of an object segment, each with the profiles linked to it
Parameters
limitintegerquerycursorstringqueryidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/segments/{id}/objects" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"objectId": "string",
"externalId": "string",
"name": "string",
"attributes": {},
"joinedAt": "2024-01-01T00:00:00Z",
"profileIds": [
"string"
]
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
objectIdstringrequiredexternalIdstringrequirednamestringrequiredattributesobjectrequiredjoinedAtstringrequiredprofileIdsstring[]requirednextCursorstringrequiredGET
https://hermeticor.com /v1/segments/{id}/snapshots Saved snapshots of a segment, newest first
Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/segments/{id}/snapshots" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"segmentId": "string",
"takenAt": "2024-01-01T00:00:00Z",
"count": 0
}
],
"nextCursor": "string"
}Schema
itemsPostV1SegmentsByIdSnapshotsResponse[]requiredShow child parameters
idstringrequiredsegmentIdstringrequiredtakenAtstringrequiredcountintegerrequirednextCursorstringrequiredPOST
https://hermeticor.com /v1/segments/{id}/snapshots Parameters
idstringpathrequiredCode samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/{id}/snapshots" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
201 Default Response
Example
{
"id": "string",
"segmentId": "string",
"takenAt": "2024-01-01T00:00:00Z",
"count": 0
}Schema
idstringrequiredsegmentIdstringrequiredtakenAtstringrequiredcountintegerrequiredGET
https://hermeticor.com /v1/segments/{id}/versions Parameters
limitintegerqueryPage size; omitted returns the whole list
cursorstringqueryOpaque: the
nextCursor of the previous pageidstringpathrequiredCode samples
cURL
curl -X GET "https://hermeticor.com/v1/segments/{id}/versions" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"items": [
{
"id": "string",
"segmentId": "string",
"n": 0,
"definition": {
"type": "group",
"op": "and",
"negate": true,
"children": [
{}
]
},
"createdBy": "string",
"createdAt": "2024-01-01T00:00:00Z"
}
],
"nextCursor": "string"
}Schema
itemsobject[]requiredShow child parameters
idstringrequiredsegmentIdstringrequirednintegerrequireddefinitionobjectrequiredShow child parameters
typestringrequiredopstringrequirednegatebooleanchildrenschema0[]requiredcreatedBystringrequiredcreatedAtstringrequirednextCursorstringrequiredPOST
https://hermeticor.com /v1/segments/{id}/versions/{n}/restore Put an earlier version of the rules back as the current rules (recorded as a new version)
Parameters
idstringpathrequirednintegerpathrequiredCode samples
cURL
curl -X POST "https://hermeticor.com/v1/segments/{id}/versions/{n}/restore" \
-H "Authorization: Bearer $HERMETICOR_API_KEY"TypeScript
Python
Go
PHP
Ruby
Java
Responses
200 Default Response
Example
{
"id": "string",
"name": "string",
"description": "string",
"folder": "string",
"definition": {
"type": "group",
"op": "and",
"negate": true,
"children": [
{}
]
},
"status": "active",
"evalStatus": "pending",
"lastEvaluatedAt": "2024-01-01T00:00:00Z",
"memberCount": 0,
"dependencyKeys": [
"string"
],
"version": 0,
"subject": "string",
"starred": true,
"tags": [
"string"
],
"createdAt": "2024-01-01T00:00:00Z",
"updatedAt": "2024-01-01T00:00:00Z"
}Schema
idstringrequirednamestringrequireddescriptionstringrequiredfolderstringrequireddefinitionobjectrequiredShow child parameters
typestringrequiredopstringrequirednegatebooleanchildrenschema0[]requiredstatusstringrequiredevalStatusstringrequiredlastEvaluatedAtstringrequiredmemberCountintegerrequireddependencyKeysstring[]requiredversionintegerrequiredsubjectstringrequiredstarredbooleanrequiredtagsstring[]createdAtstringrequiredupdatedAtstringrequiredUpdated