Mail API reference

Mail API · Contacts

get/v1/workspaces/{workspace_id}/contacts/{contact}Auth

Get a contact by id or email

Path parameters

workspace_id*string · uuid

Id of the workspace.

contact*string

The contact id, or its email address (URL-encoded).

Response · 200

id*string · uuid

The contact id.

email*string · email

The contact's email address, unique within the workspace.

Example: "ada@example.com"

first_name*string

The contact's first name.

last_name*string

The contact's last name.

unsubscribed*boolean

Global unsubscribe.

unsubscribed_at*string · date-time

When the contact unsubscribed from all mail; null while subscribed.

properties*object

Custom property values keyed by contact-property key.

Example: {"company":"Acme"}

consented_at*string · date-time

When marketing consent was recorded; null when none was.

consent_source*string

Where the consent to email this contact came from (free text, for your records).

Example: "signup-form-2026"

created_via*object

How the contact was added.

created_at*string · date-time

When the contact was created.

updated_at*string · date-time

When the contact was last changed.

Example

Request

GET https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/contacts/{contact}
Authorization: Bearer YOUR_TOKEN

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "email": "ada@example.com",
  "first_name": "string",
  "last_name": "string",
  "unsubscribed": false,
  "unsubscribed_at": "2026-01-01T00:00:00.000Z",
  "properties": {
    "company": "Acme"
  },
  "consented_at": "2026-01-01T00:00:00.000Z",
  "consent_source": "signup-form-2026",
  "created_via": {},
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z"
}