MisarMisar Docs
MisarMailMisarBlogMisarReachMisarPostMisarDevMisarCoderMisarSEOMisar PlatformMisar SSO
API Reference

Contacts

Manage contacts and bulk import via JSON

Contacts are the recipients in your email lists. Each contact belongs to the authenticated user and is isolated from other users' contacts.

Authentication

Read endpoints require an API key with the read or contacts scope; write endpoints require the write or contacts scope. Base URL: https://api.misar.io/mail.

Endpoints

MethodPathDescription
GET/api/v1/contactsList contacts (paginated)
POST/api/v1/contactsCreate a contact
DELETE/api/v1/contacts?id=Delete a contact
POST/api/v1/contacts/importBulk import (JSON)

List contacts

GET/mail/v1/contacts

List contacts with optional filtering and pagination.

Query parameters

pageintegerquerydefault: 1

Page number.

limitintegerquerydefault: 20

Results per page (max 100).

statusstringquery

Filter: subscribed, unsubscribed, bounced, complained.

searchstringquery

Search by email or name (max 100 characters).

Response fields

successboolean

true when the request succeeded.

dataArray<Contact>

The page of contacts. Each contact includes id, email, phone, first_name, last_name, status, custom_fields, engagement_score, sms_opted_in, created_at, and updated_at.

paginationobject

Pagination metadata: page, limit, total, and totalPages.

200 — OK
{
  "success": true,
  "data": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "email": "user@example.com",
      "phone": null,
      "first_name": "Jane",
      "last_name": "Doe",
      "status": "subscribed",
      "custom_fields": { "plan": "pro" },
      "engagement_score": 42,
      "sms_opted_in": false,
      "created_at": "2026-01-15T10:00:00Z",
      "updated_at": "2026-01-20T08:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 1234,
    "totalPages": 62
  }
}

Create a contact

POST/mail/v1/contacts

Create a single contact. Plan limits apply.

Request body

emailstringbodyrequired

Must be a valid email.

firstNamestringbody

Contact's first name.

lastNamestringbody

Contact's last name.

tagsstring[]body

Up to 50 tags.

customFieldsobjectbody

Custom key-value data.

statusstringbody

subscribed (default), unsubscribed, bounced, complained.

sourcestringbody

Where the contact came from (max 255 characters).

Response fields

successboolean

true when the contact was created.

dataobject

The created contact, including id and email.

Request
{
  "email":        "user@example.com",
  "firstName":    "Jane",
  "lastName":     "Doe",
  "tags":         ["customer"],
  "customFields": { "plan": "pro", "signup_source": "website" },
  "status":       "subscribed",
  "source":       "website"
}
201 — Created
{
  "success": true,
  "data": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "email": "user@example.com"
  }
}

Errors

  • 403 — Contact limit reached for your plan
  • 409 — Email already exists in your contacts

Delete a contact

DELETE/mail/v1/contacts

Permanently delete a contact. This also removes them from all segments.

Query parameters

idUUIDqueryrequired

ID of the contact to delete.

Response fields

successboolean

true when the contact was deleted.

Request
curl -X DELETE "https://api.misar.io/mail/v1/contacts?id=550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer msk_YOUR_API_KEY"
200 — OK
{ "success": true }

Bulk import contacts

POST/mail/v1/contacts/import

Bulk import contacts from a JSON body. Send a JSON array of 1 to 5,000 contacts.

Request body

contactsArray<Contact>bodyrequired

Contacts to import (1–5,000). Each entry accepts the same fields as a single create (email, firstName, tags, etc.).

updateExistingbooleanbodydefault: false

When true, existing contacts matched by email are updated instead of skipped.

Response fields

successboolean

true when the import completed.

summaryobject

Import counts: imported, updated, skipped, and errors (total error count).

errorsstring[]

Human-readable error messages (up to the first 20).

Request
{
  "contacts": [
    { "email": "alice@example.com", "firstName": "Alice", "tags": ["newsletter"] },
    { "email": "bob@example.com",   "firstName": "Bob"   }
  ],
  "updateExisting": true
}
200 — OK
{
  "success": true,
  "summary": {
    "imported": 1842,
    "updated":  143,
    "skipped":  15,
    "errors":   1
  },
  "errors": [
    "Row 3 (invalid-email): Invalid email format"
  ]
}

Errors

  • 403 — Bulk import not available on Free plan
  • 403 — Contact limit would be exceeded by this import
  • 415 — Request body must be JSON (Content-Type: application/json)