Navigation

Imara Com API

Build powerful integrations with the Imara Com platform. Manage contacts, conversations, campaigns, and more programmatically.

Quick Start

1. Get an API Token

Use the login endpoint with your account email and password. Copy the token value from the JSON response and paste it into Try It.

curl -X POST https://imara.digifrica.com/api/v1/auth/login \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"YOUR_PASSWORD","device_name":"api-docs"}'

2. Base URL

https://imara.digifrica.com/api/v1

3. Make Your First Request

curl -X GET https://imara.digifrica.com/api/v1/contacts \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json"

Authentication

All API requests require a valid Bearer token sent in the Authorization header.

Authorization: Bearer your-api-token

Tokens are scoped. When you create a token, you select which API sections it can access:

contacts conversations campaigns workflows knowledge-base ai analytics tags canned-responses

Requests to endpoints outside the token's scopes will receive a 403 Forbidden response.

Rate Limiting

API requests are rate-limited to protect service stability. Default limits:

ScopeLimit
General API60 requests/minute
Import/Export5 requests/minute
Campaign Send5 requests/minute
AI Generate Reply10 requests/minute
AI Analyze Sentiment20 requests/minute
KB Scrape3 requests/minute

Rate limit headers are included in every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 57
Retry-After: 42  // only when rate limited (429)

Errors

The API uses standard HTTP status codes. Errors return a JSON body with details:

CodeMeaning
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing token
403Forbidden - Token lacks required scope
404Not Found - Resource does not exist
422Validation Error - Check the errors object
429Too Many Requests - Rate limit exceeded
500Server Error - Unexpected failure
{
  "message": "Contact not found."
}

// Validation errors (422)
{
  "errors": {
    "email": ["The email field is required."]
  }
}

Authentication API

Create accounts, sign users in, recover passwords, and inspect the current token owner.

Public endpoints do not need a token. The logout/me endpoints require Bearer token auth.

Method Endpoint Use
POST /api/v1/auth/register Create a user account.
POST /api/v1/auth/login Sign in and receive an API token.
POST /api/v1/auth/forgot-password Start password reset.
POST /api/v1/auth/reset-password Complete password reset.
POST /api/v1/auth/social/{provider} Social login for google, microsoft, or github.
GET /api/v1/auth/me Return authenticated user details.
POST /api/v1/auth/logout Revoke the current token/session.

Complete Public /api/v1 Route Index

Every non-mobile public versioned API route exposed under /api/v1 for external integrations.

Most endpoints require Bearer token auth and the matching token ability. Mobile-only /api/v1/mobile routes are intentionally excluded.

Method Endpoint Use
GET /api/v1/contacts List contacts.
POST /api/v1/contacts Create a contact.
GET /api/v1/contacts/export Export contacts.
POST /api/v1/contacts/import Import contacts.
GET /api/v1/contacts/{contact} Show a contact.
PUT /api/v1/contacts/{contact} Update a contact. PATCH is also accepted.
DELETE /api/v1/contacts/{contact} Delete a contact.
GET /api/v1/conversations List conversations.
POST /api/v1/conversations Create a conversation.
GET /api/v1/conversations/{conversation} Show a conversation.
PUT /api/v1/conversations/{conversation} Update a conversation. PATCH is also accepted.
DELETE /api/v1/conversations/{conversation} Delete a conversation.
POST /api/v1/conversations/{conversation}/reply Reply to a conversation.
POST /api/v1/conversations/{conversation}/assign Assign a conversation.
POST /api/v1/conversations/{conversation}/close Close a conversation.
GET /api/v1/tags List tags.
POST /api/v1/tags Create a tag.
GET /api/v1/tags/{tag} Show a tag.
PUT /api/v1/tags/{tag} Update a tag. PATCH is also accepted.
DELETE /api/v1/tags/{tag} Delete a tag.
GET /api/v1/campaigns List campaigns.
POST /api/v1/campaigns Create a campaign.
GET /api/v1/campaigns/{campaign} Show a campaign.
PUT /api/v1/campaigns/{campaign} Update a campaign. PATCH is also accepted.
DELETE /api/v1/campaigns/{campaign} Delete a campaign.
POST /api/v1/campaigns/{campaign}/send Send a campaign.
GET /api/v1/workflows List workflows.
POST /api/v1/workflows Create a workflow.
GET /api/v1/workflows/{workflow} Show a workflow.
PUT /api/v1/workflows/{workflow} Update a workflow. PATCH is also accepted.
DELETE /api/v1/workflows/{workflow} Delete a workflow.
POST /api/v1/workflows/{workflow}/activate Activate a workflow.
POST /api/v1/workflows/{workflow}/pause Pause a workflow.
GET /api/v1/knowledge-base List knowledge base documents.
POST /api/v1/knowledge-base Create/upload a knowledge base document.
GET /api/v1/knowledge-base/{knowledge_base} Show a knowledge base document.
PUT /api/v1/knowledge-base/{knowledge_base} Update a knowledge base document. PATCH is also accepted.
DELETE /api/v1/knowledge-base/{knowledge_base} Delete a knowledge base document.
POST /api/v1/knowledge-base/scrape Scrape a URL into the knowledge base.
GET /api/v1/canned-responses List canned responses.
POST /api/v1/canned-responses Create a canned response.
GET /api/v1/canned-responses/{canned_response} Show a canned response.
PUT /api/v1/canned-responses/{canned_response} Update a canned response. PATCH is also accepted.
DELETE /api/v1/canned-responses/{canned_response} Delete a canned response.
POST /api/v1/ai/generate-reply Generate an AI reply.
POST /api/v1/ai/analyze-sentiment Analyze sentiment.
GET /api/v1/analytics/overview Get workspace analytics overview.
GET /api/v1/analytics/ai Get AI analytics.
GET /api/v1/analytics/team Get team analytics.
GET /api/v1/user Return the authenticated user.
GET /api/v1/workspace Return active workspace details.
GET /api/v1/sender-identities List sender identities.
POST /api/v1/sender-identities Create a sender identity.
PUT /api/v1/sender-identities/{senderIdentity} Update a sender identity. PATCH is also accepted.
DELETE /api/v1/sender-identities/{senderIdentity} Delete a sender identity.
POST /api/v1/sender-identities/{senderIdentity}/resend-verification Resend sender verification.
GET /api/v1/temp-mail/domains List temp-mail domains.
GET /api/v1/temp-mail/addresses List temp-mail addresses.
POST /api/v1/temp-mail/addresses Create a temp-mail address.
GET /api/v1/temp-mail/addresses/{uuid} Show a temp-mail address.
DELETE /api/v1/temp-mail/addresses/{uuid} Delete a temp-mail address.
GET /api/v1/temp-mail/addresses/{uuid}/messages List messages for a temp-mail address.
GET /api/v1/temp-mail/messages/{uuid} Read a temp-mail message.

Workspace & Sender Identity API

Read workspace context and manage verified sending identities used by campaigns.

Requires Bearer token. Sender identity operations use the authenticated workspace.

Method Endpoint Use
GET /api/v1/user Return the authenticated user.
GET /api/v1/workspace Return active workspace details.
GET /api/v1/sender-identities List sender identities.
POST /api/v1/sender-identities Create a sender identity.
PUT /api/v1/sender-identities/{senderIdentity} Update a sender identity.
DELETE /api/v1/sender-identities/{senderIdentity} Delete a sender identity.
POST /api/v1/sender-identities/{senderIdentity}/resend-verification Resend verification email.
GET /api/sender-identities/{senderIdentity}/verify Public verification link endpoint.

Temporary Mail API

Create disposable addresses and read received temporary messages.

Requires Bearer token with temp-mail ability.

Method Endpoint Use
GET /api/v1/temp-mail/domains List available temp-mail domains.
GET /api/v1/temp-mail/addresses List temp-mail addresses.
POST /api/v1/temp-mail/addresses Create a temp-mail address.
GET /api/v1/temp-mail/addresses/{uuid} Show one temp-mail address.
DELETE /api/v1/temp-mail/addresses/{uuid} Delete a temp-mail address.
GET /api/v1/temp-mail/addresses/{uuid}/messages List messages for an address.
GET /api/v1/temp-mail/messages/{uuid} Read a temp-mail message.

Live Chat Widget API

Browser-facing chat widget endpoints for starting chats, sending messages, reading history, rating, closing, and checking status.

Uses widget/workspace token parameters rather than Sanctum user tokens.

Method Endpoint Use
POST /api/widget/start-chat Start a widget chat session.
POST /api/widget/send-message Send a visitor message.
GET /api/widget/history Read widget conversation history.
POST /api/widget/rate Submit a chat rating.
POST /api/widget/close Close a chat session.
GET /api/widget/status Check widget availability/status.

Inbound Webhooks

Provider callback URLs for external messaging, payments, automation, and integrations.

Provider-specific signatures, tokens, or verification challenges apply.

Method Endpoint Use
ANY /api/webhooks/whatsapp WhatsApp verification and message callback.
POST /api/webhooks/twilio/incoming Twilio incoming SMS callback.
POST /api/webhooks/twilio/status Twilio delivery status callback.
POST /api/webhooks/mailgun Mailgun delivery event callback.
POST /api/webhooks/elastic-email Elastic Email delivery event callback.
POST /api/webhooks/telegram Telegram bot callback.
POST /api/webhooks/slack/events Slack events callback.
POST /api/webhooks/slack/commands Slack slash command callback.
POST /api/webhooks/slack/interactions Slack interactive component callback.
POST /api/webhooks/zapier/{webhookToken} Zapier incoming trigger callback.
ANY /payment/callback/{gateway} Payment gateway browser/server callback.
POST /payment/webhook/{gateway} Payment gateway webhook callback.
POST /stripe/webhook Stripe webhook callback.

Public Forms, Hooks & Tracking

Public endpoints used by forms, workflow automations, tracking pixels, unsubscribe links, and health checks.

Token or route-specific identifiers are used where applicable.

Method Endpoint Use
GET /form/{workflow} Render a public workflow form.
POST /form/{workflow} Submit a public workflow form.
POST /workflows/hook/{token} Receive an external workflow webhook.
GET /api/track/open/{messageId} Track email open.
GET /api/track/click/{messageId} Track email click.
GET /api/track/campaign/{recipientId}/open Track campaign open.
GET /api/track/campaign/{recipientId}/click Track campaign click.
GET /api/unsubscribe/{contactId} Unsubscribe a contact.
GET /api/health Health check endpoint.

Legacy / Internal API Routes

Older unversioned API routes still registered by the application. Prefer the /api/v1 equivalents for new integrations.

Treat these as deprecated or internal unless an existing integration already depends on them.

Method Endpoint Use
GET /api/contacts Legacy contacts list. Prefer GET /api/v1/contacts.
POST /api/contacts Legacy contact create. Prefer POST /api/v1/contacts.
GET /api/contacts/{contact} Legacy contact show. Prefer GET /api/v1/contacts/{contact}.
PUT /api/contacts/{contact} Legacy contact update. PATCH is also accepted. Prefer /api/v1.
DELETE /api/contacts/{contact} Legacy contact delete. Prefer DELETE /api/v1/contacts/{contact}.
GET /api/conversations Legacy conversations list. Prefer GET /api/v1/conversations.
POST /api/conversations Legacy conversation create. Prefer POST /api/v1/conversations.
GET /api/conversations/{conversation} Legacy conversation show. Prefer GET /api/v1/conversations/{conversation}.
PUT /api/conversations/{conversation} Legacy conversation update. PATCH is also accepted. Prefer /api/v1.
DELETE /api/conversations/{conversation} Legacy conversation delete. Prefer DELETE /api/v1/conversations/{conversation}.
POST /api/ai/generate-reply Legacy AI reply endpoint. Prefer POST /api/v1/ai/generate-reply.
GET /api/analytics/overview Legacy analytics endpoint. Prefer GET /api/v1/analytics/overview.
POST /api/knowledge-base/scrape Legacy knowledge-base scrape endpoint. Prefer POST /api/v1/knowledge-base/scrape.
GET /api/sender-identities/{senderIdentity}/verify Public sender verification endpoint. Kept outside /api/v1 because email links may already use it.
GET /inbox/api/accounts Internal web inbox API.
GET /inbox/api/conversations Internal web inbox API.
GET /inbox/api/conversations/{id}/messages Internal web inbox API.
POST /inbox/api/conversations/{id}/action Internal web inbox API.
POST /inbox/api/conversations/{id}/ai-chat Internal web inbox API.
POST /inbox/api/conversations/{id}/fetch-bodies Internal web inbox API.
POST /inbox/api/conversations/{id}/summarize Internal web inbox API.
GET /inbox/api/poll Internal web inbox API.
GET /inbox/api/sidebar Internal web inbox API.
GET /inbox/api/tags Internal web inbox API.
GET /inbox/api/team Internal web inbox API.
POST /inbox/api/bulk Internal web inbox API.
POST /inbox/api/set-timezone Internal web inbox API.
POST /inbox/api/sync Internal web inbox API.

Contacts

Manage your contact database. Requires contacts scope.

List contacts with search, filters, and pagination.

Parameters

Name Type Required Description
search string No Search by name, email, or company
status string No Filter: active, inactive, unsubscribed
tag_id integer No Filter by tag ID
country string No Filter by country
min_score integer No Minimum lead score (0-100)
max_score integer No Maximum lead score (0-100)
sort_by string No Sort field: first_name, last_name, email, company, lead_score, created_at, last_contacted_at
sort_dir string No asc or desc (default: desc)
per_page integer No Results per page (max 100, default 25)

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/contacts?search=john&per_page=10' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {
      "id": 1,
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@example.com",
      "phone": "+1234567890",
      "company": "Acme Inc",
      "lead_score": 75,
      "status": "active",
      "tags": [{"id": 1, "name": "VIP"}],
      "created_at": "2026-03-01T10:00:00Z"
    }
  ],
  "links": { "first": "...", "last": "...", "prev": null, "next": "..." },
  "meta": { "current_page": 1, "last_page": 5, "per_page": 10, "total": 48 }
}

Create a new contact.

Parameters

Name Type Required Description
first_name string Yes Contact first name (max 255)
last_name string No Contact last name
email string Yes Valid email address
phone string No Phone number
company string No Company name
job_title string No Job title
city string No City
country string No Country
lead_score integer No Lead score (0-100)
custom_fields object No Custom field key-value pairs
tag_ids array No Array of tag IDs to assign

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/contacts' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"first_name":"Jane","email":"jane@example.com","company":"Acme"}'

Example Response

{
  "data": {
    "id": 42,
    "first_name": "Jane",
    "last_name": null,
    "email": "jane@example.com",
    "company": "Acme",
    "lead_score": 0,
    "status": "active",
    "tags": [],
    "created_at": "2026-03-22T14:30:00Z"
  }
}

Retrieve a single contact by ID.

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/contacts/42' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": {
    "id": 42,
    "first_name": "Jane",
    "last_name": "Smith",
    "email": "jane@example.com",
    "conversations_count": 12,
    "deals_count": 3
  }
}

Update a contact. Only send fields you want to change.

Parameters

Name Type Required Description
first_name string No Contact first name
email string No Valid email address
status string No active, inactive, or unsubscribed
tag_ids array No Replace all tags with these IDs

Example Request

curl -X PUT 'https://imara.digifrica.com/api/v1/contacts/42' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"lead_score":90,"status":"active"}'

Example Response

{
  "data": {
    "id": 42,
    "first_name": "Jane",
    "lead_score": 90,
    "status": "active"
  }
}

Soft-delete a contact.

Example Request

curl -X DELETE 'https://imara.digifrica.com/api/v1/contacts/42' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Example Response

204 No Content

Import contacts from a CSV file. Rate limited to 5 req/min.

Parameters

Name Type Required Description
file file Yes CSV/XLSX file (max 10MB). Headers: first_name, last_name, email, phone, company, etc.

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/contacts/import' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -F 'file=@contacts.csv'

Example Response

{
  "data": {
    "imported": 142,
    "skipped": 3,
    "errors": ["Row 15: invalid email 'not-an-email'"]
  }
}

Export all contacts as a streamed CSV download. Rate limited to 5 req/min.

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/contacts/export' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -o contacts.csv

Example Response

Binary CSV file stream

Conversations

Manage inbox conversations. Requires conversations scope.

List conversations with filters and pagination.

Parameters

Name Type Required Description
status string No Filter: open, closed, snoozed
channel string No Filter by channel: email, chat, whatsapp, sms
assigned_to integer No Filter by assigned user ID
contact_id integer No Filter by contact ID
per_page integer No Results per page (max 100)

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/conversations?status=open' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {
      "id": 1,
      "subject": "Billing question",
      "status": "open",
      "channel": "email",
      "contact": {"id": 5, "email": "user@example.com"},
      "assigned_to": {"id": 2, "name": "Agent Smith"},
      "last_message_at": "2026-03-22T09:30:00Z"
    }
  ],
  "meta": {"current_page": 1, "total": 24}
}

Send a reply to a conversation.

Parameters

Name Type Required Description
body string Yes Reply message body (HTML supported)
internal boolean No If true, add as internal note (not sent to contact)

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/conversations/1/reply' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"body":"Thanks for reaching out! We will look into this."}'

Example Response

{
  "data": {
    "id": 145,
    "conversation_id": 1,
    "body": "Thanks for reaching out! We will look into this.",
    "type": "reply",
    "created_at": "2026-03-22T14:30:00Z"
  }
}

Assign a conversation to a team member.

Parameters

Name Type Required Description
user_id integer Yes User ID to assign the conversation to

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/conversations/1/assign' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"user_id":3}'

Example Response

{
  "data": {"id": 1, "assigned_to": {"id": 3, "name": "Agent Jones"}}
}

Close a conversation.

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/conversations/1/close' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Example Response

{
  "data": {"id": 1, "status": "closed"}
}

Campaigns

Create and manage email campaigns. Requires campaigns scope.

List campaigns with filters.

Parameters

Name Type Required Description
status string No Filter: draft, scheduled, sending, sent, paused
type string No Filter by campaign type
search string No Search by name or subject

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/campaigns?status=sent' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {
      "id": 1,
      "name": "March Newsletter",
      "subject": "What is new in March",
      "status": "sent",
      "sent_count": 1250,
      "open_rate": 34.5,
      "click_rate": 8.2,
      "created_at": "2026-03-01T08:00:00Z"
    }
  ]
}

Create a new campaign (draft).

Parameters

Name Type Required Description
name string Yes Campaign name
subject string Yes Email subject line
html_body string Yes HTML email body
segment_id integer No Segment ID to target

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/campaigns' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"April Promo","subject":"Special offer inside","html_body":"<h1>Hello!</h1>"}'

Example Response

{
  "data": {"id": 15, "name": "April Promo", "status": "draft"}
}

Send or schedule a campaign. Rate limited to 5 req/min.

Parameters

Name Type Required Description
scheduled_at datetime No ISO 8601 datetime to schedule (omit to send immediately)

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/campaigns/15/send' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json'

Example Response

{
  "data": {"id": 15, "status": "sending"}
}

Workflows

Manage automation workflows. Requires workflows scope.

List all workflows.

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/workflows' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {"id": 1, "name": "Welcome Series", "status": "active", "trigger": "contact.created", "executions_count": 342}
  ]
}

Activate a paused workflow.

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/workflows/1/activate' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Example Response

{"data": {"id": 1, "status": "active"}}

Pause an active workflow.

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/workflows/1/pause' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Example Response

{"data": {"id": 1, "status": "paused"}}

Knowledge Base

Manage KB documents for AI context. Requires knowledge-base scope.

List knowledge base documents.

Parameters

Name Type Required Description
search string No Search document titles
per_page integer No Results per page

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/knowledge-base' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {"id": 1, "title": "Product FAQ", "type": "file", "file_size": 245760, "chunks_count": 24, "created_at": "2026-03-10T12:00:00Z"}
  ]
}

Upload a document to the knowledge base.

Parameters

Name Type Required Description
title string Yes Document title
file file Yes PDF, DOCX, or TXT file

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/knowledge-base' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -F 'title=Return Policy' \
  -F 'file=@return-policy.pdf'

Example Response

{
  "data": {"id": 5, "title": "Return Policy", "status": "processing"}
}

Scrape a website URL and add it to the knowledge base. Rate limited to 3 req/min.

Parameters

Name Type Required Description
url string Yes URL to scrape
title string No Custom title (auto-detected if omitted)

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/knowledge-base/scrape' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/help"}'

Example Response

{
  "data": {"id": 6, "title": "Help Center", "type": "url", "status": "processing"}
}

AI

AI-powered features. Requires ai scope. Stricter rate limits apply.

Generate an AI-powered reply for a conversation. Rate limited to 10 req/min.

Parameters

Name Type Required Description
conversation_id integer Yes Conversation to generate a reply for
tone string No Reply tone: professional, friendly, concise
instructions string No Additional context for the AI

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/ai/generate-reply' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"conversation_id":1,"tone":"professional"}'

Example Response

{
  "data": {
    "reply": "Thank you for contacting us regarding your billing inquiry...",
    "tokens_used": 245,
    "model": "gpt-4"
  }
}

Analyze the sentiment of a text or conversation. Rate limited to 20 req/min.

Parameters

Name Type Required Description
text string No Text to analyze (provide this or conversation_id)
conversation_id integer No Conversation ID to analyze

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/ai/analyze-sentiment' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"text":"I am very frustrated with the late delivery"}'

Example Response

{
  "data": {
    "sentiment": "negative",
    "score": -0.78,
    "emotions": ["frustration", "disappointment"],
    "urgency": "high"
  }
}

Analytics

Read-only analytics data. Requires analytics scope.

Get workspace analytics overview.

Parameters

Name Type Required Description
period string No 7d, 30d, 90d (default: 30d)

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/analytics/overview?period=30d' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": {
    "conversations": {"total": 524, "open": 38, "avg_resolution_hours": 4.2},
    "contacts": {"total": 12500, "new_this_period": 320},
    "campaigns": {"sent": 8, "avg_open_rate": 32.1, "avg_click_rate": 6.8},
    "ai": {"replies_generated": 186, "tokens_used": 45200}
  }
}

Get team performance metrics.

Parameters

Name Type Required Description
period string No 7d, 30d, 90d

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/analytics/team' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {"user_id": 2, "name": "Agent Smith", "conversations_handled": 142, "avg_response_minutes": 12, "satisfaction_score": 4.6}
  ]
}

Tags

Manage workspace tags. Requires tags scope.

List all tags in the workspace.

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/tags' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {"id": 1, "name": "VIP", "color": "#8B5CF6", "contacts_count": 42},
    {"id": 2, "name": "Lead", "color": "#3B82F6", "contacts_count": 198}
  ]
}

Create a new tag.

Parameters

Name Type Required Description
name string Yes Tag name (unique per workspace)
color string No Hex color code (e.g. #8B5CF6)

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/tags' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"name":"Enterprise","color":"#EF4444"}'

Example Response

{
  "data": {"id": 3, "name": "Enterprise", "color": "#EF4444"}
}

Delete a tag. Contacts are NOT deleted.

Example Request

curl -X DELETE 'https://imara.digifrica.com/api/v1/tags/3' \
  -H 'Authorization: Bearer YOUR_TOKEN'

Example Response

204 No Content

Canned Responses

Manage saved reply templates. Requires canned-responses scope.

List all canned responses.

Example Request

curl -X GET 'https://imara.digifrica.com/api/v1/canned-responses' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'

Example Response

{
  "data": [
    {"id": 1, "title": "Greeting", "shortcut": "/greet", "body": "Hello! How can I help you today?"}
  ]
}

Create a new canned response.

Parameters

Name Type Required Description
title string Yes Template title
shortcut string No Slash command shortcut (e.g. /thanks)
body string Yes Response body (HTML supported)

Example Request

curl -X POST 'https://imara.digifrica.com/api/v1/canned-responses' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"title":"Thanks","shortcut":"/thanks","body":"Thank you for your patience!"}'

Example Response

{
  "data": {"id": 5, "title": "Thanks", "shortcut": "/thanks", "body": "Thank you for your patience!"}
}

Try It

Test common Bearer-token endpoints directly from this page. The complete route list is in the endpoint sections above.