Remap a meeting with new salesforce objects - Momentum

Remap a Meeting with New Salesforce Objects

cURL

curl --request POST \
  --url https://api.momentum.io/v1/meeting/remap \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "source": {
    "id": "<string>"
  },
  "salesforceRecords": {
    "opportunityId": "<string>",
    "accountId": "<string>",
    "leadId": "<string>"
  },
  "meetingDetails": {
    "momentumMeetingId": 123,
    "title": "<string>",
    "startTime": "2023-11-07T05:31:56Z",
    "hostEmail": "jsmith@example.com"
  }
}
'

JavaScript Fetch

const options = {
  method: 'POST',
  headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    source: {id: '<string>'},
    salesforceRecords: {opportunityId: '<string>', accountId: '<string>', leadId: '<string>'},
    meetingDetails: {
      momentumMeetingId: 123,
      title: '<string>',
      startTime: '2023-11-07T05:31:56Z',
      hostEmail: 'jsmith@example.com'
    }
  })
};

fetch('https://api.momentum.io/v1/meeting/remap', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));

Python Requests

import requests

url = "https://api.momentum.io/v1/meeting/remap"

payload = {
    "source": { "id": "<string>" },
    "salesforceRecords": {
        "opportunityId": "<string>",
        "accountId": "<string>",
        "leadId": "<string>"
    },
    "meetingDetails": {
        "momentumMeetingId": 123,
        "title": "<string>",
        "startTime": "2023-11-07T05:31:56Z",
        "hostEmail": "jsmith@example.com"
    }
}
headers = {
    "X-API-Key": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)

Go HTTP

package main

import (
    "fmt"
    "strings"
    "net/http"
    "io"
)

func main() {

url := "https://api.momentum.io/v1/meeting/remap"

payload := strings.NewReader("{\n  \"source\": {\n    \"id\": \"<string>\"\n  },\n  \"salesforceRecords\": {\n    \"opportunityId\": \"<string>\",\n    \"accountId\": \"<string>\",\n    \"leadId\": \"<string>\"\n  },\n  \"meetingDetails\": {\n    \"momentumMeetingId\": 123,\n    \"title\": \"<string>\",\n    \"startTime\": \"2023-11-07T05:31:56Z\",\n    \"hostEmail\": \"jsmith@example.com\"\n  }\n}")[

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("X-API-Key", "<api-key>")
    req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
    body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))
}

Response Codes

Example Responses

Success Response:

{
  "accepted": true,
  "requestId": "<string>"
}

Error Response:

{
  "error": "<string>",
  "requestId": "<string>"
}

Authorizations

Query Parameters

Request Body

Either source or meetingDetails must be provided.

Choose the option that best matches the available data for the meeting you wish to remap.