Journal
Guide: Journal.
Journal.create(humanIds, entry)
POST /api/v2/journal with { humanIds, entry }.
| Parameter | Description |
|---|---|
humanIds | Non-empty string[]. Throws customers/missing-humanIds when empty |
entry.channel | NOTE, PHONE, MOBILE, FAX, EMAIL, CONVERSATION, CALENDAR_EVENT, FILE, JIRA, MAIL |
entry.text | Required |
entry.direction | UNKNOWN, INCOMING, OUTGOING. Only for PHONE, MOBILE, FAX, EMAIL, MAIL |
Response 201: an array of the created journal documents. The author is SYSTEM for service tokens, otherwise the user's display name.
Errors: journal/missing-humanIds, journal/invalid-channel, journal/missing-text, journal/direction-not-supported, journal/invalid-direction, entity/not-found.
await sdk.asAdmin().Customers().Journal.create(['SC-ZW2VEG'], {
channel: 'NOTE',
text: 'Contract renewed.'
})