METRICRM
Pembangun · REST API v1.0.0

REST API MetriCRM

Sambungkan ERP, laman web, alat BI atau sebarang sistem lain kepada MetriCRM. Setiap titik akhir di bawah dijana daripada peraturan yang sama yang digunakan oleh aplikasi, jadi apa yang boleh dilakukan melalui API sentiasa sepadan dengan apa yang boleh dilakukan oleh pemilik kunci dalam MetriCRM.

Penerangan titik akhir dan medan adalah dalam bahasa Inggeris.

Pengesahan

Cipta kunci di Tetapan → Kunci API dan hantarkannya sebagai token bearer. Kunci berbentuk mck_ruang-kerja-anda_…, bertindak sebagai orang yang menciptanya dan hanya mencapai sumber dalam skopnya. Gunakan api.metricrm.com/v1 atau alamat ruang kerja anda diikuti /api/v1.

curl https://api.metricrm.com/v1/me \
  -H "Authorization: Bearer mck_your-workspace_…"

Penomboran dan penapis

Senarai memulangkan sehingga 100 rekod setiap halaman bersama nextCursor; hantarkannya semula sebagai cursor untuk halaman seterusnya. Isih mengikut createdAt atau updatedAt dalam mana-mana susunan, dan gunakan updatedSince untuk menyegerakkan perubahan sahaja.

curl "https://api.metricrm.com/v1/contacts?limit=50&updatedSince=2026-10-01T00:00:00Z&order=asc&sort=updatedAt"
# → { "data": [ … ], "nextCursor": "WyIyMDI2LTEwLTEz…" }
curl "https://api.metricrm.com/v1/contacts?limit=50&cursor=WyIyMDI2LTEwLTEz…"

Ralat

Ralat menggunakan kod status HTTP biasa dan satu bentuk JSON: kod untuk program anda, mesej yang mudah dibaca dan, bagi input tidak sah, medan yang perlu dibetulkan. 401 bermaksud kunci tiada atau tidak lagi sah; 403 bermaksud skop, peranan pemilik atau senarai IP kunci tidak membenarkan panggilan itu; 404 juga merangkumi rekod yang tidak dapat dilihat oleh kunci.

HTTP/1.1 400 Bad Request
{ "error": { "code": "invalid_request",
    "message": "Some fields are missing or invalid.",
    "details": [ { "path": "email", "message": "Invalid email address" } ] } }

Had kadar

Setiap kunci mempunyai hadnya sendiri seminit (600 secara lalai, ditetapkan semasa mencipta kunci). Setiap respons menunjukkan baki anda; apabila had dicapai, tunggu bilangan saat dalam Retry-After.

HTTP/1.1 429 Too Many Requests
RateLimit-Limit: 600
RateLimit-Remaining: 0
RateLimit-Reset: 42
Retry-After: 42

Idempotensi

Hantar pengepala Idempotency-Key bersama permintaan POST. Jika rangkaian gagal dan anda mencuba semula dengan kunci dan kandungan yang sama dalam 24 jam, anda menerima respons pertama dan bukannya rekod pendua.

curl https://api.metricrm.com/v1/contacts \
  -H "Authorization: Bearer $METRICRM_API_KEY" \
  -H "Idempotency-Key: 6f1c2a9e-0b6d-4c1e-9a55-2f1d0e7b3c11" \
  -H "Content-Type: application/json" \
  -d '{"firstName":"Aisyah","lastName":"Rahman","email":"aisyah@sinar.my"}'

Webhook

Tetapan → Webhook menghantar peristiwa (case.created, invoice.paid …) ke titik akhir HTTPS anda sebagai JSON. Setiap permintaan ditandatangani mengikut Standard Webhooks: sahkan webhook-signature dengan rahsia whsec_ titik akhir anda, tolak cap masa lama dan gunakan webhook-id untuk mengabaikan ulangan. Jawab dengan sebarang status 2xx; selainnya dicuba semula selama kira-kira 3½ hari.

// Node.js: verify a MetriCRM webhook (Standard Webhooks)
import { createHmac, timingSafeEqual } from "node:crypto";

function verify(secret, headers, rawBody) {
  const id = headers["webhook-id"], ts = headers["webhook-timestamp"];
  if (Math.abs(Date.now() / 1000 - Number(ts)) > 300) return false; // too old
  const key = Buffer.from(secret.replace(/^whsec_/, ""), "base64");
  const expected = createHmac("sha256", key).update(`${id}.${ts}.${rawBody}`).digest();
  return headers["webhook-signature"].split(" ").some((s) => {
    const sig = Buffer.from(s.split(",")[1] ?? "", "base64");
    return sig.length === expected.length && timingSafeEqual(sig, expected);
  });
}

// Body: { "type": "case.created", "timestamp": "…",
//         "data": { "id": "…", "entityType": "case", "object": { … }, "changes": { … } } }

Authentication

Check which key and workspace you are using.

curl "https://api.metricrm.com/v1/me?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/me— Check a key

Returns the workspace, the key's name and scopes, and the user it acts as.

Accounts

Companies you do business with.

curl "https://api.metricrm.com/v1/accounts?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/accounts— List accounts

Companies you do business with. Requires the `accounts:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
ownerIdstring (uuid)Only accounts owned by this user.
teamIdstring (uuid)Only accounts of this team.
parentIdstring (uuid)Only child accounts of this account.
emailstringExact email address (lower case).
tierstringExact tier.
POST/v1/accounts— Create an account

Requires the `accounts:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
namewajibstring
legalNamestring | null
registrationNostring | null
industrystring | null
websitestring | null
emailstring (email) | null | ""
phonestring | null
addressobject | null
tierstring | null
parentIdstring (uuid) | null
ownerIdstring (uuid) | null
backupOwnerIdstring (uuid) | null
teamIdstring (uuid) | null
tagsstring[]
customobject
GET/v1/accounts/{id}— Get one record

Requires the `accounts:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/accounts/{id}— Update an account

Requires the `accounts:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
namestring
legalNamestring | null
registrationNostring | null
industrystring | null
websitestring | null
emailstring (email) | null | ""
phonestring | null
addressobject | null
tierstring | null
parentIdstring (uuid) | null
ownerIdstring (uuid) | null
backupOwnerIdstring (uuid) | null
teamIdstring (uuid) | null
tagsstring[]
customobject
DELETE/v1/accounts/{id}— Move an account to the recycle bin

Requires the `accounts:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Account
idwajibstring (uuid)
numberwajibstring | null
namewajibstring
legalNamewajibstring | null
registrationNowajibstring | null
industrywajibstring | null
websitewajibstring | null
emailwajibstring | null
phonewajibstring | null
addresswajibobject | null
tierwajibstring | null
parentIdwajibstring (uuid) | null
ownerIdwajibstring (uuid) | null
teamIdwajibstring (uuid) | null
tagswajibstring[]
customwajibobjectCustom field values by field key.
lastActivityAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Contacts

People at your customers.

curl "https://api.metricrm.com/v1/contacts?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/contacts— List contacts

People at your customers. Requires the `contacts:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
accountIdstring (uuid)Only contacts whose primary account is this.
ownerIdstring (uuid)Only contacts owned by this user.
emailstringExact email address (lower case).
mobilestringExact mobile number in E.164 (+60…).
POST/v1/contacts— Create a contact

Requires the `contacts:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
firstNamestring | null
lastNamestring | null
fullNamestring | null
emailstring (email) | null | ""
mobilestring | null
officestring | null
homestring | null
titlestring | null
departmentstring | null
locale"en" | "ms" | "zh-CN" | null
ownerIdstring (uuid) | null
teamIdstring (uuid) | null
tagsstring[]
customobject
accountIdstring (uuid) | null
accountRolestring | null
GET/v1/contacts/{id}— Get one record

Requires the `contacts:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/contacts/{id}— Update a contact

Requires the `contacts:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
firstNamestring | null
lastNamestring | null
fullNamestring | null
emailstring (email) | null | ""
mobilestring | null
officestring | null
homestring | null
titlestring | null
departmentstring | null
locale"en" | "ms" | "zh-CN" | null
ownerIdstring (uuid) | null
teamIdstring (uuid) | null
tagsstring[]
customobject
DELETE/v1/contacts/{id}— Move a contact to the recycle bin

Requires the `contacts:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Contact
idwajibstring (uuid)
numberwajibstring | null
firstNamewajibstring | null
lastNamewajibstring | null
fullNamewajibstring
emailwajibstring | null
mobilewajibstring | null
officewajibstring | null
homewajibstring | null
titlewajibstring | null
departmentwajibstring | null
localewajibstring | null
primaryAccountIdwajibstring (uuid) | null
ownerIdwajibstring (uuid) | null
teamIdwajibstring (uuid) | null
tagswajibstring[]
customwajibobjectCustom field values by field key.
lastActivityAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Cases

Customer service cases (MetriCare). New cases are routed like any other case.

curl "https://api.metricrm.com/v1/cases?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/cases— List cases

Customer service cases (MetriCare). New cases are routed like any other case. Requires the `cases:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status key.
prioritystringExact priority key.
accountIdstring (uuid)Only cases of this account.
contactIdstring (uuid)Only cases of this contact.
assigneeIdstring (uuid)Only cases assigned to this user.
teamIdstring (uuid)Only cases of this team.
POST/v1/cases— Create a case

Requires the `cases:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
subjectwajibstring
descriptionstring
categoryIdstring (uuid) | null
subCategoryIdstring (uuid) | null
prioritystring | null
statusstring | null
accountIdstring (uuid) | null
contactIdstring (uuid) | null
assigneeIdstring (uuid) | null
teamIdstring (uuid) | null
tagsstring[]
customobject
GET/v1/cases/{id}— Get one record

Requires the `cases:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/cases/{id}— Update a case

Requires the `cases:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
subjectstring
descriptionstring
categoryIdstring (uuid) | null
subCategoryIdstring (uuid) | null
prioritystring
accountIdstring (uuid) | null
contactIdstring (uuid) | null
tagsstring[]
customobject
resolutionstring | null
DELETE/v1/cases/{id}— Delete a case

Requires the `cases:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Case
idwajibstring (uuid)
numberwajibstring
subjectwajibstring
descriptionwajibstring
channelwajibstring
categoryIdwajibstring (uuid) | null
subCategoryIdwajibstring (uuid) | null
prioritywajibstring
statuswajibstring
statusCategorywajibstring
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
assigneeIdwajibstring (uuid) | null
teamIdwajibstring (uuid) | null
tagswajibstring[]
customwajibobjectCustom field values by field key.
resolutionwajibstring | null
languagewajibstring | null
firstResponseDueAtwajibstring (date-time) | null
resolutionDueAtwajibstring (date-time) | null
firstRespondedAtwajibstring (date-time) | null
slaStatewajibstring
resolvedAtwajibstring (date-time) | null
closedAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Case comments

Replies and internal notes on cases. A public comment is emailed to the case contact.

curl "https://api.metricrm.com/v1/comments?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/comments— List case comments

Replies and internal notes on cases. A public comment is emailed to the case contact. Requires the `cases:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
caseIdstring (uuid)Only comments on this case.
kind"public" | "internal"Public replies or notes.
POST/v1/comments— Add a reply or internal note to a case

Requires the `cases:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
caseIdwajibstring (uuid)
kindwajib"public" | "internal"
htmlwajibstringHTML body (sanitised).
GET/v1/comments/{id}— Get one record

Requires the `cases:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek CaseComment
idwajibstring (uuid)
caseIdwajibstring (uuid)
kindwajib"public" | "internal"
authorTypewajibstring
authorIdwajibstring (uuid) | null
authorNamewajibstring | null
bodywajibstringSanitised HTML.
viawajibstring | null
createdAtwajibstring (date-time)

Leads

Prospects to qualify (MetriSales). New leads are routed to a sales rep.

curl "https://api.metricrm.com/v1/leads?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/leads— List leads

Prospects to qualify (MetriSales). New leads are routed to a sales rep. Requires the `leads:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status.
ownerIdstring (uuid)Only leads owned by this user.
emailstringExact email address (lower case).
POST/v1/leads— Create a lead

Requires the `leads:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
fullNamewajibstring
companyNamestring | null
emailstring (email) | null | ""
phonestring | null
source"web_form" | "email" | "chat" | "social" | "import" | "api" | "manual"
sourceDetailstring | null
ownerIdstring (uuid) | null
teamIdstring (uuid) | null
fieldsobject
languagestring | null
GET/v1/leads/{id}— Get one record

Requires the `leads:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/leads/{id}— Update a lead

Requires the `leads:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
fullNamestring
companyNamestring | null
emailstring (email) | null | ""
phonestring | null
status"new" | "contacted" | "qualifying"
fieldsobject
DELETE/v1/leads/{id}— Delete a lead

Requires the `leads:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Lead
idwajibstring (uuid)
numberwajibstring
fullNamewajibstring
companyNamewajibstring | null
emailwajibstring | null
phonewajibstring | null
sourcewajibstring
sourceDetailwajibstring | null
statuswajibstring
ownerIdwajibstring (uuid) | null
teamIdwajibstring (uuid) | null
fieldswajibobject
scorewajibinteger | null
languagewajibstring | null
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
dealIdwajibstring (uuid) | null
convertedAtwajibstring (date-time) | null
disqualifiedReasonwajibstring | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Opportunities

Deals in your sales pipelines.

curl "https://api.metricrm.com/v1/opportunities?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/opportunities— List opportunities

Deals in your sales pipelines. Requires the `deals:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
status"open" | "won" | "lost"Open, won or lost.
pipelineIdstring (uuid)Only deals in this pipeline.
stageKeystringExact stage key.
accountIdstring (uuid)Only deals of this account.
ownerIdstring (uuid)Only deals owned by this user.
POST/v1/opportunities— Create an opportunity

Requires the `deals:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
namewajibstring
accountIdstring (uuid) | null
contactIdstring (uuid) | null
pipelineIdstring (uuid) | null
stageKeystring | null
amountSeninteger
currencystring
expectedCloseDatestring (date) | null
ownerIdstring (uuid) | null
teamIdstring (uuid) | null
sourcestring | null
competitorsstring[]
nextStepstring | null
GET/v1/opportunities/{id}— Get one record

Requires the `deals:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/opportunities/{id}— Update an opportunity

Requires the `deals:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
namestring
accountIdstring (uuid) | null
contactIdstring (uuid) | null
amountSeninteger
expectedCloseDatestring (date) | null
ownerIdstring (uuid) | null
teamIdstring (uuid) | null
sourcestring | null
competitorsstring[]
nextStepstring | null
DELETE/v1/opportunities/{id}— Delete an opportunity

Requires the `deals:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Opportunity
idwajibstring (uuid)
numberwajibstring
namewajibstring
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
pipelineIdwajibstring (uuid) | null
stageKeywajibstring
probabilitywajibinteger
amountSenwajibintegerDeal value in the smallest currency unit (sen for MYR).
currencywajibstring
expectedCloseDatewajibstring (date) | null
ownerIdwajibstring (uuid) | null
teamIdwajibstring (uuid) | null
sourcewajibstring | null
leadIdwajibstring (uuid) | null
competitorswajibstring[]
nextStepwajibstring | null
statuswajib"open" | "won" | "lost"
wonAtwajibstring (date-time) | null
lostAtwajibstring (date-time) | null
lostReasonwajibstring | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Quotations

Quotations with line items, discounts and SST. Approval rules still apply.

curl "https://api.metricrm.com/v1/quotations?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/quotations— List quotations

Quotations with line items, discounts and SST. Approval rules still apply. Requires the `quotations:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status.
dealIdstring (uuid)Only quotations for this opportunity.
accountIdstring (uuid)Only quotations for this account.
POST/v1/quotations— Create a draft quotation

Requires the `quotations:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
titlewajibstring
dealIdstring (uuid) | null
accountIdstring (uuid) | null
contactIdstring (uuid) | null
priceListIdstring (uuid) | null
tierstring | null
language"en" | "ms" | "zh-CN"
validUntilstring | null
paymentTermsDaysinteger | null
termsstring | null
notesstring | null
itemsobject[]
GET/v1/quotations/{id}— Get one record

Requires the `quotations:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/quotations/{id}— Replace a draft quotation (send every field and all line items)

Requires the `quotations:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
titlewajibstring
dealIdstring (uuid) | null
accountIdstring (uuid) | null
contactIdstring (uuid) | null
priceListIdstring (uuid) | null
tierstring | null
language"en" | "ms" | "zh-CN"
validUntilstring | null
paymentTermsDaysinteger | null
termsstring | null
notesstring | null
itemsobject[]
DELETE/v1/quotations/{id}— Delete a draft quotation

Requires the `quotations:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Quotation
idwajibstring (uuid)
numberwajibstring
versionwajibinteger
titlewajibstring
dealIdwajibstring (uuid) | null
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
ownerIdwajibstring (uuid) | null
statuswajibstring
currencywajibstring
languagewajibstring
validUntilwajibstring (date) | null
paymentTermsDayswajibinteger | null
termswajibstring | null
grossSenwajibintegerBefore discount and tax in the smallest currency unit (sen for MYR).
discountSenwajibintegerDiscount in the smallest currency unit (sen for MYR).
taxSenwajibintegerTax in the smallest currency unit (sen for MYR).
totalSenwajibintegerTotal in the smallest currency unit (sen for MYR).
sentAtwajibstring (date-time) | null
decidedAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Orders

Sales orders, created from accepted quotations.

curl "https://api.metricrm.com/v1/orders?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/orders— List orders

Sales orders, created from accepted quotations. Requires the `orders:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status.
accountIdstring (uuid)Only orders of this account.
quoteIdstring (uuid)Only the order for this quotation.
POST/v1/orders— Create the sales order for an accepted quotation

Requires the `orders:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
quoteIdwajibstring (uuid)
GET/v1/orders/{id}— Get one record

Requires the `orders:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Order
idwajibstring (uuid)
numberwajibstring
quoteIdwajibstring (uuid) | null
dealIdwajibstring (uuid) | null
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
ownerIdwajibstring (uuid) | null
titlewajibstring
statuswajibstring
currencywajibstring
totalSenwajibintegerTotal in the smallest currency unit (sen for MYR).
taxSenwajibintegerTax in the smallest currency unit (sen for MYR).
fulfilledAtwajibstring (date-time) | null
cancelledAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Invoices

Invoices with SST and payment status.

curl "https://api.metricrm.com/v1/invoices?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/invoices— List invoices

Invoices with SST and payment status. Requires the `invoices:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status.
accountIdstring (uuid)Only invoices of this account.
orderIdstring (uuid)Only invoices for this order.
POST/v1/invoices— Create a draft invoice

Requires the `invoices:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
titlewajibstring
accountIdstring (uuid) | null
contactIdstring (uuid) | null
language"en" | "ms" | "zh-CN"
issueDatestring | null
paymentTermsDaysinteger | null
termsstring | null
notesstring | null
itemsobject[]
GET/v1/invoices/{id}— Get one record

Requires the `invoices:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/invoices/{id}— Replace a draft invoice (send every field and all line items)

Requires the `invoices:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
titlewajibstring
accountIdstring (uuid) | null
contactIdstring (uuid) | null
language"en" | "ms" | "zh-CN"
issueDatestring | null
paymentTermsDaysinteger | null
termsstring | null
notesstring | null
itemsobject[]
Objek Invoice
idwajibstring (uuid)
numberwajibstring
orderIdwajibstring (uuid) | null
dealIdwajibstring (uuid) | null
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
ownerIdwajibstring (uuid) | null
titlewajibstring
statuswajibstring
currencywajibstring
languagewajibstring
issueDatewajibstring (date)
dueDatewajibstring (date)
paymentTermsDayswajibinteger
totalSenwajibintegerTotal in the smallest currency unit (sen for MYR).
taxSenwajibintegerTax in the smallest currency unit (sen for MYR).
paidSenwajibintegerPaid so far in the smallest currency unit (sen for MYR).
sentAtwajibstring (date-time) | null
paidAtwajibstring (date-time) | null
voidedAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Payments

Payments recorded against invoices (bank transfer, cash, cheque, card).

curl "https://api.metricrm.com/v1/payments?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/payments— List payments

Payments recorded against invoices (bank transfer, cash, cheque, card). Requires the `invoices:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
invoiceIdstring (uuid)Only payments for this invoice.
POST/v1/payments— Record a payment against an invoice

Requires the `invoices:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
amountSenwajibinteger
methodwajib"bank_transfer" | "cash" | "cheque" | "card" | "online" | "other"
referencestring | null
paidOnwajibstring
notestring | null
invoiceIdwajibstring (uuid)
GET/v1/payments/{id}— Get one record

Requires the `invoices:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Payment
idwajibstring (uuid)
invoiceIdwajibstring (uuid)
numberwajibstring
amountSenwajibintegerAmount in the smallest currency unit (sen for MYR).
methodwajibstring
referencewajibstring | null
paidOnwajibstring (date)
notewajibstring | null
sourcewajibstring
voidedAtwajibstring (date-time) | null
createdAtwajibstring (date-time)

Products

Your product and service catalogue.

curl "https://api.metricrm.com/v1/products?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/products— List products

Your product and service catalogue. Requires the `products:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
status"active" | "archived"Active or archived.
skustringExact SKU (upper case).
POST/v1/products— Create a product

Requires the `products:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
skuwajibstring
namewajibstring
descriptionstring | null
unitstring
priceSenwajibinteger
costSeninteger | null
currencystring
taxCategoryIdstring (uuid) | null
parentIdstring (uuid) | null
optionsobject
status"active" | "archived"
GET/v1/products/{id}— Get one record

Requires the `products:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/products/{id}— Replace a product (send every field)

Requires the `products:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
skuwajibstring
namewajibstring
descriptionstring | null
unitstring
priceSenwajibinteger
costSeninteger | null
currencystring
taxCategoryIdstring (uuid) | null
parentIdstring (uuid) | null
optionsobject
status"active" | "archived"
Objek Product
idwajibstring (uuid)
skuwajibstring
namewajibstring
descriptionwajibstring | null
unitwajibstring
priceSenwajibintegerList price in the smallest currency unit (sen for MYR).
costSenwajibinteger | null
currencywajibstring
taxCategoryIdwajibstring (uuid) | null
parentIdwajibstring (uuid) | null
optionswajibobject
statuswajib"active" | "archived"
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Tasks

Follow-ups with due dates and reminders.

curl "https://api.metricrm.com/v1/tasks?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/tasks— List tasks

Follow-ups with due dates and reminders. Requires the `tasks:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
status"open" | "done" | "cancelled"Open, done or cancelled.
assigneeIdstring (uuid)Only tasks assigned to this user.
accountIdstring (uuid)Only tasks about this account.
contactIdstring (uuid)Only tasks about this contact.
POST/v1/tasks— Create a task

Requires the `tasks:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
titlewajibstring
descriptionstring | null
priority"low" | "medium" | "high" | "urgent"
dueAtstring (date-time) | null
remindAtstring (date-time) | null
assigneeIdstring (uuid) | null
teamIdstring (uuid) | null
entityTypestring | null
entityIdstring (uuid) | null
recurrenceobject | null
GET/v1/tasks/{id}— Get one record

Requires the `tasks:read` scope.

Parameter

idwajibstring (uuid)Record id.
PATCH/v1/tasks/{id}— Update a task

Requires the `tasks:write` scope.

Parameter

idwajibstring (uuid)Record id.
Kandungan permintaan
titlestring
descriptionstring | null
priority"low" | "medium" | "high" | "urgent"
dueAtstring (date-time) | null
remindAtstring (date-time) | null
assigneeIdstring (uuid) | null
teamIdstring (uuid) | null
entityTypestring | null
entityIdstring (uuid) | null
recurrenceobject | null
DELETE/v1/tasks/{id}— Delete a task

Requires the `tasks:write` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Task
idwajibstring (uuid)
numberwajibstring | null
titlewajibstring
descriptionwajibstring | null
statuswajib"open" | "done" | "cancelled"
prioritywajibstring
dueAtwajibstring (date-time) | null
remindAtwajibstring (date-time) | null
assigneeIdwajibstring (uuid) | null
teamIdwajibstring (uuid) | null
entityTypewajibstring | null
entityIdwajibstring (uuid) | null
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
completedAtwajibstring (date-time) | null
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Activities

The timeline on accounts and contacts: calls, emails, chats, notes and more.

curl "https://api.metricrm.com/v1/activities?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/activities— List activities

The timeline on accounts and contacts: calls, emails, chats, notes and more. Requires the `activities:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
accountIdstring (uuid)Only activities on this account.
contactIdstring (uuid)Only activities on this contact.
kindstringExact kind (call, email, note …).
POST/v1/activities— Log an activity (a call, meeting note or email from another system)

Requires the `activities:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
kindwajib"call" | "email" | "chat" | "note"
accountIdstring (uuid) | null
contactIdstring (uuid) | null
titlewajibstring
bodystring | null
occurredAtstring (date-time) | null
GET/v1/activities/{id}— Get one record

Requires the `activities:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Activity
idwajibstring (uuid)
kindwajibstring
subjectTypewajibstring
subjectIdwajibstring (uuid)
accountIdwajibstring (uuid) | null
contactIdwajibstring (uuid) | null
titlewajibstring
bodywajibstring | nullShort preview (up to 500 characters).
actorUserIdwajibstring (uuid) | null
actorTypewajibstring
occurredAtwajibstring (date-time)

Knowledge base

Knowledge base articles with their published translations.

curl "https://api.metricrm.com/v1/articles?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/articles— List knowledge base

Knowledge base articles with their published translations. Requires the `knowledge:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status (published, draft …).
visibility"internal" | "public"Internal or public.
categoryIdstring (uuid)Only articles in this category.
GET/v1/articles/{id}— Get one record

Requires the `knowledge:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Article
idwajibstring (uuid)
numberwajibstring | null
categoryIdwajibstring (uuid) | null
slugwajibstring
visibilitywajib"internal" | "public"
statuswajibstring
tagswajibstring[]
versionwajibinteger
publishedAtwajibstring (date-time) | null
translationswajibobject[]Published content per language.
createdAtwajibstring (date-time)
updatedAtwajibstring (date-time)

Messages

Messages in MetriChat conversations (web chat, WhatsApp, SMS and more).

curl "https://api.metricrm.com/v1/messages?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/messages— List messages

Messages in MetriChat conversations (web chat, WhatsApp, SMS and more). Requires the `messages:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
conversationIdstring (uuid)Only messages in this conversation.
direction"in" | "out" | "note" | "system"Incoming, outgoing, internal note or system.
POST/v1/messages— Reply in a conversation (through its channel)

Requires the `messages:write` scope.

Parameter

Idempotency-Key (header)stringAny unique value (a UUID works). A retry with the same key and body returns the first response instead of creating a duplicate. Kept for 24 hours.
Kandungan permintaan
conversationIdwajibstring (uuid)
textwajibstring
GET/v1/messages/{id}— Get one record

Requires the `messages:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek Message
idwajibstring (uuid)
conversationIdwajibstring (uuid)
directionwajib"in" | "out" | "note" | "system"
authorwajib"customer" | "agent" | "bot" | "system"
authorUserIdwajibstring (uuid) | null
bodywajibstring
statuswajibstring | null
createdAtwajibstring (date-time)

Users

People in this workspace (read only).

curl "https://api.metricrm.com/v1/users?limit=10" \
  -H "Authorization: Bearer $METRICRM_API_KEY"
GET/v1/users— List users

People in this workspace (read only). Requires the `users:read` scope.

Parameter

limitintegerPage size, 1–100 (default 25).
cursorstringThe nextCursor of the previous page.
sort"createdAt" | "updatedAt"Sort field (default createdAt).
order"asc" | "desc"Sort order (default desc).
createdSincestring (date-time)Only records created after this time (ISO 8601).
updatedSincestring (date-time)Only records changed after this time — use for incremental sync.
statusstringExact status (active, invited …).
emailstringExact email address.
GET/v1/users/{id}— Get one record

Requires the `users:read` scope.

Parameter

idwajibstring (uuid)Record id.
Objek User
idwajibstring (uuid)
emailwajibstring
displayNamewajibstring
titlewajibstring | null
localewajibstring | null
timezonewajibstring | null
statuswajibstring
availabilitywajibstring
createdAtwajibstring (date-time)