ActiveCampaign Segment Match One API

The Segment Match One API from ActiveCampaign — 2 operation(s) that check whether a single contact matches a given segment, addressed either by ActiveCampaign contact id or by the integration-supplied externalId.

OpenAPI Specification

activecampaign-segment-match-one-api-openapi.json Raw ↑
{"openapi":"3.1.1","info":{"title":"Segments","description":"API for managing segments in your ActiveCampaign instance","version":"2.0.0","contact":{"name":"ActiveCampaign Support","url":"https://www.activecampaign.com"}},"servers":[{"url":"https://{yourAccountName}.api-us1.com/api/3","variables":{"yourAccountName":{"default":"yourAccountName","description":"Your ActiveCampaign account name"}}}],"tags":[{"name":"Match One","description":"Evaluate Contact Id against the provided SegmentId. Returns `true` if Contact matches the given Segment"}],"paths":{"/segmentMatch/{segmentId}/{contactId}":{"get":{"operationId":"create_match_one_request","tags":["Match One"],"summary":"Create a Match One Request","parameters":[{"name":"segmentId","in":"path","description":"SegmentId","required":true,"schema":{"type":"string"},"examples":{"UUID SegmentId":{"value":"1ab85f0e-3b5c-4a35-bc07-242c68a7d195"},"Numeric SegmentId":{"value":"124"}}},{"name":"contactId","in":"path","description":"ContactId","required":true,"schema":{"type":"string"},"example":"1524"}],"responses":{"200":{"description":"Segment and Contact evaluation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchResponseRootDO"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse400RootDO"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Segment Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse404RootDO"}}}}},"deprecated":false}},"/segmentMatch/{segmentId}/{contactId}/{externalId}":{"get":{"operationId":"segment_match_check_by_external_id","tags":["Match One"],"summary":"Check to see if a Contact matches a Segment using the given externalId","parameters":[{"name":"segmentId","in":"path","description":"SegmentId","required":true,"schema":{"type":"string"}},{"name":"contactId","in":"path","description":"ContactId","required":true,"schema":{"type":"number"}},{"name":"externalId","in":"path","description":"externalId","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Segment, Contact & ExternalId evaluation completed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MatchResponseRootDO"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseRootDO"}}}},"401":{"description":"Unauthorized"},"403":{"description":"Forbidden"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponseRootDO"}}}}},"deprecated":false}}},"components":{"schemas":{"ErrorDetail":{"type":"object","properties":{"status":{"type":"string"},"title":{"type":"string"},"detail":{"type":"string"},"code":{"type":"string"}},"title":"ErrorDetail"},"ErrorDetail404":{"type":"object","properties":{"status":{"type":"string","example":"404 NOT_FOUND"},"title":{"type":"string","example":"Segment 1ab85f0e-3b5c-4a35-bc07-242c68a7d000 not found"},"detail":{"type":"string"},"code":{"type":"string"}},"title":"ErrorDetail"},"ErrorDetail400":{"type":"object","properties":{"status":{"type":"string","example":"400 BAD_REQUEST"},"title":{"type":"string","example":"Segment 1ab85f0e-3b5c-4a35-bc07-242c68a7d000 is invalid"},"detail":{"type":"string"},"code":{"type":"string"}},"title":"ErrorDetail"},"MatchAttributeDO":{"type":"object","properties":{"created_timestamp":{"type":"string","format":"date-time","example":"2025-04-12T23:20:50.523Z"},"entity_id":{"type":"string","description":"The ContactId that was evaluated against the Segment","example":"132"},"match":{"type":"boolean","description":"True if the Contact matches the Segment. False otherwise"},"segment_id":{"type":"string","description":"The SegmentId that the Contact was evaluated against","example":"1ab85f0e-3b5c-4a35-bc07-242c68a7d195"},"segment_timestamp":{"type":"string","format":"date-time","example":"2025-04-12T23:20:50.523Z"}},"title":"MatchAttributeDO"},"MatchDataDO":{"type":"object","properties":{"attributes":{"$ref":"#/components/schemas/MatchAttributeDO"},"id":{"type":"string","description":"Id that identifies the request. Consists of SegmentId + ContactId","example":"1ab85f0e-3b5c-4a35-bc07-242c68a7d195132"},"type":{"type":"string","enum":["match"]}},"title":"MatchDataDO"},"MatchResponseRootDO":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/MatchDataDO"}}},"title":"MatchResponseRootDO"},"ErrorResponseRootDO":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail"}}},"title":"ErrorResponseRootDO"},"ErrorResponse400RootDO":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail400"}}},"title":"ErrorResponse400RootDO"},"ErrorResponse404RootDO":{"type":"object","properties":{"errors":{"type":"array","items":{"$ref":"#/components/schemas/ErrorDetail404"}}},"title":"ErrorResponse404RootDO"}},"securitySchemes":{"Api_Key":{"type":"apiKey","in":"header","name":"Api-Token"}}},"security":[{"Api_Key":[]}]}