Skip to content

Syncing Profiles

A Profile is a unified person record stored in Abelo. A Profile can contain identifiers such as phone_number, email, and public_id, along with custom attributes, consent status, and other customer-related data.

This guide explains how to programmatically create, query, update, and delete Profiles and channel marketing consent via the Abelo REST API.


Overview

Base Path: /v1/profiles
Authentication: Authorization: Bearer <key_id>:<key_secret>
Required Scopes: profiles:read (for GET operations) and profiles:write (for POST, PATCH, DELETE operations)


1. List and Search Profiles (GET /v1/profiles)

Query profiles with exact filters or retrieve paginated records.

Query Parameters

Parameter Type Required Description
phone_number String Optional Filter by exact phone number in E.164 format (e.g. +306912345678).
email String Optional Filter by exact customer email address.
limit Integer Optional Number of items per page (default: 50, max: 100).
cursor String Optional Pagination cursor string returned in previous response metadata.

Mutually Exclusive Filters

phone_number and email are mutually exclusive search parameters. Provide either one or the other per request.

Example Request & Response

curl -X GET "https://api.abelo.ai/v1/profiles?phone_number=%2B306912345678" \
  -H "Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"
import httpx

AUTH_TOKEN = "ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"

response = httpx.get(
    "https://api.abelo.ai/v1/profiles",
    params={"phone_number": "+306912345678"},
    headers={"Authorization": f"Bearer {AUTH_TOKEN}"}
)
print(response.json())

Response (200 OK)

{
  "data": [
    {
      "public_id": "0191636f-bcf0-7813-9f89-8d7681728271",
      "phone_number": "+306912345678",
      "email": "maria@example.com",
      "first_name": "Maria",
      "last_name": "K.",
      "full_name": "Maria K.",
      "viber_marketing_consent": true,
      "sms_marketing_consent": true,
      "created_at": "2026-08-17T10:15:30Z",
      "updated_at": "2026-08-17T14:20:00Z"
    }
  ],
  "meta": {
    "has_more": false,
    "next_cursor": null
  }
}

2. Create a Profile (POST /v1/profiles)

Create a new profile. Phone numbers are unique within your organization.

Request Body Schema

Field Type Required Description
phone_number String Yes Primary mobile phone number in E.164 format.
email String Optional Email address.
first_name String Optional First name (2-100 characters).
last_name String Optional Last name (2-100 characters).
viber_marketing_consent Boolean Optional Marketing opt-in for Viber campaigns (default: false).
sms_marketing_consent Boolean Optional Marketing opt-in for SMS campaigns (default: false).

Example Request

curl -X POST https://api.abelo.ai/v1/profiles \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c" \
  -d '{
    "phone_number": "+306912345678",
    "email": "maria@example.com",
    "first_name": "Maria",
    "last_name": "K.",
    "viber_marketing_consent": true,
    "sms_marketing_consent": true
  }'
import httpx

AUTH_TOKEN = "ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"
API_URL = "https://api.abelo.ai/v1/profiles"

payload = {
    "phone_number": "+306912345678",
    "email": "maria@example.com",
    "first_name": "Maria",
    "last_name": "K.",
    "viber_marketing_consent": True,
    "sms_marketing_consent": True
}

response = httpx.post(
    API_URL,
    headers={
        "Authorization": f"Bearer {AUTH_TOKEN}",
        "Content-Type": "application/json"
    },
    json=payload
)
print(response.status_code, response.json())

Response (201 Created)

{
  "public_id": "0191636f-bcf0-7813-9f89-8d7681728271",
  "phone_number": "+306912345678",
  "email": "maria@example.com",
  "first_name": "Maria",
  "last_name": "K.",
  "full_name": "Maria K.",
  "viber_marketing_consent": true,
  "sms_marketing_consent": true,
  "created_at": "2026-08-17T10:15:30Z",
  "updated_at": "2026-08-17T10:15:30Z"
}

3. Retrieve a Single Profile (GET /v1/profiles/{public_id})

Retrieve a specific profile by its public_id:

curl -X GET https://api.abelo.ai/v1/profiles/0191636f-bcf0-7813-9f89-8d7681728271 \
  -H "Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"

4. Partially Update a Profile (PATCH /v1/profiles/{public_id})

Update individual fields without overwriting unmodified values.

Update Rules & Constraints

  • Omitted fields remain unchanged.
  • viber_marketing_consent, sms_marketing_consent, and phone_number cannot be explicitly cleared to null (supply false or a valid string instead).
  • Connected Store Protection: If your organization has connected a Shopify or WooCommerce store, profiles originating from those platforms cannot be modified via API to prevent synchronization conflicts (409 Conflict).

Example Request

curl -X PATCH https://api.abelo.ai/v1/profiles/0191636f-bcf0-7813-9f89-8d7681728271 \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c" \
  -d '{
    "viber_marketing_consent": false,
    "first_name": "Maria Elena"
  }'
import httpx

AUTH_TOKEN = "ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"
PUBLIC_ID = "0191636f-bcf0-7813-9f89-8d7681728271"

response = httpx.patch(
    f"https://api.abelo.ai/v1/profiles/{PUBLIC_ID}",
    headers={
        "Authorization": f"Bearer {AUTH_TOKEN}",
        "Content-Type": "application/json"
    },
    json={
        "viber_marketing_consent": False,
        "first_name": "Maria Elena"
    }
)
print(response.status_code, response.json())

5. Delete a Profile (DELETE /v1/profiles/{public_id})

Soft-delete a profile. Deleting a profile automatically removes all contact list memberships and marks the record as inactive for privacy compliance.

curl -X DELETE https://api.abelo.ai/v1/profiles/0191636f-bcf0-7813-9f89-8d7681728271 \
  -H "Authorization: Bearer ak_01J8K92M4:as_9f8a7b6c5d4e3f2a1b0c"

Response: 204 No Content