Skip to content

Moving to Motenya

A customer moving from another help desk can be set up mostly through the API or MCP, by a script or an AI agent. People still do three things in the admin: connect the email channels, add domains and invite the team.

A product holds a knowledge base, an inbox and a CRM. Its modules are billed per month while on, so only a key the account owner gave products:write can create one.

Terminal window
curl -X POST "https://api.motenya.app/v1/products" \
-H "Authorization: Bearer $MOTENYA_KEY" -H "Content-Type: application/json" \
-d '{ "name": "Casa Verde", "businessType": "ecommerce",
"modules": { "ticketing": true, "knowledgeBase": true },
"knowledgeBase": { "slug": "casa-verde", "language": "ro" } }'

With the knowledge base on, its KB is created too. Its slug and language are checked first: SLUG_TAKEN, SLUG_INVALID or LANGUAGE_INVALID means nothing was created. If the KB still can’t be made, the product exists without the knowledge base module and KNOWLEDGE_BASE_NOT_CREATED names it; don’t create it again, switch the module on in the admin. PATCH /products/{productId} renames it, changes its business type or switches modules. A key limited to some products can’t create products.

From Intercom, connect it as an integration. It brings the history over first, then picks up new and changed conversations every 15 minutes for as long as it stays connected. That also works as a lasting setup: the team keeps answering in Intercom while Motenya holds the CRM, with tickets kept current from Intercom.

From anything else, send each conversation to POST /products/{productId}/tickets/import (tickets:write):

Terminal window
curl -X POST "https://api.motenya.app/v1/products/$PRODUCT/tickets/import" \
-H "Authorization: Bearer $MOTENYA_KEY" -H "Content-Type: application/json" \
-d '{ "source": "zendesk", "externalId": "7781",
"channelAddress": "support@casa-verde.in.motenya.app",
"customer": { "email": "ion@example.com", "name": "Ion" },
"subject": "Broken hinge", "status": "CLOSED", "assigneeEmail": "maria@casa-verde.ro",
"tags": ["warranty"], "createdAt": "2025-03-01T09:00:00Z", "updatedAt": "2025-03-01T09:30:00Z",
"messages": [
{ "externalId": "m1", "kind": "CUSTOMER", "authorEmail": "ion@example.com",
"bodyHtml": "<p>The hinge broke.</p>", "createdAt": "2025-03-01T09:00:00Z" },
{ "externalId": "m2", "kind": "REPLY", "authorEmail": "maria@casa-verde.ro",
"bodyText": "Sending a new one.", "createdAt": "2025-03-01T09:10:00Z",
"attachments": [ { "url": "https://files.example.com/invoice.pdf", "filename": "invoice.pdf" } ] } ] }'
  • The ticket is written as it happened: original times, authors, status, assignee and tags. Nothing is emailed or notified, and history doesn’t show as unread.
  • source + externalId identify the ticket (source ignores case), and each message’s externalId identifies it within the ticket. Sending the same ticket again adds only the messages it lacks, so an import can be repeated or resumed safely, and a long thread can be sent in parts.
  • Send updatedAt every time. The ticket takes the source’s subject, status, priority, assignee and tags when updatedAt is at or after its last change in Motenya; otherwise what the team did in Motenya stands. A ticket marked spam or ignored in Motenya stays so, and new messages for a ticket merged in Motenya go to the ticket it was merged into.
  • SNOOZED needs snoozedUntil in the future; without it the ticket comes in open. A sender blocked in Motenya starts as spam.
  • Imported messages never show as unread.
  • Teammates are matched by email (authorEmail on replies and notes, assigneeEmail). Anyone else keeps their name on their messages.
  • Files are copied from their url (https, up to 25 MB, at most 100 per call). One that can’t be read is kept as unavailable.
  • channelAddress is the email channel replies go out from. Without it, the ticket keeps its history but can’t be answered by email.
  • Imported tickets show importedFrom as api:<source>, lowercase.

POST /products/{productId}/tickets opens a ticket for a request that came in another way, such as a phone call, your own form or an AI agent’s hand-off:

Terminal window
curl -X POST "https://api.motenya.app/v1/products/$PRODUCT/tickets" \
-H "Authorization: Bearer $MOTENYA_KEY" -H "Content-Type: application/json" \
-d '{ "channelAddress": "support@casa-verde.in.motenya.app",
"customer": { "email": "ana@example.com", "name": "Ana" },
"subject": "Refund for order 1001",
"message": "Called to ask for a refund.",
"reply": { "body": "We have started your refund; it takes 3–5 days." },
"notify": true }'

message records what the customer asked. reply is the key’s first answer, which leaves the ticket pending (or solved, with "solve": true). Opening a ticket sends nothing unless "notify": true, which emails reply to the customer; their answers then thread back onto the ticket like any email.

Replies to an existing ticket (POST …/tickets/{id}/replies) are emailed by default, so an AI agent can answer and close tickets ("solve": true). Pass "notify": false to record a reply without sending it.