Skip to main content
POST
/
v1
/
resources
/
crmEngagement
Create Engagement
const options = {
  method: 'POST',
  headers: {
    'x-api-key': '<api-key>',
    'x-api-secret': '<api-key>',
    'x-connector-id': '<api-key>',
    'x-owner-id': '<api-key>',
    'x-session-token': '<api-key>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    type: 'call',
    startedAt: '2023-11-07T05:31:56Z',
    direction: 'inbound',
    status: 'planned',
    title: '<string>',
    description: '<string>',
    endedAt: '2023-11-07T05:31:56Z',
    duration: 1,
    owner: {
      id: '<string>',
      object: 'resourceRef',
      model: '<string>',
      fields: '<unknown>',
      rawResource: '<unknown>',
      remote: {id: '<string>'},
      createdAt: '<string>',
      updatedAt: '<string>'
    },
    users: [
      {
        id: '<string>',
        object: 'resourceRef',
        model: '<string>',
        fields: '<unknown>',
        rawResource: '<unknown>',
        remote: {id: '<string>'},
        createdAt: '<string>',
        updatedAt: '<string>'
      }
    ],
    companies: [
      {
        id: '<string>',
        object: 'resourceRef',
        model: '<string>',
        fields: '<unknown>',
        rawResource: '<unknown>',
        remote: {id: '<string>'},
        createdAt: '<string>',
        updatedAt: '<string>'
      }
    ],
    contacts: [
      {
        id: '<string>',
        object: 'resourceRef',
        model: '<string>',
        fields: '<unknown>',
        rawResource: '<unknown>',
        remote: {id: '<string>'},
        createdAt: '<string>',
        updatedAt: '<string>'
      }
    ],
    opportunities: [
      {
        id: '<string>',
        object: 'resourceRef',
        model: '<string>',
        fields: '<unknown>',
        rawResource: '<unknown>',
        remote: {id: '<string>'},
        createdAt: '<string>',
        updatedAt: '<string>'
      }
    ]
  })
};

fetch('https://api.runmorph.dev/v1/resources/crmEngagement', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "object": "resource",
  "model": "<string>",
  "id": "<string>",
  "remote": {
    "id": "<string>"
  }
}

Authorizations

x-api-key
string
header
required
x-api-secret
string
header
required
x-connector-id
string
header
required
x-owner-id
string
header
required
x-session-token
string
header
required

Query Parameters

returnResource
default:false

Body

type
enum<string>
required

Type of engagement

Available options:
call,
meeting,
email,
task,
note
startedAt
string<date-time>
required

Start time in ISO 8601 format

direction
enum<string>

Direction of the engagement

Available options:
inbound,
outbound
status
enum<string>

Engagement status

Available options:
planned,
inProgress,
completed,
canceled
title
string

Subject or title of the engagement

description
string

Engagement content details

endedAt
string<date-time>

End time in ISO 8601 format

duration
integer

Duration in seconds

Required range: x >= 0
owner
object

Owner of the engagement

users
object[]

Related users

companies
object[]

Related companies

contacts
object[]

Related contacts

opportunities
object[]

Related opportunities

Response

Created

object
enum<string>
default:resource
required
Available options:
resourceRef
model
string
required
id
string
required
remote
object