---
title: Profiles
description: Profiles - MailPirate Docs
---

# Profiles

Profile endpoints let you search, fetch, and sync contacts for a store.

## List profiles

`GET /profiles`

### Query parameters

| Param | Required | Notes |
|-------|----------|-------|
| `store_slug` | Yes | |
| `q` | No | Search email, first name, last name |
| `status` | No | Exact status filter (`subscribed`, `pending`, …) |
| `limit` | No | 1-100, default 50 |

### Response

```json
{
  "data": [
    {
      "public_id": "01H...",
      "email": "buyer@example.com",
      "first_name": "Ada",
      "last_name": "Lovelace",
      "status": "subscribed",
      "store_slug": "main",
      "updated_at": "2026-11-18T12:00:00.000000Z"
    }
  ]
}
```

## Get one profile

`GET /profiles/{public_id}`

Returns core fields plus:

- `properties` - arbitrary profile properties
- `predictive` - intelligence scores when present (historic CLV, predicted LTV, churn risk, next-order fields, …)

## Create or update (upsert)

`POST /profiles`

Finds or creates by email for the given store, then updates provided fields.

```json
{
  "store_slug": "main",
  "email": "buyer@example.com",
  "first_name": "Ada",
  "last_name": "Lovelace",
  "phone": "+386...",
  "properties": {
    "country": "SI"
  }
}
```

### Response

```json
{
  "public_id": "01H...",
  "email": "buyer@example.com",
  "status": "subscribed"
}
```

### Important consent note

Upsert syncs data. It does **not** start double opt-in by itself. When someone is explicitly opting in to marketing, call [`/subscribe`](/docs/api/subscribe) (or use an embed form).

## Examples

```bash
# Search
curl -sS "$BASE/profiles?store_slug=main&q=ada&limit=20" \
  -H "Authorization: Bearer $TOKEN"

# Upsert
curl -sS -X POST "$BASE/profiles" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"store_slug":"main","email":"buyer@example.com","properties":{"country":"SI"}}'
```

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://mailpirate.com/#organization","name":"MailPirate","legalName":"Jure Rožman s.p.","url":"https://mailpirate.com/","logo":{"@type":"ImageObject","@id":"https://mailpirate.com/#logo","url":"https://mailpirate.com/img/logo/mailpirate-logo.svg","contentUrl":"https://mailpirate.com/img/logo/mailpirate-logo.svg"},"image":{"@id":"https://mailpirate.com/#logo"},"description":"MailPirate is email marketing built for ecommerce stores: campaigns, automated journeys, living audiences, store sync, and deliverability control without managing mail servers yourself.","slogan":"Email that sells more for your store.","foundingDate":"2019-01-29","founder":{"@id":"https://mailpirate.com/#person-jure-rozman"},"address":{"@type":"PostalAddress","streetAddress":"Šinkov Turn 24A","addressLocality":"Vodice","postalCode":"1217","addressCountry":"SI"},"email":"info@mailpirate.com","telephone":"+38640504630","vatID":"SI72369213","identifier":[{"@type":"PropertyValue","propertyID":"AJPES registration number","value":"6881475000"}],"contactPoint":{"@type":"ContactPoint","contactType":"customer support","email":"info@mailpirate.com","telephone":"+38640504630","availableLanguage":["English"]},"knowsAbout":[{"@type":"Thing","name":"Email marketing"},{"@type":"Thing","name":"Ecommerce automation"},{"@type":"Thing","name":"Email deliverability"}],"areaServed":["SI","EU","GB","US"],"sameAs":["https://www.linkedin.com/company/mailpirate"]},{"@type":"Person","@id":"https://mailpirate.com/#person-jure-rozman","name":"Jure Rožman","jobTitle":"Founder","worksFor":{"@id":"https://mailpirate.com/#organization"},"description":"Founder of MailPirate. Builds ecommerce email tooling focused on fair billing, automation, and deliverability.","url":"https://mailpirate.com/about-us","sameAs":["https://www.linkedin.com/in/jurerozman/"]},{"@type":"WebSite","@id":"https://mailpirate.com/#website","url":"https://mailpirate.com/","name":"MailPirate","inLanguage":"en","publisher":{"@id":"https://mailpirate.com/#organization"},"about":{"@id":"https://mailpirate.com/#software"}},{"@type":"SoftwareApplication","@id":"https://mailpirate.com/#software","name":"MailPirate","applicationCategory":"BusinessApplication","applicationSubCategory":"Email marketing","operatingSystem":"Web","url":"https://mailpirate.com/","description":"Ecommerce email platform for Shopify and WooCommerce stores: campaigns, flows, segments, intelligence, and dedicated sending with deliverability controls.","publisher":{"@id":"https://mailpirate.com/#organization"},"featureList":["Campaigns and reporting","Automated flows (welcome, cart recovery, win-back)","Segments and lists","Store connectors (Shopify, WooCommerce)","Intelligence (RFM, affinity, send-time, replenishment)","Deliverability scorecard and dedicated sending","Marketing API and embed forms"]}]}
```
