API docs

Create contacts, send events and receive signed webhooks from each sub-account

Authentication

Every request carries an API key of the sub-account in the Authorization header. Keys are created in the sub-account under Settings › API & Webhooks: the full key is shown once, only a hash is stored, and a key can be revoked at any time. A key gives access to that sub-account only.

Authorization: Bearer psk_your_key

Without a valid key the answer is 401 with { "error": "unauthorized" }. The base URL is https://www.pluriocrm.com. Bodies are JSON; invalid JSON answers 400 and a body that does not validate answers 422 with the issues.

Contacts

Create or complete a contact

POST /api/v1/contacts matches the contact by email, then by phone (the same number however it was written), inside the sub-account. When one exists its empty fields are filled and the tags are added; otherwise it is created. The answer is 201 when created and 200 when completed, with created saying which.

emailstringLower-cased. Email or phone is required.
phonestringAny format, 3 to 50 characters. Without a country code it is a number of the sub-account's country (Settings › Business Profile); best sent as E.164 (+15551234567).
first_namestringUp to 100 characters.
last_namestringUp to 100 characters.
companystringCreated in the sub-account if it does not exist.
sourcestringDefaults to "API".
tagsstring[]Up to 20 tag names; missing tags are created.
custom_fieldsobjectKeys are the custom field keys of the sub-account.
curl -X POST https://www.pluriocrm.com/api/v1/contacts \
  -H "Authorization: Bearer psk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "ada@example.com",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "source": "Website",
    "tags": ["Newsletter"],
    "custom_fields": { "plan": "pro" }
  }'
{
  "created": true,
  "contact": {
    "id": "6f1c…",
    "first_name": "Ada",
    "last_name": "Lovelace",
    "email": "ada@example.com",
    "phone": null,
    "source": "Website",
    "lifecycle_stage": "lead",
    "custom_fields": { "plan": "pro" },
    "tags": ["Newsletter"],
    "created_at": "2026-10-01T15:04:05.000Z",
    "updated_at": "2026-10-01T15:04:05.000Z"
  }
}

Look contacts up

GET /api/v1/contacts takes email, phone or q (searched in names, email and phone) and an optional limit. Archived contacts are not returned. The answer is { "contacts": [...] } with the same contact object as above.

curl "https://www.pluriocrm.com/api/v1/contacts?email=ada@example.com" \
  -H "Authorization: Bearer psk_your_key"

# or: ?phone=+15550100   ?q=ada   &limit=50 (max 200)

Events

POST /api/v1/events records that something happened to a contact on your side: a signup, a purchase, a visit. The contact is matched by id, email or phone (and created when only an email or phone is given). The event lands in the contact's history, fires the automations with the trigger "A custom event is received" (filtered by name) and the webhooks subscribed to contact.event_received. The answer is 202; an unknown contact.id answers 404.

namestringLetters, numbers, "_", ".", ":" and "-". Up to 100 characters.
contact.iduuidAn existing contact. Or match by email or phone.
contact.emailstringCreates the contact when nothing matches.
contact.phonestringSame as email.
contact.first_namestringUsed when the contact is created.
contact.last_namestringUsed when the contact is created.
dataobjectAnything you want to keep with the event.
occurred_atISO 8601When it happened on your side. Optional.
curl -X POST https://www.pluriocrm.com/api/v1/events \
  -H "Authorization: Bearer psk_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order.paid",
    "contact": { "email": "ada@example.com" },
    "data": { "order_id": "A-1001", "total": 149.0 },
    "occurred_at": "2026-10-01T15:04:05Z"
  }'
{
  "event": { "id": "9b2e…", "name": "order.paid", "contact_id": "6f1c…" }
}

Webhooks

A sub-account registers endpoints under Settings › API & Webhooks: a URL and the events it wants. Each endpoint gets a secret (whsec_…), shown once, that signs every delivery. The page keeps a delivery log and a "Send test" button, which posts the event test.ping.

Events

  • contact.created
  • contact.updated
  • contact.tag_added
  • contact.form_submitted
  • contact.message_received
  • contact.appointment_scheduled
  • contact.task_completed
  • contact.ticket_opened
  • contact.ticket_resolved
  • contact.invoice_paid
  • contact.estimate_accepted
  • contact.review_requested
  • contact.event_received
  • contact.link_clicked
  • contact.lead_ad_submitted
  • contact.course_enrolled
  • contact.course_completed
  • opportunity.created
  • opportunity.stage_changed
  • opportunity.won
  • opportunity.lost

The request

Deliveries are POST requests with a JSON body and these headers. Answer with any 2xx within ten seconds to acknowledge.

Content-Typeapplication/json
User-AgentPlataforma-Webhooks/1.0
X-Plataforma-EventThe event name, for example contact.created
X-Plataforma-DeliveryThe delivery id. Repeated on every retry of the same delivery.
X-Plataforma-Signaturet=<unix seconds>,v1=<hex HMAC-SHA256>
{
  "id": "delivery id",
  "event": "contact.created",
  "occurred_at": "2026-10-01T15:04:05.000Z",
  "workspace_id": "sub-account id",
  "entity_type": "contact",
  "entity_id": "6f1c…",
  "data": { "...": "what the event carried" },
  "contact": {
    "id": "6f1c…", "first_name": "Ada", "last_name": "Lovelace",
    "email": "ada@example.com", "phone": null, "source": "Website",
    "lifecycle_stage": "lead", "custom_fields": {}, "created_at": "…"
  }
}

When the event belongs to a contact the body carries the contact; when it belongs to an opportunity it carries the opportunity (id, title, value, currency, status, contact_id, created_at).

Verifying the signature

The signature is the hex HMAC-SHA256, with the endpoint secret, of the timestamp, a dot and the raw request body exactly as received. Compute it on your side, compare in constant time and reject timestamps older than a few minutes to stop replays.

import { createHmac, timingSafeEqual } from 'node:crypto';

export function verify(rawBody: string, header: string, secret: string) {
  const parts = Object.fromEntries(
    header.split(',').map((pair) => pair.split('=') as [string, string]),
  );

  const age = Math.abs(Date.now() / 1000 - Number(parts.t));

  if (!parts.t || !parts.v1 || age > 300) {
    return false; // missing or older than five minutes
  }

  const expected = createHmac('sha256', secret)
    .update(`${parts.t}.${rawBody}`)
    .digest('hex');

  return (
    expected.length === parts.v1.length &&
    timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1))
  );
}

Retries

A delivery that does not get a 2xx within ten seconds is retried about 1, 5, 30 and 120 minutes after each failed attempt (retries go out every five minutes, so one can wait up to five minutes more), five attempts in all. The same delivery can reach you more than once, for example when your answer was lost: the delivery id stays the same, so use it to ignore duplicates. The delivery log shows every attempt, the status code and the error.

Keys and endpoints live in each sub-account's Settings. Sign in to create your first key.

Sign in