diff --git a/mautic/segments.py b/mautic/segments.py index 1b43981..9015c65 100644 --- a/mautic/segments.py +++ b/mautic/segments.py @@ -24,3 +24,18 @@ def add_contact(self, segment_id, contact_id): ) ) return self.process_response(response) + + def remove_contact(self, segment_id, contact_id): + """ + Remove a contact from the segment + + :param segment_id: int Segment ID + :param contact_id: int Contact ID + :return: dict|str + """ + response = self._client.session.post( + '{url}/{id}/contact/remove/{contact_id}'.format( + url=self.endpoint_url, id=segment_id, contact_id=contact_id + ) + ) + return self.process_response(response)