https://api.maqetin.com, takes Authorization: Bearer mq_sec_… and acts in the key’s own workspace.
A public key is a
401, and a key without the scope is a 403. A secret key made with no scopes has contacts:read only.
Two ids
userId is your own key for the person, the one you send with identify. id is the platform id Maqetin makes, and the routes that read one contact take it as contactId. To find it, list with userId and read id from data.items.
Limits
List contacts
GET /v1/public/contacts lists the contacts of the workspace, the most recently updated first.
On the first page, the number of contacts in the workspace, whatever the filter. On a page read with a
cursor, null.Get a contact
GET /v1/public/contacts/{contactId} reads one contact with its 20 newest events, including those of the person’s earlier anonymous visits. The reply has the fields of a listed contact, and these:
The suppression of the person’s address in your workspace, or
null. It has a reason, one of hard_bounce, complaint, unsubscribe or manual, and the time it began, at. No message reaches a suppressed address.The time of the person’s newest event, or
null when there is none. An identify alone is not an event.The newest events, each with
eventId, event, timestamp, userId, anonymousId and properties.List the messages of a contact
GET /v1/public/contacts/{contactId}/messages lists the messages sent to the contact, the newest first.
Get one message
GET /v1/public/contacts/{contactId}/messages/{messageId} reads one message of the contact with every event of it, the oldest first. A message of another contact answers 404. The reply has the fields of a listed message, and data.events.
Each event once, with
eventId, type (sent, deferred, delivered, opened, clicked, bounced, complained, unsubscribed or failed), timestamp, likelyBot and reasonClass (hard, soft, policy, egress or null). An open or a click by a mail scanner is here, flagged likelyBot, though the counts leave it out.Export a contact
GET /v1/public/contacts/{contactId}/export returns everything stored about the person, profile, events and messages, a page at a time. Use it to answer a person who asks for their data.
The first call has no cursor and starts both sections. A section is complete when its nextCursor is null. Send eventsCursor and messagesCursor only for the sections that are not complete: a section you send no cursor for comes back empty.
In every reply:
id, userId, email, anonymousIds, emailOptIn, traits, devices, lastSeenAt, createdAt and updatedAt.items and nextCursor. Each event has eventId, event, timestamp, receivedAt, userId, anonymousId, channel, properties and context.items and nextCursor. Each item is one event of a message sent to the person, with its messageId, eventType, timestamp, templateId and likelyBot. A click or an open by a security scanner is here, flagged likelyBot.Delete a contact
DELETE /v1/public/contacts/{contactId} erases the person: their profile, their events, the events of their messages and their place in every journey. It needs the contacts:delete scope.
Errors
Errors lists the rest.