Appearance
People
APIs for managing people (contacts) in your Lindris account.
As a reminder, all requests must be authenticated and use the base URL: https://api.lindris.com
List people
GETapi/peopleRetrieve a paginated list of people with optional filtering
Query Parameters
filter[segments]string optional - Comma-separated list of segment IDs. Prefix with - to exclude. Example:5,7,-9filter[tags]string optional - List of tag names to filter by. Prefix with - to exclude. Example:my-tag,-unwanted-tagfilter[email]string optional - Keywords to filter email addresses. Example:@octethfilter[status]string optional - Filter by subscription status. Example:confirmed- Must be one of:
unsubscribedconfirmedunconfirmedblocked
- Must be one of:
filter[field-{XYZ}]string optional - Filter by custom field value where XYZ is the field name.- Example:
filter[field-full-name]=John Doe
- Example:
pageinteger optional - Page number for pagination. Example:2
Request
bash
curl --request GET \
--get "https://api.lindris.com/api/people?filter%5Bsegments%5D=5%2C7%2C-9&filter%5Btags%5D=my-tag%2C-unwanted-tag&filter%5Bemail%5D=%40octeth&filter%5Bstatus%5D=confirmed&filter%5Bfield-%7BXYZ%7D%5D=filter%5Bfield-full-name%5D%3DJohn+Doe&page=2" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/people';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'query' => [
'filter[segments]' => '5,7,-9',
'filter[tags]' => 'my-tag,-unwanted-tag',
'filter[email]' => '@octeth',
'filter[status]' => 'confirmed',
'filter[field-{XYZ}]' => 'filter[field-full-name]=John Doe',
'page' => '2',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/people"
);
const params = {
"filter[segments]": "5,7,-9",
"filter[tags]": "my-tag,-unwanted-tag",
"filter[email]": "@octeth",
"filter[status]": "confirmed",
"filter[field-{XYZ}]": "filter[field-full-name]=John Doe",
"page": "2",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Response
json
{
"data": [
{
"id": "1",
"status": "active",
"statusDetails": "confirmed",
"email": "[email protected]",
"customFields": {
"fullName": "test"
},
"tags": null,
"timestamp": 1702513540
}
],
"meta": {
"currentPage": 2,
"lastPage": 2,
"from": 11,
"to": 11,
"total": 11,
"perPage": 10,
"path": "/api/people"
},
"links": {
"next": null,
"prev": "/api/people?page=1",
"first": "/api/people?page=1",
"last": "/api/people?page=2"
}
}Check person exists
GETapi/people/check/{email}URL Parameters
emailstring required - The person's email address. Example:[email protected]
Request
bash
curl --request GET \
--get "https://api.lindris.com/api/people/check/[email protected]" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/people/check/[email protected]';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/people/check/[email protected]"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Responses
json
{
"exists": true,
"email": "[email protected]"
}json
{
"exists": false,
"email": "[email protected]"
}Get person details
GETapi/people/{idOrEmail}Retrieve a single person by their ID or email address
URL Parameters
idOrEmailstring required - The person's ID or email address. Example:[email protected]
Request
bash
curl --request GET \
--get "https://api.lindris.com/api/people/[email protected]" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/people/[email protected]';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/people/[email protected]"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());Responses
json
{
"data": {
"id": "1",
"status": "active",
"statusDetails": "confirmed",
"email": "[email protected]",
"customFields": {
"fullName": "test"
},
"tags": [
"tagName1",
"tagName2"
],
"series": [
{
"id": "01hsft8kccmm3hmy4nrevxtmft",
"name": "Welcome Series"
}
],
"timestamp": 1702513540
}
}json
{
"message": "Person not found"
}Create or update person
POSTapi/peopleCreate a new person or update an existing one
Request Body
idinteger optional - The person's Lindris ID. Either email or id must be included. Example:1emailstring optional - The person's email address. Either email or id must be included.emailChangestring optional - Provide this if you need to update the email address of an existing contact. Use with the "email" or "id" field to identify the contact to update. Example:[email protected]sourcestring required - The e-commerce platform source. Example:woocommercecustomFieldsobject optional - Custom field data for the person.TIP
The following are Default System Fields available for use:
firstName: Person's first namelastName: Person's last namephoneNumber: Phone number (include country code)referenceId: External system reference ID
Example:
json
{
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+1234567890",
"shirtSize": "Medium"
}tagsobject optional - Tags to add (true) or remove (false). Example:
json
{
"tagToBeAdded": true,
"tagToBeRemoved": false
}seriesobject optional - Series IDs to add to (true) or remove from (false). Example:
json
{
"seriesIdToBeAddedTo": true,
"seriesIdToBeRemovedFrom": false
}eventsstring[] optional - Events to track for this person. For an in-depth explanation see the documentation. Example:
json
[
{
"eventName": "import-completed",
"method": "csv"
}
]statusstring optional - The person's active status. This is determined by multiple factors including subscription status, hard bounce status, and suppression list status. A person can only receive emails when 'active'. Example:active- Must be one of:
activeinactive
- Must be one of:
statusDetailsstring optional - The detailed subscription status of the person. This provides more granular control over the person's state:- confirmed: Person is subscribed and can receive emails
- unconfirmed: Person is pending double opt-in confirmation
- unsubscribed: Person has explicitly unsubscribed
Note: Cannot set 'active' status when person is blocked or hard bounced.
- Must be one of:
confirmedunconfirmedunsubscribed
Response Fields
dataarrayidinteger optional - The unique identifier for the personemailstring optional - The person's email addressstatusstring optional - The person's active status (active,inactive). This is determined by multiple factors including subscription status, hard bounce status, and suppression list status. The person can only receive emails when 'active'.statusDetailsstring optional - Detailed subscription status of the person. Provides granular state information about the person's subscription state:- confirmed: Person is subscribed and can receive emails
- unconfirmed: Person is pending double opt-in confirmation. When double opt-in is enabled, all new contacts are created with this status.
- unsubscribed: Person has explicitly unsubscribed
- blocked: Person is suppressed due to hard bounce or other issues
customFieldsobject optional - Custom field data associated with the persontagsstring[] optional - List of tags associated with the personseriesstring[] optional - List of series the person is enrolled ineventUuidstring optional - The UUID of any events tracked for this person in this request.
Request
bash
curl --request POST \
"https://api.lindris.com/api/people" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json" \
--data "{
\"id\": 1,
\"emailChange\": \"[email protected]\",
\"source\": \"woocommerce\",
\"customFields\": {
\"firstName\": \"John\",
\"lastName\": \"Doe\",
\"phoneNumber\": \"+1234567890\",
\"shirtSize\": \"Medium\"
},
\"tags\": {
\"tagToBeAdded\": true,
\"tagToBeRemoved\": false
},
\"series\": {
\"seriesIdToBeAddedTo\": true,
\"seriesIdToBeRemovedFrom\": false
},
\"events\": [
{
\"eventName\": \"import-completed\",
\"method\": \"csv\"
}
],
\"status\": \"active\"
}"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/people';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
'json' => \Symfony\Component\VarExporter\Internal\Hydrator::hydrate(
$o = [
clone (\Symfony\Component\VarExporter\Internal\Registry::$prototypes['stdClass'] ?? \Symfony\Component\VarExporter\Internal\Registry::p('stdClass')),
],
null,
[
'stdClass' => [
'eventName' => [
'import-completed',
],
'method' => [
'csv',
],
],
],
[
'id' => 1,
'emailChange' => '[email protected]',
'source' => 'woocommerce',
'customFields' => [
'firstName' => 'John',
'lastName' => 'Doe',
'phoneNumber' => '+1234567890',
'shirtSize' => 'Medium',
],
'tags' => [
'tagToBeAdded' => true,
'tagToBeRemoved' => false,
],
'series' => [
'seriesIdToBeAddedTo' => true,
'seriesIdToBeRemovedFrom' => false,
],
'events' => [
$o[0],
],
'status' => 'active',
],
[]
),
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/people"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"id": 1,
"emailChange": "[email protected]",
"source": "woocommerce",
"customFields": {
"firstName": "John",
"lastName": "Doe",
"phoneNumber": "+1234567890",
"shirtSize": "Medium"
},
"tags": {
"tagToBeAdded": true,
"tagToBeRemoved": false
},
"series": {
"seriesIdToBeAddedTo": true,
"seriesIdToBeRemovedFrom": false
},
"events": [
{
"eventName": "import-completed",
"method": "csv"
}
],
"status": "active"
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());Responses
json
{
"data": {
"id": "1",
"status": "active",
"statusDetails": "confirmed",
"email": "[email protected]",
"customFields": {
"fullName": "test"
},
"tags": [
"tagName1",
"tagName2"
],
"series": [
{
"id": "01hsft8kccmm3hmy4nrevxtmft",
"name": "Welcome Series"
}
],
"timestamp": 1702513540
}
}json
{
"data": {
"id": "1",
"status": "active",
"statusDetails": "confirmed",
"email": "[email protected]",
"customFields": {
"referenceId": "edd-124",
"source": "woocommerce"
},
"tags": [],
"series": [],
"timestamp": 1702513540,
"eventUuid": "f5543f6b-f445-4343-1a17-b44db65add21"
}
}json
{
"data": {
"id": "1",
"status": "active",
"statusDetails": "confirmed",
"email": "[email protected]",
"customFields": {
"fullName": "test"
},
"tags": [
"tagName1",
"tagName2"
],
"series": [
{
"id": "01hsft8kccmm3hmy4nrevxtmft",
"name": "Welcome Series"
}
],
"timestamp": 1702513540
}
}json
{
"message": "The email field is required when id is not present. (and 2 more errors)",
"errors": {
"email": [
"The email field is required when id is not present."
],
"source": [
"The source field is required."
],
"id": [
"The id field is required when email is not present."
]
},
"status_code": 422
}Delete person
DELETEapi/people/{idOrEmail}Permanently remove a person by their ID or email address
URL Parameters
idOrEmailstring required - The person's ID or email address. Example:[email protected]
Request
bash
curl --request DELETE \
"https://api.lindris.com/api/people/[email protected]" \
--header "Authorization: Bearer {YOUR_API_KEY}" \
--header "Content-Type: application/json"php
$client = new \GuzzleHttp\Client();
$url = 'https://api.lindris.com/api/people/[email protected]';
$response = $client->delete(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_KEY}',
'Content-Type' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));javascript
const url = new URL(
"https://api.lindris.com/api/people/[email protected]"
);
const headers = {
"Authorization": "Bearer {YOUR_API_KEY}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());Responses
text
(No response body)json
{
"message": "Person not found"
}