How to manage contacts via Sovy API
Table of contents
- Introduction
- Authentication
- Creating new contact
- Getting contact by email
- Updating contact by email
- Deleting contact by email
Introduction
This guide explains how to integrate with Sovy via API and manage your contacts programmatically sending simple HTTP requests.
Sovy API allows you to:
Create new contact
Get single contact by email
Update contact by email
Delete contact by email
Authentication
Sovy API requires all requests to be authenticated with basic HTTP authentication. You can find your organization's credentials when you visit your organization's settings page in the Sovy dashboard.
In basic HTTP authentication, a request contains a header field in the form of Authorization: Basic <credentials>
, where <credentials>
is the Base64 encoding of organization ID and apiKey joined by a single colon :
.
Creating new contact
When creating a new contact, the only required data field is email
, but you can also specify a list of IDs of topics which the contact should and should not subscribe, set if the contact should be unsubscribed from all topics and the whole list, and set contact attributes providing a stringified JSON object.
Example request
Example response
Getting contact by email
Example request
Example response
Updating contact by email
If a contact with the provided email does not exist, a new one will be created.