End users are the people who contact the customer: customers, leads and partners. Each end user has profile fields, one or more identifiers (an e-mail address, a phone number or another ID) and custom field values. AnswerPal uses the identifiers to recognise who sent a message.
/api/EndUserspageNumber (default 1), pageSize (default 10), sortBy, sortOrder (asc or desc) and search./api/EndUsers/api/EndUsers/byUiduid. Returns a list, empty when nobody matches./api/EndUsers/{id}/api/EndUsers/{id}/api/EndUsers/{id}/api/EndUsers/{id}/tickets/api/EndUserUIDs/assignendUserID (integer, response only)name (string, response only)firstname, lastname, company (string or null)gender (boolean or null)customerType (string)Lead, Customer or Partner. Empty becomes Lead on create and keeps the current value on update.customerRef (string or null)lang, country (string or null)street, houseNumber, postalCode, city (string or null)otherContactDetails (string or null)aiDocumentation (string or null)uids (array)customFields (object)endUserUIDID (integer)uidType (string, required)Email or Phone.uid (string, required)Email identifier must be a valid e-mail address; a Phone identifier is stored as + followed by its digits, so send it in international format (+32 470 12 34 56 becomes +32470123456).isPrimary (boolean)markAsDeleted (boolean, update only)The update replaces the profile fields: send them all, a field you leave out is cleared (except customerType). Identifiers in the update are applied one by one: with an endUserUIDID they change or remove that identifier; without one they are added, or they update an existing identifier with the same type and value. Identifiers you do not send stay as they are.
In customFields, every key must be the name of an end-user custom field and is checked against the field’s type. A key with null removes that value; fields you leave out keep their value. An unknown field or an invalid value gives 400 Bad Request.
POST /api/EndUsers
Authorization: Bearer <token>
Content-Type: application/json
{
"firstname": "An",
"lastname": "Janssens",
"company": "Example BV",
"customerType": "Customer",
"customerRef": "CRM-10045",
"lang": "nl",
"country": "BE",
"uids": [
{ "uidType": "Email", "uid": "an.janssens@example.com", "isPrimary": true },
{ "uidType": "Phone", "uid": "+32 470 12 34 56", "isPrimary": false }
],
"customFields": { "membership": "Gold" }
} 201 Created
Location: /api/EndUsers/812
{
"endUserID": 812,
"name": "An Janssens",
"firstname": "An",
"lastname": "Janssens",
"company": "Example BV",
"customerType": "Customer",
"customerRef": "CRM-10045",
"lang": "nl",
"country": "BE",
"uids": [
{ "endUserUIDID": 1201, "uid": "an.janssens@example.com", "uidType": "Email", "isPrimary": true },
{ "endUserUIDID": 1202, "uid": "+32470123456", "uidType": "Phone", "isPrimary": false }
],
"customFields": { "membership": "Gold" }
} PUT /api/EndUsers/812
Authorization: Bearer <token>
Content-Type: application/json
{
"firstname": "An",
"lastname": "Janssens",
"company": "Example BV",
"customerRef": "CRM-10045",
"uids": [
{ "endUserUIDID": 1202, "uidType": "Phone", "uid": "+32470123456", "markAsDeleted": true },
{ "uidType": "Email", "uid": "an@example.org", "isPrimary": false }
],
"customFields": { "membership": null }
} POST /api/EndUserUIDs/assign
Authorization: Bearer <token>
Content-Type: application/json
{
"endUserID": 812,
"uid": "an.janssens@example.com",
"uidType": "Email",
"isPrimary": false
}
201 Created
{ "endUserUIDID": 1203, "uid": "an.janssens@example.com", "endUserID": 812 } GET /api/EndUsers/byUid?uid=... compares the value, with spaces around it removed, exactly with the stored identifiers and customer references of the customer. Look up phone numbers in their normalized form (+32470123456). More than one end user can match.
searchsortBylastname or city, DisplayName (first name, else last name, else company), or CustomFields.<fieldName> for an end-user custom field. An unknown field gives 400.items, totalCount and totalPages.GET /api/EndUsers/{id}/tickets takes the filters of the ticket list: pageNumber, pageSize, sortBy, sortOrder, status, customerRepID, channelType, channelIDs, uid, isClosed, isSpam and search. The end user in the path decides which tickets are included. The tickets have the fields of the Tickets page, with the topic names in topics.
Every signed-in user of the customer can call these endpoints; they only see the end users of the customer in the token.
200 OK, 201 Created, 204 No Content400 Bad RequestcustomerType, a missing identifier, an invalid e-mail identifier, an unknown custom field or invalid value, or an unknown sort field.404 Not Found409 ConflictcustomerRef, so you can find the end user back with byUid.Yes. Add them on create, in an update or one at a time with POST /api/EndUserUIDs/assign.
On the exact value, after removing surrounding spaces, against the identifiers and the customer reference. Phone numbers are stored in normalized form, so look them up in that form.
When the same value is already linked to that end user, nothing changes and the answer is 200 OK.
Lead, Customer and Partner. A new end user without a type becomes Lead.
AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.
For all support, sales, and partnership inquiries, email us at info@answerpal.eu
AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium
+32.36416685
BE 0862.692.858