POST Record Participants by ContactId with Marketing Event External Ids
{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create
QUERY PARAMS

externalEventId
subscriberState
BODY json

{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create" {:content-type :json
                                                                                                                              :form-params {:inputs [{:vid 0
                                                                                                                                                      :properties {}
                                                                                                                                                      :interactionDateTime 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104

{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      vid: 0,
      properties: {},
      interactionDateTime: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"vid":0,"properties":{},"interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "vid": 0,\n      "properties": {},\n      "interactionDateTime": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create',
  headers: {'content-type': 'application/json'},
  body: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      vid: 0,
      properties: {},
      interactionDateTime: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"vid":0,"properties":{},"interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"vid": @0, @"properties": @{  }, @"interactionDateTime": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'vid' => 0,
                'properties' => [
                                
                ],
                'interactionDateTime' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create', [
  'body' => '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'vid' => 0,
        'properties' => [
                
        ],
        'interactionDateTime' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'vid' => 0,
        'properties' => [
                
        ],
        'interactionDateTime' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"

payload = { "inputs": [
        {
            "vid": 0,
            "properties": {},
            "interactionDateTime": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create"

payload <- "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create";

    let payload = json!({"inputs": (
            json!({
                "vid": 0,
                "properties": json!({}),
                "interactionDateTime": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "vid": 0,\n      "properties": {},\n      "interactionDateTime": 0\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "vid": 0,
      "properties": [],
      "interactionDateTime": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/create")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Record Participants by ContactId with Marketing Event Object Id
{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create
QUERY PARAMS

objectId
subscriberState
BODY json

{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create" {:content-type :json
                                                                                                                       :form-params {:inputs [{:vid 0
                                                                                                                                               :properties {}
                                                                                                                                               :interactionDateTime 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104

{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      vid: 0,
      properties: {},
      interactionDateTime: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"vid":0,"properties":{},"interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "vid": 0,\n      "properties": {},\n      "interactionDateTime": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create',
  headers: {'content-type': 'application/json'},
  body: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      vid: 0,
      properties: {},
      interactionDateTime: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"vid":0,"properties":{},"interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"vid": @0, @"properties": @{  }, @"interactionDateTime": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'vid' => 0,
                'properties' => [
                                
                ],
                'interactionDateTime' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create', [
  'body' => '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'vid' => 0,
        'properties' => [
                
        ],
        'interactionDateTime' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'vid' => 0,
        'properties' => [
                
        ],
        'interactionDateTime' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"

payload = { "inputs": [
        {
            "vid": 0,
            "properties": {},
            "interactionDateTime": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create"

payload <- "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create";

    let payload = json!({"inputs": (
            json!({
                "vid": 0,
                "properties": json!({}),
                "interactionDateTime": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "vid": 0,\n      "properties": {},\n      "interactionDateTime": 0\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "vid": 0,
      "properties": [],
      "interactionDateTime": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/create")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Record Participants by Email with Marketing Event External Ids
{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create
QUERY PARAMS

externalEventId
subscriberState
BODY json

{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create" {:content-type :json
                                                                                                                                    :form-params {:inputs [{:contactProperties {}
                                                                                                                                                            :properties {}
                                                                                                                                                            :email ""
                                                                                                                                                            :interactionDateTime 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 138

{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      contactProperties: {},
      properties: {},
      email: '',
      interactionDateTime: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"contactProperties":{},"properties":{},"email":"","interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "contactProperties": {},\n      "properties": {},\n      "email": "",\n      "interactionDateTime": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create',
  headers: {'content-type': 'application/json'},
  body: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      contactProperties: {},
      properties: {},
      email: '',
      interactionDateTime: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"contactProperties":{},"properties":{},"email":"","interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"contactProperties": @{  }, @"properties": @{  }, @"email": @"", @"interactionDateTime": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'contactProperties' => [
                                
                ],
                'properties' => [
                                
                ],
                'email' => '',
                'interactionDateTime' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create', [
  'body' => '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'contactProperties' => [
                
        ],
        'properties' => [
                
        ],
        'email' => '',
        'interactionDateTime' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'contactProperties' => [
                
        ],
        'properties' => [
                
        ],
        'email' => '',
        'interactionDateTime' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"

payload = { "inputs": [
        {
            "contactProperties": {},
            "properties": {},
            "email": "",
            "interactionDateTime": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create"

payload <- "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create";

    let payload = json!({"inputs": (
            json!({
                "contactProperties": json!({}),
                "properties": json!({}),
                "email": "",
                "interactionDateTime": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "contactProperties": {},\n      "properties": {},\n      "email": "",\n      "interactionDateTime": 0\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "contactProperties": [],
      "properties": [],
      "email": "",
      "interactionDateTime": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/attendance/:externalEventId/:subscriberState/email-create")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Record Participants by Email with Marketing Event Object Id
{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create
QUERY PARAMS

objectId
subscriberState
BODY json

{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create" {:content-type :json
                                                                                                                             :form-params {:inputs [{:contactProperties {}
                                                                                                                                                     :properties {}
                                                                                                                                                     :email ""
                                                                                                                                                     :interactionDateTime 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 138

{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      contactProperties: {},
      properties: {},
      email: '',
      interactionDateTime: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"contactProperties":{},"properties":{},"email":"","interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "contactProperties": {},\n      "properties": {},\n      "email": "",\n      "interactionDateTime": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create',
  headers: {'content-type': 'application/json'},
  body: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      contactProperties: {},
      properties: {},
      email: '',
      interactionDateTime: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"contactProperties":{},"properties":{},"email":"","interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"contactProperties": @{  }, @"properties": @{  }, @"email": @"", @"interactionDateTime": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'contactProperties' => [
                                
                ],
                'properties' => [
                                
                ],
                'email' => '',
                'interactionDateTime' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create', [
  'body' => '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'contactProperties' => [
                
        ],
        'properties' => [
                
        ],
        'email' => '',
        'interactionDateTime' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'contactProperties' => [
                
        ],
        'properties' => [
                
        ],
        'email' => '',
        'interactionDateTime' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"

payload = { "inputs": [
        {
            "contactProperties": {},
            "properties": {},
            "email": "",
            "interactionDateTime": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create"

payload <- "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create";

    let payload = json!({"inputs": (
            json!({
                "contactProperties": json!({}),
                "properties": json!({}),
                "email": "",
                "interactionDateTime": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "contactProperties": {},\n      "properties": {},\n      "email": "",\n      "interactionDateTime": 0\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "contactProperties": [],
      "properties": [],
      "email": "",
      "interactionDateTime": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:objectId/attendance/:subscriberState/email-create")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Create a marketing event
{{baseUrl}}/marketing/v3/marketing-events/events
BODY json

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events" {:content-type :json
                                                                                 :form-params {:startDateTime ""
                                                                                               :customProperties [{:sourceId ""
                                                                                                                   :selectedByUser false
                                                                                                                   :sourceLabel ""
                                                                                                                   :sourceUpstreamDeployable ""
                                                                                                                   :source ""
                                                                                                                   :updatedByUserId 0
                                                                                                                   :persistenceTimestamp 0
                                                                                                                   :sourceMetadata ""
                                                                                                                   :dataSensitivity ""
                                                                                                                   :sourceVid []
                                                                                                                   :unit ""
                                                                                                                   :requestId ""
                                                                                                                   :isEncrypted false
                                                                                                                   :name ""
                                                                                                                   :useTimestampAsPersistenceTimestamp false
                                                                                                                   :value ""
                                                                                                                   :selectedByUserTimestamp 0
                                                                                                                   :timestamp 0
                                                                                                                   :isLargeValue false}]
                                                                                               :externalAccountId ""
                                                                                               :eventCancelled false
                                                                                               :eventOrganizer ""
                                                                                               :eventUrl ""
                                                                                               :externalEventId ""
                                                                                               :eventDescription ""
                                                                                               :eventName ""
                                                                                               :eventType ""
                                                                                               :eventCompleted false
                                                                                               :endDateTime ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events"),
    Content = new StringContent("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events"

	payload := strings.NewReader("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 819

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events")
  .header("content-type", "application/json")
  .body("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  externalAccountId: '',
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  externalEventId: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events',
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    externalAccountId: '',
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    externalEventId: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"externalAccountId":"","eventCancelled":false,"eventOrganizer":"","eventUrl":"","externalEventId":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "externalAccountId": "",\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "externalEventId": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "eventCompleted": false,\n  "endDateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  externalAccountId: '',
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  externalEventId: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events',
  headers: {'content-type': 'application/json'},
  body: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    externalAccountId: '',
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    externalEventId: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  externalAccountId: '',
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  externalEventId: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events',
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    externalAccountId: '',
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    externalEventId: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"externalAccountId":"","eventCancelled":false,"eventOrganizer":"","eventUrl":"","externalEventId":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"startDateTime": @"",
                              @"customProperties": @[ @{ @"sourceId": @"", @"selectedByUser": @NO, @"sourceLabel": @"", @"sourceUpstreamDeployable": @"", @"source": @"", @"updatedByUserId": @0, @"persistenceTimestamp": @0, @"sourceMetadata": @"", @"dataSensitivity": @"", @"sourceVid": @[  ], @"unit": @"", @"requestId": @"", @"isEncrypted": @NO, @"name": @"", @"useTimestampAsPersistenceTimestamp": @NO, @"value": @"", @"selectedByUserTimestamp": @0, @"timestamp": @0, @"isLargeValue": @NO } ],
                              @"externalAccountId": @"",
                              @"eventCancelled": @NO,
                              @"eventOrganizer": @"",
                              @"eventUrl": @"",
                              @"externalEventId": @"",
                              @"eventDescription": @"",
                              @"eventName": @"",
                              @"eventType": @"",
                              @"eventCompleted": @NO,
                              @"endDateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'startDateTime' => '',
    'customProperties' => [
        [
                'sourceId' => '',
                'selectedByUser' => null,
                'sourceLabel' => '',
                'sourceUpstreamDeployable' => '',
                'source' => '',
                'updatedByUserId' => 0,
                'persistenceTimestamp' => 0,
                'sourceMetadata' => '',
                'dataSensitivity' => '',
                'sourceVid' => [
                                
                ],
                'unit' => '',
                'requestId' => '',
                'isEncrypted' => null,
                'name' => '',
                'useTimestampAsPersistenceTimestamp' => null,
                'value' => '',
                'selectedByUserTimestamp' => 0,
                'timestamp' => 0,
                'isLargeValue' => null
        ]
    ],
    'externalAccountId' => '',
    'eventCancelled' => null,
    'eventOrganizer' => '',
    'eventUrl' => '',
    'externalEventId' => '',
    'eventDescription' => '',
    'eventName' => '',
    'eventType' => '',
    'eventCompleted' => null,
    'endDateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events', [
  'body' => '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'externalAccountId' => '',
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'externalEventId' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'eventCompleted' => null,
  'endDateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'externalAccountId' => '',
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'externalEventId' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'eventCompleted' => null,
  'endDateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events"

payload = {
    "startDateTime": "",
    "customProperties": [
        {
            "sourceId": "",
            "selectedByUser": False,
            "sourceLabel": "",
            "sourceUpstreamDeployable": "",
            "source": "",
            "updatedByUserId": 0,
            "persistenceTimestamp": 0,
            "sourceMetadata": "",
            "dataSensitivity": "",
            "sourceVid": [],
            "unit": "",
            "requestId": "",
            "isEncrypted": False,
            "name": "",
            "useTimestampAsPersistenceTimestamp": False,
            "value": "",
            "selectedByUserTimestamp": 0,
            "timestamp": 0,
            "isLargeValue": False
        }
    ],
    "externalAccountId": "",
    "eventCancelled": False,
    "eventOrganizer": "",
    "eventUrl": "",
    "externalEventId": "",
    "eventDescription": "",
    "eventName": "",
    "eventType": "",
    "eventCompleted": False,
    "endDateTime": ""
}
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events"

payload <- "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events') do |req|
  req.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events";

    let payload = json!({
        "startDateTime": "",
        "customProperties": (
            json!({
                "sourceId": "",
                "selectedByUser": false,
                "sourceLabel": "",
                "sourceUpstreamDeployable": "",
                "source": "",
                "updatedByUserId": 0,
                "persistenceTimestamp": 0,
                "sourceMetadata": "",
                "dataSensitivity": "",
                "sourceVid": (),
                "unit": "",
                "requestId": "",
                "isEncrypted": false,
                "name": "",
                "useTimestampAsPersistenceTimestamp": false,
                "value": "",
                "selectedByUserTimestamp": 0,
                "timestamp": 0,
                "isLargeValue": false
            })
        ),
        "externalAccountId": "",
        "eventCancelled": false,
        "eventOrganizer": "",
        "eventUrl": "",
        "externalEventId": "",
        "eventDescription": "",
        "eventName": "",
        "eventType": "",
        "eventCompleted": false,
        "endDateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/events \
  --header 'content-type: application/json' \
  --data '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
echo '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/events \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "externalAccountId": "",\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "externalEventId": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "eventCompleted": false,\n  "endDateTime": ""\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/events
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "startDateTime": "",
  "customProperties": [
    [
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    ]
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
PUT Create or update a marketing event
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId
QUERY PARAMS

externalEventId
BODY json

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId" {:content-type :json
                                                                                                 :form-params {:startDateTime ""
                                                                                                               :customProperties [{:sourceId ""
                                                                                                                                   :selectedByUser false
                                                                                                                                   :sourceLabel ""
                                                                                                                                   :sourceUpstreamDeployable ""
                                                                                                                                   :source ""
                                                                                                                                   :updatedByUserId 0
                                                                                                                                   :persistenceTimestamp 0
                                                                                                                                   :sourceMetadata ""
                                                                                                                                   :dataSensitivity ""
                                                                                                                                   :sourceVid []
                                                                                                                                   :unit ""
                                                                                                                                   :requestId ""
                                                                                                                                   :isEncrypted false
                                                                                                                                   :name ""
                                                                                                                                   :useTimestampAsPersistenceTimestamp false
                                                                                                                                   :value ""
                                                                                                                                   :selectedByUserTimestamp 0
                                                                                                                                   :timestamp 0
                                                                                                                                   :isLargeValue false}]
                                                                                                               :externalAccountId ""
                                                                                                               :eventCancelled false
                                                                                                               :eventOrganizer ""
                                                                                                               :eventUrl ""
                                                                                                               :externalEventId ""
                                                                                                               :eventDescription ""
                                                                                                               :eventName ""
                                                                                                               :eventType ""
                                                                                                               :eventCompleted false
                                                                                                               :endDateTime ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

response = HTTP::Client.put url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"),
    Content = new StringContent("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId");
var request = new RestRequest("", Method.Put);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

	payload := strings.NewReader("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/marketing/v3/marketing-events/events/:externalEventId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 819

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"))
    .header("content-type", "application/json")
    .method("PUT", HttpRequest.BodyPublishers.ofString("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId")
  .put(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId")
  .header("content-type", "application/json")
  .body("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  externalAccountId: '',
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  externalEventId: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    externalAccountId: '',
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    externalEventId: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"externalAccountId":"","eventCancelled":false,"eventOrganizer":"","eventUrl":"","externalEventId":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  method: 'PUT',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "externalAccountId": "",\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "externalEventId": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "eventCompleted": false,\n  "endDateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId")
  .put(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  externalAccountId: '',
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  externalEventId: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  headers: {'content-type': 'application/json'},
  body: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    externalAccountId: '',
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    externalEventId: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  externalAccountId: '',
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  externalEventId: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    externalAccountId: '',
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    externalEventId: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId';
const options = {
  method: 'PUT',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"externalAccountId":"","eventCancelled":false,"eventOrganizer":"","eventUrl":"","externalEventId":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"startDateTime": @"",
                              @"customProperties": @[ @{ @"sourceId": @"", @"selectedByUser": @NO, @"sourceLabel": @"", @"sourceUpstreamDeployable": @"", @"source": @"", @"updatedByUserId": @0, @"persistenceTimestamp": @0, @"sourceMetadata": @"", @"dataSensitivity": @"", @"sourceVid": @[  ], @"unit": @"", @"requestId": @"", @"isEncrypted": @NO, @"name": @"", @"useTimestampAsPersistenceTimestamp": @NO, @"value": @"", @"selectedByUserTimestamp": @0, @"timestamp": @0, @"isLargeValue": @NO } ],
                              @"externalAccountId": @"",
                              @"eventCancelled": @NO,
                              @"eventOrganizer": @"",
                              @"eventUrl": @"",
                              @"externalEventId": @"",
                              @"eventDescription": @"",
                              @"eventName": @"",
                              @"eventType": @"",
                              @"eventCompleted": @NO,
                              @"endDateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}" in

Client.call ~headers ~body `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
  CURLOPT_POSTFIELDS => json_encode([
    'startDateTime' => '',
    'customProperties' => [
        [
                'sourceId' => '',
                'selectedByUser' => null,
                'sourceLabel' => '',
                'sourceUpstreamDeployable' => '',
                'source' => '',
                'updatedByUserId' => 0,
                'persistenceTimestamp' => 0,
                'sourceMetadata' => '',
                'dataSensitivity' => '',
                'sourceVid' => [
                                
                ],
                'unit' => '',
                'requestId' => '',
                'isEncrypted' => null,
                'name' => '',
                'useTimestampAsPersistenceTimestamp' => null,
                'value' => '',
                'selectedByUserTimestamp' => 0,
                'timestamp' => 0,
                'isLargeValue' => null
        ]
    ],
    'externalAccountId' => '',
    'eventCancelled' => null,
    'eventOrganizer' => '',
    'eventUrl' => '',
    'externalEventId' => '',
    'eventDescription' => '',
    'eventName' => '',
    'eventType' => '',
    'eventCompleted' => null,
    'endDateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId', [
  'body' => '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setMethod(HTTP_METH_PUT);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'externalAccountId' => '',
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'externalEventId' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'eventCompleted' => null,
  'endDateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'externalAccountId' => '',
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'externalEventId' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'eventCompleted' => null,
  'endDateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId' -Method PUT -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PUT", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

payload = {
    "startDateTime": "",
    "customProperties": [
        {
            "sourceId": "",
            "selectedByUser": False,
            "sourceLabel": "",
            "sourceUpstreamDeployable": "",
            "source": "",
            "updatedByUserId": 0,
            "persistenceTimestamp": 0,
            "sourceMetadata": "",
            "dataSensitivity": "",
            "sourceVid": [],
            "unit": "",
            "requestId": "",
            "isEncrypted": False,
            "name": "",
            "useTimestampAsPersistenceTimestamp": False,
            "value": "",
            "selectedByUserTimestamp": 0,
            "timestamp": 0,
            "isLargeValue": False
        }
    ],
    "externalAccountId": "",
    "eventCancelled": False,
    "eventOrganizer": "",
    "eventUrl": "",
    "externalEventId": "",
    "eventDescription": "",
    "eventName": "",
    "eventType": "",
    "eventCompleted": False,
    "endDateTime": ""
}
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

payload <- "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

encode <- "json"

response <- VERB("PUT", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.put('/baseUrl/marketing/v3/marketing-events/events/:externalEventId') do |req|
  req.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"externalAccountId\": \"\",\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"externalEventId\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId";

    let payload = json!({
        "startDateTime": "",
        "customProperties": (
            json!({
                "sourceId": "",
                "selectedByUser": false,
                "sourceLabel": "",
                "sourceUpstreamDeployable": "",
                "source": "",
                "updatedByUserId": 0,
                "persistenceTimestamp": 0,
                "sourceMetadata": "",
                "dataSensitivity": "",
                "sourceVid": (),
                "unit": "",
                "requestId": "",
                "isEncrypted": false,
                "name": "",
                "useTimestampAsPersistenceTimestamp": false,
                "value": "",
                "selectedByUserTimestamp": 0,
                "timestamp": 0,
                "isLargeValue": false
            })
        ),
        "externalAccountId": "",
        "eventCancelled": false,
        "eventOrganizer": "",
        "eventUrl": "",
        "externalEventId": "",
        "eventDescription": "",
        "eventName": "",
        "eventType": "",
        "eventCompleted": false,
        "endDateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId \
  --header 'content-type: application/json' \
  --data '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
echo '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}' |  \
  http PUT {{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId \
  content-type:application/json
wget --quiet \
  --method PUT \
  --header 'content-type: application/json' \
  --body-data '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "externalAccountId": "",\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "externalEventId": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "eventCompleted": false,\n  "endDateTime": ""\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "startDateTime": "",
  "customProperties": [
    [
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    ]
  ],
  "externalAccountId": "",
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "externalEventId": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
DELETE Delete Marketing Event by External Ids
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId
QUERY PARAMS

externalAccountId
externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId" {:query-params {:externalAccountId ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="

	req, _ := http.NewRequest("DELETE", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  params: {externalAccountId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  qs: {externalAccountId: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');

req.query({
  externalAccountId: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  params: {externalAccountId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setMethod(HTTP_METH_DELETE);

$request->setQueryData([
  'externalAccountId' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setRequestMethod('DELETE');
$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

querystring = {"externalAccountId":""}

response = requests.delete(url, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

queryString <- list(externalAccountId = "")

response <- VERB("DELETE", url, query = queryString, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/marketing/v3/marketing-events/events/:externalEventId') do |req|
  req.params['externalAccountId'] = ''
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .query(&querystring)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId='
http DELETE '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId='
wget --quiet \
  --method DELETE \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
DELETE Delete Marketing Event by objectId
{{baseUrl}}/marketing/v3/marketing-events/:objectId
QUERY PARAMS

objectId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:objectId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/marketing/v3/marketing-events/:objectId")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:objectId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:objectId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

	req, _ := http.NewRequest("DELETE", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/marketing/v3/marketing-events/:objectId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:objectId"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:objectId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:objectId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:objectId" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:objectId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/marketing/v3/marketing-events/:objectId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:objectId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/marketing/v3/marketing-events/:objectId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/marketing/v3/marketing-events/:objectId
http DELETE {{baseUrl}}/marketing/v3/marketing-events/:objectId
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/:objectId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:objectId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Get Marketing Event by External IDs
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

externalAccountId
externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId" {:headers {:private-app "{{apiKey}}"}
                                                                                                 :query-params {:externalAccountId ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId= HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  params: {externalAccountId: ''},
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  qs: {externalAccountId: ''},
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');

req.query({
  externalAccountId: ''
});

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  params: {externalAccountId: ''},
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'externalAccountId' => ''
]);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

querystring = {"externalAccountId":""}

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

queryString <- list(externalAccountId = "")

response <- VERB("GET", url, query = queryString, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/events/:externalEventId') do |req|
  req.headers['private-app'] = '{{apiKey}}'
  req.params['externalAccountId'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' \
  --header 'private-app: {{apiKey}}'
http GET '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId='
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Get Marketing Event by objectId
{{baseUrl}}/marketing/v3/marketing-events/:objectId
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

objectId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:objectId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/:objectId" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:objectId"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:objectId");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/:objectId HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:objectId"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:objectId',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:objectId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:objectId" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:objectId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/:objectId', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/:objectId", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:objectId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/:objectId') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/:objectId \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/:objectId \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/:objectId
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:objectId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Get all marketing event
{{baseUrl}}/marketing/v3/marketing-events/
HEADERS

private-app
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/ HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/ \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/ \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
PATCH Update Marketing Event by External IDs
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId
QUERY PARAMS

externalAccountId
externalEventId
BODY json

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId" {:query-params {:externalAccountId ""}
                                                                                                   :content-type :json
                                                                                                   :form-params {:startDateTime ""
                                                                                                                 :customProperties [{:sourceId ""
                                                                                                                                     :selectedByUser false
                                                                                                                                     :sourceLabel ""
                                                                                                                                     :sourceUpstreamDeployable ""
                                                                                                                                     :source ""
                                                                                                                                     :updatedByUserId 0
                                                                                                                                     :persistenceTimestamp 0
                                                                                                                                     :sourceMetadata ""
                                                                                                                                     :dataSensitivity ""
                                                                                                                                     :sourceVid []
                                                                                                                                     :unit ""
                                                                                                                                     :requestId ""
                                                                                                                                     :isEncrypted false
                                                                                                                                     :name ""
                                                                                                                                     :useTimestampAsPersistenceTimestamp false
                                                                                                                                     :value ""
                                                                                                                                     :selectedByUserTimestamp 0
                                                                                                                                     :timestamp 0
                                                                                                                                     :isLargeValue false}]
                                                                                                                 :eventCancelled false
                                                                                                                 :eventOrganizer ""
                                                                                                                 :eventUrl ""
                                                                                                                 :eventDescription ""
                                                                                                                 :eventName ""
                                                                                                                 :eventType ""
                                                                                                                 :eventCompleted false
                                                                                                                 :endDateTime ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="),
    Content = new StringContent("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="

	payload := strings.NewReader("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 767

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .header("content-type", "application/json")
  .body("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"eventCancelled":false,"eventOrganizer":"","eventUrl":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "eventCompleted": false,\n  "endDateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  qs: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  body: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');

req.query({
  externalAccountId: ''
});

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  eventCompleted: false,
  endDateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    eventCompleted: false,
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"eventCancelled":false,"eventOrganizer":"","eventUrl":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"startDateTime": @"",
                              @"customProperties": @[ @{ @"sourceId": @"", @"selectedByUser": @NO, @"sourceLabel": @"", @"sourceUpstreamDeployable": @"", @"source": @"", @"updatedByUserId": @0, @"persistenceTimestamp": @0, @"sourceMetadata": @"", @"dataSensitivity": @"", @"sourceVid": @[  ], @"unit": @"", @"requestId": @"", @"isEncrypted": @NO, @"name": @"", @"useTimestampAsPersistenceTimestamp": @NO, @"value": @"", @"selectedByUserTimestamp": @0, @"timestamp": @0, @"isLargeValue": @NO } ],
                              @"eventCancelled": @NO,
                              @"eventOrganizer": @"",
                              @"eventUrl": @"",
                              @"eventDescription": @"",
                              @"eventName": @"",
                              @"eventType": @"",
                              @"eventCompleted": @NO,
                              @"endDateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'startDateTime' => '',
    'customProperties' => [
        [
                'sourceId' => '',
                'selectedByUser' => null,
                'sourceLabel' => '',
                'sourceUpstreamDeployable' => '',
                'source' => '',
                'updatedByUserId' => 0,
                'persistenceTimestamp' => 0,
                'sourceMetadata' => '',
                'dataSensitivity' => '',
                'sourceVid' => [
                                
                ],
                'unit' => '',
                'requestId' => '',
                'isEncrypted' => null,
                'name' => '',
                'useTimestampAsPersistenceTimestamp' => null,
                'value' => '',
                'selectedByUserTimestamp' => 0,
                'timestamp' => 0,
                'isLargeValue' => null
        ]
    ],
    'eventCancelled' => null,
    'eventOrganizer' => '',
    'eventUrl' => '',
    'eventDescription' => '',
    'eventName' => '',
    'eventType' => '',
    'eventCompleted' => null,
    'endDateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=', [
  'body' => '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setQueryData([
  'externalAccountId' => ''
]);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'eventCompleted' => null,
  'endDateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'eventCompleted' => null,
  'endDateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

querystring = {"externalAccountId":""}

payload = {
    "startDateTime": "",
    "customProperties": [
        {
            "sourceId": "",
            "selectedByUser": False,
            "sourceLabel": "",
            "sourceUpstreamDeployable": "",
            "source": "",
            "updatedByUserId": 0,
            "persistenceTimestamp": 0,
            "sourceMetadata": "",
            "dataSensitivity": "",
            "sourceVid": [],
            "unit": "",
            "requestId": "",
            "isEncrypted": False,
            "name": "",
            "useTimestampAsPersistenceTimestamp": False,
            "value": "",
            "selectedByUserTimestamp": 0,
            "timestamp": 0,
            "isLargeValue": False
        }
    ],
    "eventCancelled": False,
    "eventOrganizer": "",
    "eventUrl": "",
    "eventDescription": "",
    "eventName": "",
    "eventType": "",
    "eventCompleted": False,
    "endDateTime": ""
}
headers = {"content-type": "application/json"}

response = requests.patch(url, json=payload, headers=headers, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId"

queryString <- list(externalAccountId = "")

payload <- "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, query = queryString, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/marketing/v3/marketing-events/events/:externalEventId') do |req|
  req.params['externalAccountId'] = ''
  req.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"eventCompleted\": false,\n  \"endDateTime\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let payload = json!({
        "startDateTime": "",
        "customProperties": (
            json!({
                "sourceId": "",
                "selectedByUser": false,
                "sourceLabel": "",
                "sourceUpstreamDeployable": "",
                "source": "",
                "updatedByUserId": 0,
                "persistenceTimestamp": 0,
                "sourceMetadata": "",
                "dataSensitivity": "",
                "sourceVid": (),
                "unit": "",
                "requestId": "",
                "isEncrypted": false,
                "name": "",
                "useTimestampAsPersistenceTimestamp": false,
                "value": "",
                "selectedByUserTimestamp": 0,
                "timestamp": 0,
                "isLargeValue": false
            })
        ),
        "eventCancelled": false,
        "eventOrganizer": "",
        "eventUrl": "",
        "eventDescription": "",
        "eventName": "",
        "eventType": "",
        "eventCompleted": false,
        "endDateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .query(&querystring)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' \
  --header 'content-type: application/json' \
  --data '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}'
echo '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
}' |  \
  http PATCH '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=' \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "eventCompleted": false,\n  "endDateTime": ""\n}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId='
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "startDateTime": "",
  "customProperties": [
    [
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    ]
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "eventCompleted": false,
  "endDateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
PATCH Update Marketing Event by objectId
{{baseUrl}}/marketing/v3/marketing-events/:objectId
QUERY PARAMS

objectId
BODY json

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:objectId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/marketing/v3/marketing-events/:objectId" {:content-type :json
                                                                                     :form-params {:startDateTime ""
                                                                                                   :customProperties [{:sourceId ""
                                                                                                                       :selectedByUser false
                                                                                                                       :sourceLabel ""
                                                                                                                       :sourceUpstreamDeployable ""
                                                                                                                       :source ""
                                                                                                                       :updatedByUserId 0
                                                                                                                       :persistenceTimestamp 0
                                                                                                                       :sourceMetadata ""
                                                                                                                       :dataSensitivity ""
                                                                                                                       :sourceVid []
                                                                                                                       :unit ""
                                                                                                                       :requestId ""
                                                                                                                       :isEncrypted false
                                                                                                                       :name ""
                                                                                                                       :useTimestampAsPersistenceTimestamp false
                                                                                                                       :value ""
                                                                                                                       :selectedByUserTimestamp 0
                                                                                                                       :timestamp 0
                                                                                                                       :isLargeValue false}]
                                                                                                   :eventCancelled false
                                                                                                   :eventOrganizer ""
                                                                                                   :eventUrl ""
                                                                                                   :eventDescription ""
                                                                                                   :eventName ""
                                                                                                   :eventType ""
                                                                                                   :endDateTime ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}"

response = HTTP::Client.patch url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Patch,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:objectId"),
    Content = new StringContent("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:objectId");
var request = new RestRequest("", Method.Patch);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

	payload := strings.NewReader("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
PATCH /baseUrl/marketing/v3/marketing-events/:objectId HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 740

{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:objectId"))
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .header("content-type", "application/json")
  .body("{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  endDateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"eventCancelled":false,"eventOrganizer":"","eventUrl":"","eventDescription":"","eventName":"","eventType":"","endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  method: 'PATCH',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "endDateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:objectId")
  .patch(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PATCH',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:objectId',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  endDateTime: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  headers: {'content-type': 'application/json'},
  body: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    endDateTime: ''
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PATCH', '{{baseUrl}}/marketing/v3/marketing-events/:objectId');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  startDateTime: '',
  customProperties: [
    {
      sourceId: '',
      selectedByUser: false,
      sourceLabel: '',
      sourceUpstreamDeployable: '',
      source: '',
      updatedByUserId: 0,
      persistenceTimestamp: 0,
      sourceMetadata: '',
      dataSensitivity: '',
      sourceVid: [],
      unit: '',
      requestId: '',
      isEncrypted: false,
      name: '',
      useTimestampAsPersistenceTimestamp: false,
      value: '',
      selectedByUserTimestamp: 0,
      timestamp: 0,
      isLargeValue: false
    }
  ],
  eventCancelled: false,
  eventOrganizer: '',
  eventUrl: '',
  eventDescription: '',
  eventName: '',
  eventType: '',
  endDateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:objectId',
  headers: {'content-type': 'application/json'},
  data: {
    startDateTime: '',
    customProperties: [
      {
        sourceId: '',
        selectedByUser: false,
        sourceLabel: '',
        sourceUpstreamDeployable: '',
        source: '',
        updatedByUserId: 0,
        persistenceTimestamp: 0,
        sourceMetadata: '',
        dataSensitivity: '',
        sourceVid: [],
        unit: '',
        requestId: '',
        isEncrypted: false,
        name: '',
        useTimestampAsPersistenceTimestamp: false,
        value: '',
        selectedByUserTimestamp: 0,
        timestamp: 0,
        isLargeValue: false
      }
    ],
    eventCancelled: false,
    eventOrganizer: '',
    eventUrl: '',
    eventDescription: '',
    eventName: '',
    eventType: '',
    endDateTime: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:objectId';
const options = {
  method: 'PATCH',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"eventCancelled":false,"eventOrganizer":"","eventUrl":"","eventDescription":"","eventName":"","eventType":"","endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"startDateTime": @"",
                              @"customProperties": @[ @{ @"sourceId": @"", @"selectedByUser": @NO, @"sourceLabel": @"", @"sourceUpstreamDeployable": @"", @"source": @"", @"updatedByUserId": @0, @"persistenceTimestamp": @0, @"sourceMetadata": @"", @"dataSensitivity": @"", @"sourceVid": @[  ], @"unit": @"", @"requestId": @"", @"isEncrypted": @NO, @"name": @"", @"useTimestampAsPersistenceTimestamp": @NO, @"value": @"", @"selectedByUserTimestamp": @0, @"timestamp": @0, @"isLargeValue": @NO } ],
                              @"eventCancelled": @NO,
                              @"eventOrganizer": @"",
                              @"eventUrl": @"",
                              @"eventDescription": @"",
                              @"eventName": @"",
                              @"eventType": @"",
                              @"endDateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:objectId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PATCH"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:objectId" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:objectId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PATCH",
  CURLOPT_POSTFIELDS => json_encode([
    'startDateTime' => '',
    'customProperties' => [
        [
                'sourceId' => '',
                'selectedByUser' => null,
                'sourceLabel' => '',
                'sourceUpstreamDeployable' => '',
                'source' => '',
                'updatedByUserId' => 0,
                'persistenceTimestamp' => 0,
                'sourceMetadata' => '',
                'dataSensitivity' => '',
                'sourceVid' => [
                                
                ],
                'unit' => '',
                'requestId' => '',
                'isEncrypted' => null,
                'name' => '',
                'useTimestampAsPersistenceTimestamp' => null,
                'value' => '',
                'selectedByUserTimestamp' => 0,
                'timestamp' => 0,
                'isLargeValue' => null
        ]
    ],
    'eventCancelled' => null,
    'eventOrganizer' => '',
    'eventUrl' => '',
    'eventDescription' => '',
    'eventName' => '',
    'eventType' => '',
    'endDateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/marketing/v3/marketing-events/:objectId', [
  'body' => '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'endDateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'startDateTime' => '',
  'customProperties' => [
    [
        'sourceId' => '',
        'selectedByUser' => null,
        'sourceLabel' => '',
        'sourceUpstreamDeployable' => '',
        'source' => '',
        'updatedByUserId' => 0,
        'persistenceTimestamp' => 0,
        'sourceMetadata' => '',
        'dataSensitivity' => '',
        'sourceVid' => [
                
        ],
        'unit' => '',
        'requestId' => '',
        'isEncrypted' => null,
        'name' => '',
        'useTimestampAsPersistenceTimestamp' => null,
        'value' => '',
        'selectedByUserTimestamp' => 0,
        'timestamp' => 0,
        'isLargeValue' => null
    ]
  ],
  'eventCancelled' => null,
  'eventOrganizer' => '',
  'eventUrl' => '',
  'eventDescription' => '',
  'eventName' => '',
  'eventType' => '',
  'endDateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:objectId');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:objectId' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("PATCH", "/baseUrl/marketing/v3/marketing-events/:objectId", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

payload = {
    "startDateTime": "",
    "customProperties": [
        {
            "sourceId": "",
            "selectedByUser": False,
            "sourceLabel": "",
            "sourceUpstreamDeployable": "",
            "source": "",
            "updatedByUserId": 0,
            "persistenceTimestamp": 0,
            "sourceMetadata": "",
            "dataSensitivity": "",
            "sourceVid": [],
            "unit": "",
            "requestId": "",
            "isEncrypted": False,
            "name": "",
            "useTimestampAsPersistenceTimestamp": False,
            "value": "",
            "selectedByUserTimestamp": 0,
            "timestamp": 0,
            "isLargeValue": False
        }
    ],
    "eventCancelled": False,
    "eventOrganizer": "",
    "eventUrl": "",
    "eventDescription": "",
    "eventName": "",
    "eventType": "",
    "endDateTime": ""
}
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:objectId"

payload <- "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:objectId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.patch('/baseUrl/marketing/v3/marketing-events/:objectId') do |req|
  req.body = "{\n  \"startDateTime\": \"\",\n  \"customProperties\": [\n    {\n      \"sourceId\": \"\",\n      \"selectedByUser\": false,\n      \"sourceLabel\": \"\",\n      \"sourceUpstreamDeployable\": \"\",\n      \"source\": \"\",\n      \"updatedByUserId\": 0,\n      \"persistenceTimestamp\": 0,\n      \"sourceMetadata\": \"\",\n      \"dataSensitivity\": \"\",\n      \"sourceVid\": [],\n      \"unit\": \"\",\n      \"requestId\": \"\",\n      \"isEncrypted\": false,\n      \"name\": \"\",\n      \"useTimestampAsPersistenceTimestamp\": false,\n      \"value\": \"\",\n      \"selectedByUserTimestamp\": 0,\n      \"timestamp\": 0,\n      \"isLargeValue\": false\n    }\n  ],\n  \"eventCancelled\": false,\n  \"eventOrganizer\": \"\",\n  \"eventUrl\": \"\",\n  \"eventDescription\": \"\",\n  \"eventName\": \"\",\n  \"eventType\": \"\",\n  \"endDateTime\": \"\"\n}"
end

puts response.status
puts response.body
use std::str::FromStr;
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:objectId";

    let payload = json!({
        "startDateTime": "",
        "customProperties": (
            json!({
                "sourceId": "",
                "selectedByUser": false,
                "sourceLabel": "",
                "sourceUpstreamDeployable": "",
                "source": "",
                "updatedByUserId": 0,
                "persistenceTimestamp": 0,
                "sourceMetadata": "",
                "dataSensitivity": "",
                "sourceVid": (),
                "unit": "",
                "requestId": "",
                "isEncrypted": false,
                "name": "",
                "useTimestampAsPersistenceTimestamp": false,
                "value": "",
                "selectedByUserTimestamp": 0,
                "timestamp": 0,
                "isLargeValue": false
            })
        ),
        "eventCancelled": false,
        "eventOrganizer": "",
        "eventUrl": "",
        "eventDescription": "",
        "eventName": "",
        "eventType": "",
        "endDateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PATCH").unwrap(), url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PATCH \
  --url {{baseUrl}}/marketing/v3/marketing-events/:objectId \
  --header 'content-type: application/json' \
  --data '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}'
echo '{
  "startDateTime": "",
  "customProperties": [
    {
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    }
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
}' |  \
  http PATCH {{baseUrl}}/marketing/v3/marketing-events/:objectId \
  content-type:application/json
wget --quiet \
  --method PATCH \
  --header 'content-type: application/json' \
  --body-data '{\n  "startDateTime": "",\n  "customProperties": [\n    {\n      "sourceId": "",\n      "selectedByUser": false,\n      "sourceLabel": "",\n      "sourceUpstreamDeployable": "",\n      "source": "",\n      "updatedByUserId": 0,\n      "persistenceTimestamp": 0,\n      "sourceMetadata": "",\n      "dataSensitivity": "",\n      "sourceVid": [],\n      "unit": "",\n      "requestId": "",\n      "isEncrypted": false,\n      "name": "",\n      "useTimestampAsPersistenceTimestamp": false,\n      "value": "",\n      "selectedByUserTimestamp": 0,\n      "timestamp": 0,\n      "isLargeValue": false\n    }\n  ],\n  "eventCancelled": false,\n  "eventOrganizer": "",\n  "eventUrl": "",\n  "eventDescription": "",\n  "eventName": "",\n  "eventType": "",\n  "endDateTime": ""\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/:objectId
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "startDateTime": "",
  "customProperties": [
    [
      "sourceId": "",
      "selectedByUser": false,
      "sourceLabel": "",
      "sourceUpstreamDeployable": "",
      "source": "",
      "updatedByUserId": 0,
      "persistenceTimestamp": 0,
      "sourceMetadata": "",
      "dataSensitivity": "",
      "sourceVid": [],
      "unit": "",
      "requestId": "",
      "isEncrypted": false,
      "name": "",
      "useTimestampAsPersistenceTimestamp": false,
      "value": "",
      "selectedByUserTimestamp": 0,
      "timestamp": 0,
      "isLargeValue": false
    ]
  ],
  "eventCancelled": false,
  "eventOrganizer": "",
  "eventUrl": "",
  "eventDescription": "",
  "eventName": "",
  "eventType": "",
  "endDateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:objectId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Create or Update Multiple Marketing Events
{{baseUrl}}/marketing/v3/marketing-events/events/upsert
BODY json

{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/upsert");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events/upsert" {:content-type :json
                                                                                        :form-params {:inputs [{:startDateTime ""
                                                                                                                :customProperties [{:sourceId ""
                                                                                                                                    :selectedByUser false
                                                                                                                                    :sourceLabel ""
                                                                                                                                    :sourceUpstreamDeployable ""
                                                                                                                                    :source ""
                                                                                                                                    :updatedByUserId 0
                                                                                                                                    :persistenceTimestamp 0
                                                                                                                                    :sourceMetadata ""
                                                                                                                                    :dataSensitivity ""
                                                                                                                                    :sourceVid []
                                                                                                                                    :unit ""
                                                                                                                                    :requestId ""
                                                                                                                                    :isEncrypted false
                                                                                                                                    :name ""
                                                                                                                                    :useTimestampAsPersistenceTimestamp false
                                                                                                                                    :value ""
                                                                                                                                    :selectedByUserTimestamp 0
                                                                                                                                    :timestamp 0
                                                                                                                                    :isLargeValue false}]
                                                                                                                :externalAccountId ""
                                                                                                                :eventCancelled false
                                                                                                                :eventOrganizer ""
                                                                                                                :eventUrl ""
                                                                                                                :externalEventId ""
                                                                                                                :eventDescription ""
                                                                                                                :eventName ""
                                                                                                                :eventType ""
                                                                                                                :eventCompleted false
                                                                                                                :endDateTime ""}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/upsert"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/upsert"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/upsert");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/upsert"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events/upsert HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 985

{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events/upsert")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/upsert"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/upsert")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events/upsert")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      startDateTime: '',
      customProperties: [
        {
          sourceId: '',
          selectedByUser: false,
          sourceLabel: '',
          sourceUpstreamDeployable: '',
          source: '',
          updatedByUserId: 0,
          persistenceTimestamp: 0,
          sourceMetadata: '',
          dataSensitivity: '',
          sourceVid: [],
          unit: '',
          requestId: '',
          isEncrypted: false,
          name: '',
          useTimestampAsPersistenceTimestamp: false,
          value: '',
          selectedByUserTimestamp: 0,
          timestamp: 0,
          isLargeValue: false
        }
      ],
      externalAccountId: '',
      eventCancelled: false,
      eventOrganizer: '',
      eventUrl: '',
      externalEventId: '',
      eventDescription: '',
      eventName: '',
      eventType: '',
      eventCompleted: false,
      endDateTime: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/upsert');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/upsert',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [
      {
        startDateTime: '',
        customProperties: [
          {
            sourceId: '',
            selectedByUser: false,
            sourceLabel: '',
            sourceUpstreamDeployable: '',
            source: '',
            updatedByUserId: 0,
            persistenceTimestamp: 0,
            sourceMetadata: '',
            dataSensitivity: '',
            sourceVid: [],
            unit: '',
            requestId: '',
            isEncrypted: false,
            name: '',
            useTimestampAsPersistenceTimestamp: false,
            value: '',
            selectedByUserTimestamp: 0,
            timestamp: 0,
            isLargeValue: false
          }
        ],
        externalAccountId: '',
        eventCancelled: false,
        eventOrganizer: '',
        eventUrl: '',
        externalEventId: '',
        eventDescription: '',
        eventName: '',
        eventType: '',
        eventCompleted: false,
        endDateTime: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/upsert';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"externalAccountId":"","eventCancelled":false,"eventOrganizer":"","eventUrl":"","externalEventId":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/upsert',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "startDateTime": "",\n      "customProperties": [\n        {\n          "sourceId": "",\n          "selectedByUser": false,\n          "sourceLabel": "",\n          "sourceUpstreamDeployable": "",\n          "source": "",\n          "updatedByUserId": 0,\n          "persistenceTimestamp": 0,\n          "sourceMetadata": "",\n          "dataSensitivity": "",\n          "sourceVid": [],\n          "unit": "",\n          "requestId": "",\n          "isEncrypted": false,\n          "name": "",\n          "useTimestampAsPersistenceTimestamp": false,\n          "value": "",\n          "selectedByUserTimestamp": 0,\n          "timestamp": 0,\n          "isLargeValue": false\n        }\n      ],\n      "externalAccountId": "",\n      "eventCancelled": false,\n      "eventOrganizer": "",\n      "eventUrl": "",\n      "externalEventId": "",\n      "eventDescription": "",\n      "eventName": "",\n      "eventType": "",\n      "eventCompleted": false,\n      "endDateTime": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/upsert")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/upsert',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  inputs: [
    {
      startDateTime: '',
      customProperties: [
        {
          sourceId: '',
          selectedByUser: false,
          sourceLabel: '',
          sourceUpstreamDeployable: '',
          source: '',
          updatedByUserId: 0,
          persistenceTimestamp: 0,
          sourceMetadata: '',
          dataSensitivity: '',
          sourceVid: [],
          unit: '',
          requestId: '',
          isEncrypted: false,
          name: '',
          useTimestampAsPersistenceTimestamp: false,
          value: '',
          selectedByUserTimestamp: 0,
          timestamp: 0,
          isLargeValue: false
        }
      ],
      externalAccountId: '',
      eventCancelled: false,
      eventOrganizer: '',
      eventUrl: '',
      externalEventId: '',
      eventDescription: '',
      eventName: '',
      eventType: '',
      eventCompleted: false,
      endDateTime: ''
    }
  ]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/upsert',
  headers: {'content-type': 'application/json'},
  body: {
    inputs: [
      {
        startDateTime: '',
        customProperties: [
          {
            sourceId: '',
            selectedByUser: false,
            sourceLabel: '',
            sourceUpstreamDeployable: '',
            source: '',
            updatedByUserId: 0,
            persistenceTimestamp: 0,
            sourceMetadata: '',
            dataSensitivity: '',
            sourceVid: [],
            unit: '',
            requestId: '',
            isEncrypted: false,
            name: '',
            useTimestampAsPersistenceTimestamp: false,
            value: '',
            selectedByUserTimestamp: 0,
            timestamp: 0,
            isLargeValue: false
          }
        ],
        externalAccountId: '',
        eventCancelled: false,
        eventOrganizer: '',
        eventUrl: '',
        externalEventId: '',
        eventDescription: '',
        eventName: '',
        eventType: '',
        eventCompleted: false,
        endDateTime: ''
      }
    ]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/upsert');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      startDateTime: '',
      customProperties: [
        {
          sourceId: '',
          selectedByUser: false,
          sourceLabel: '',
          sourceUpstreamDeployable: '',
          source: '',
          updatedByUserId: 0,
          persistenceTimestamp: 0,
          sourceMetadata: '',
          dataSensitivity: '',
          sourceVid: [],
          unit: '',
          requestId: '',
          isEncrypted: false,
          name: '',
          useTimestampAsPersistenceTimestamp: false,
          value: '',
          selectedByUserTimestamp: 0,
          timestamp: 0,
          isLargeValue: false
        }
      ],
      externalAccountId: '',
      eventCancelled: false,
      eventOrganizer: '',
      eventUrl: '',
      externalEventId: '',
      eventDescription: '',
      eventName: '',
      eventType: '',
      eventCompleted: false,
      endDateTime: ''
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/upsert',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [
      {
        startDateTime: '',
        customProperties: [
          {
            sourceId: '',
            selectedByUser: false,
            sourceLabel: '',
            sourceUpstreamDeployable: '',
            source: '',
            updatedByUserId: 0,
            persistenceTimestamp: 0,
            sourceMetadata: '',
            dataSensitivity: '',
            sourceVid: [],
            unit: '',
            requestId: '',
            isEncrypted: false,
            name: '',
            useTimestampAsPersistenceTimestamp: false,
            value: '',
            selectedByUserTimestamp: 0,
            timestamp: 0,
            isLargeValue: false
          }
        ],
        externalAccountId: '',
        eventCancelled: false,
        eventOrganizer: '',
        eventUrl: '',
        externalEventId: '',
        eventDescription: '',
        eventName: '',
        eventType: '',
        eventCompleted: false,
        endDateTime: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/upsert';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"externalAccountId":"","eventCancelled":false,"eventOrganizer":"","eventUrl":"","externalEventId":"","eventDescription":"","eventName":"","eventType":"","eventCompleted":false,"endDateTime":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"startDateTime": @"", @"customProperties": @[ @{ @"sourceId": @"", @"selectedByUser": @NO, @"sourceLabel": @"", @"sourceUpstreamDeployable": @"", @"source": @"", @"updatedByUserId": @0, @"persistenceTimestamp": @0, @"sourceMetadata": @"", @"dataSensitivity": @"", @"sourceVid": @[  ], @"unit": @"", @"requestId": @"", @"isEncrypted": @NO, @"name": @"", @"useTimestampAsPersistenceTimestamp": @NO, @"value": @"", @"selectedByUserTimestamp": @0, @"timestamp": @0, @"isLargeValue": @NO } ], @"externalAccountId": @"", @"eventCancelled": @NO, @"eventOrganizer": @"", @"eventUrl": @"", @"externalEventId": @"", @"eventDescription": @"", @"eventName": @"", @"eventType": @"", @"eventCompleted": @NO, @"endDateTime": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/upsert"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/upsert" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/upsert",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'startDateTime' => '',
                'customProperties' => [
                                [
                                                                'sourceId' => '',
                                                                'selectedByUser' => null,
                                                                'sourceLabel' => '',
                                                                'sourceUpstreamDeployable' => '',
                                                                'source' => '',
                                                                'updatedByUserId' => 0,
                                                                'persistenceTimestamp' => 0,
                                                                'sourceMetadata' => '',
                                                                'dataSensitivity' => '',
                                                                'sourceVid' => [
                                                                                                                                
                                                                ],
                                                                'unit' => '',
                                                                'requestId' => '',
                                                                'isEncrypted' => null,
                                                                'name' => '',
                                                                'useTimestampAsPersistenceTimestamp' => null,
                                                                'value' => '',
                                                                'selectedByUserTimestamp' => 0,
                                                                'timestamp' => 0,
                                                                'isLargeValue' => null
                                ]
                ],
                'externalAccountId' => '',
                'eventCancelled' => null,
                'eventOrganizer' => '',
                'eventUrl' => '',
                'externalEventId' => '',
                'eventDescription' => '',
                'eventName' => '',
                'eventType' => '',
                'eventCompleted' => null,
                'endDateTime' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/upsert', [
  'body' => '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/upsert');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'startDateTime' => '',
        'customProperties' => [
                [
                                'sourceId' => '',
                                'selectedByUser' => null,
                                'sourceLabel' => '',
                                'sourceUpstreamDeployable' => '',
                                'source' => '',
                                'updatedByUserId' => 0,
                                'persistenceTimestamp' => 0,
                                'sourceMetadata' => '',
                                'dataSensitivity' => '',
                                'sourceVid' => [
                                                                
                                ],
                                'unit' => '',
                                'requestId' => '',
                                'isEncrypted' => null,
                                'name' => '',
                                'useTimestampAsPersistenceTimestamp' => null,
                                'value' => '',
                                'selectedByUserTimestamp' => 0,
                                'timestamp' => 0,
                                'isLargeValue' => null
                ]
        ],
        'externalAccountId' => '',
        'eventCancelled' => null,
        'eventOrganizer' => '',
        'eventUrl' => '',
        'externalEventId' => '',
        'eventDescription' => '',
        'eventName' => '',
        'eventType' => '',
        'eventCompleted' => null,
        'endDateTime' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'startDateTime' => '',
        'customProperties' => [
                [
                                'sourceId' => '',
                                'selectedByUser' => null,
                                'sourceLabel' => '',
                                'sourceUpstreamDeployable' => '',
                                'source' => '',
                                'updatedByUserId' => 0,
                                'persistenceTimestamp' => 0,
                                'sourceMetadata' => '',
                                'dataSensitivity' => '',
                                'sourceVid' => [
                                                                
                                ],
                                'unit' => '',
                                'requestId' => '',
                                'isEncrypted' => null,
                                'name' => '',
                                'useTimestampAsPersistenceTimestamp' => null,
                                'value' => '',
                                'selectedByUserTimestamp' => 0,
                                'timestamp' => 0,
                                'isLargeValue' => null
                ]
        ],
        'externalAccountId' => '',
        'eventCancelled' => null,
        'eventOrganizer' => '',
        'eventUrl' => '',
        'externalEventId' => '',
        'eventDescription' => '',
        'eventName' => '',
        'eventType' => '',
        'eventCompleted' => null,
        'endDateTime' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/upsert');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/upsert' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/upsert' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events/upsert", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/upsert"

payload = { "inputs": [
        {
            "startDateTime": "",
            "customProperties": [
                {
                    "sourceId": "",
                    "selectedByUser": False,
                    "sourceLabel": "",
                    "sourceUpstreamDeployable": "",
                    "source": "",
                    "updatedByUserId": 0,
                    "persistenceTimestamp": 0,
                    "sourceMetadata": "",
                    "dataSensitivity": "",
                    "sourceVid": [],
                    "unit": "",
                    "requestId": "",
                    "isEncrypted": False,
                    "name": "",
                    "useTimestampAsPersistenceTimestamp": False,
                    "value": "",
                    "selectedByUserTimestamp": 0,
                    "timestamp": 0,
                    "isLargeValue": False
                }
            ],
            "externalAccountId": "",
            "eventCancelled": False,
            "eventOrganizer": "",
            "eventUrl": "",
            "externalEventId": "",
            "eventDescription": "",
            "eventName": "",
            "eventType": "",
            "eventCompleted": False,
            "endDateTime": ""
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/upsert"

payload <- "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/upsert")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events/upsert') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"externalAccountId\": \"\",\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"externalEventId\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"eventCompleted\": false,\n      \"endDateTime\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/upsert";

    let payload = json!({"inputs": (
            json!({
                "startDateTime": "",
                "customProperties": (
                    json!({
                        "sourceId": "",
                        "selectedByUser": false,
                        "sourceLabel": "",
                        "sourceUpstreamDeployable": "",
                        "source": "",
                        "updatedByUserId": 0,
                        "persistenceTimestamp": 0,
                        "sourceMetadata": "",
                        "dataSensitivity": "",
                        "sourceVid": (),
                        "unit": "",
                        "requestId": "",
                        "isEncrypted": false,
                        "name": "",
                        "useTimestampAsPersistenceTimestamp": false,
                        "value": "",
                        "selectedByUserTimestamp": 0,
                        "timestamp": 0,
                        "isLargeValue": false
                    })
                ),
                "externalAccountId": "",
                "eventCancelled": false,
                "eventOrganizer": "",
                "eventUrl": "",
                "externalEventId": "",
                "eventDescription": "",
                "eventName": "",
                "eventType": "",
                "eventCompleted": false,
                "endDateTime": ""
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/events/upsert \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}'
echo '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/events/upsert \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "startDateTime": "",\n      "customProperties": [\n        {\n          "sourceId": "",\n          "selectedByUser": false,\n          "sourceLabel": "",\n          "sourceUpstreamDeployable": "",\n          "source": "",\n          "updatedByUserId": 0,\n          "persistenceTimestamp": 0,\n          "sourceMetadata": "",\n          "dataSensitivity": "",\n          "sourceVid": [],\n          "unit": "",\n          "requestId": "",\n          "isEncrypted": false,\n          "name": "",\n          "useTimestampAsPersistenceTimestamp": false,\n          "value": "",\n          "selectedByUserTimestamp": 0,\n          "timestamp": 0,\n          "isLargeValue": false\n        }\n      ],\n      "externalAccountId": "",\n      "eventCancelled": false,\n      "eventOrganizer": "",\n      "eventUrl": "",\n      "externalEventId": "",\n      "eventDescription": "",\n      "eventName": "",\n      "eventType": "",\n      "eventCompleted": false,\n      "endDateTime": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/events/upsert
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "startDateTime": "",
      "customProperties": [
        [
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        ]
      ],
      "externalAccountId": "",
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "externalEventId": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "eventCompleted": false,
      "endDateTime": ""
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/upsert")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Delete Multiple Marketing Events by External Ids
{{baseUrl}}/marketing/v3/marketing-events/events/delete
BODY json

{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/delete");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events/delete" {:content-type :json
                                                                                        :form-params {:inputs [{:externalAccountId ""
                                                                                                                :externalEventId ""
                                                                                                                :appId 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/delete"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/delete"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/delete");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/delete"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events/delete HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 110

{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events/delete")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/delete"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/delete")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events/delete")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      externalAccountId: '',
      externalEventId: '',
      appId: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/delete');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/delete',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{externalAccountId: '', externalEventId: '', appId: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/delete';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"externalAccountId":"","externalEventId":"","appId":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/delete',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "externalAccountId": "",\n      "externalEventId": "",\n      "appId": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/delete")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/delete',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({inputs: [{externalAccountId: '', externalEventId: '', appId: 0}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/delete',
  headers: {'content-type': 'application/json'},
  body: {inputs: [{externalAccountId: '', externalEventId: '', appId: 0}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/delete');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      externalAccountId: '',
      externalEventId: '',
      appId: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/delete',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{externalAccountId: '', externalEventId: '', appId: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/delete';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"externalAccountId":"","externalEventId":"","appId":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"externalAccountId": @"", @"externalEventId": @"", @"appId": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/delete"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/delete" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/delete",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'externalAccountId' => '',
                'externalEventId' => '',
                'appId' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/delete', [
  'body' => '{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/delete');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'externalAccountId' => '',
        'externalEventId' => '',
        'appId' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'externalAccountId' => '',
        'externalEventId' => '',
        'appId' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/delete');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/delete' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events/delete", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/delete"

payload = { "inputs": [
        {
            "externalAccountId": "",
            "externalEventId": "",
            "appId": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/delete"

payload <- "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/delete")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events/delete') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"externalAccountId\": \"\",\n      \"externalEventId\": \"\",\n      \"appId\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/delete";

    let payload = json!({"inputs": (
            json!({
                "externalAccountId": "",
                "externalEventId": "",
                "appId": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/events/delete \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/events/delete \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "externalAccountId": "",\n      "externalEventId": "",\n      "appId": 0\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/events/delete
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "externalAccountId": "",
      "externalEventId": "",
      "appId": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/delete")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Delete Multiple Marketing Events by ObjectId
{{baseUrl}}/marketing/v3/marketing-events/batch/archive
BODY json

{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/batch/archive");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/batch/archive" {:content-type :json
                                                                                        :form-params {:inputs [{:objectId ""}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/batch/archive"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/batch/archive"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/batch/archive");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/batch/archive"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/batch/archive HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 54

{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/batch/archive")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/batch/archive"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/batch/archive")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/batch/archive")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      objectId: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/batch/archive');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/archive',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{objectId: ''}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/batch/archive';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"objectId":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/archive',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "objectId": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/batch/archive")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/batch/archive',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({inputs: [{objectId: ''}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/archive',
  headers: {'content-type': 'application/json'},
  body: {inputs: [{objectId: ''}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/batch/archive');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      objectId: ''
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/archive',
  headers: {'content-type': 'application/json'},
  data: {inputs: [{objectId: ''}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/batch/archive';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"objectId":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"objectId": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/batch/archive"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/batch/archive" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/batch/archive",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'objectId' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/batch/archive', [
  'body' => '{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/batch/archive');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'objectId' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'objectId' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/batch/archive');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/batch/archive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/batch/archive' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/batch/archive", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/batch/archive"

payload = { "inputs": [{ "objectId": "" }] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/batch/archive"

payload <- "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/batch/archive")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/batch/archive') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"objectId\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/batch/archive";

    let payload = json!({"inputs": (json!({"objectId": ""}))});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/batch/archive \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}'
echo '{
  "inputs": [
    {
      "objectId": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/batch/archive \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "objectId": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/batch/archive
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [["objectId": ""]]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/batch/archive")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Update Multiple Marketing Events by ObjectId
{{baseUrl}}/marketing/v3/marketing-events/batch/update
BODY json

{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/batch/update");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/batch/update" {:content-type :json
                                                                                       :form-params {:inputs [{:startDateTime ""
                                                                                                               :customProperties [{:sourceId ""
                                                                                                                                   :selectedByUser false
                                                                                                                                   :sourceLabel ""
                                                                                                                                   :sourceUpstreamDeployable ""
                                                                                                                                   :source ""
                                                                                                                                   :updatedByUserId 0
                                                                                                                                   :persistenceTimestamp 0
                                                                                                                                   :sourceMetadata ""
                                                                                                                                   :dataSensitivity ""
                                                                                                                                   :sourceVid []
                                                                                                                                   :unit ""
                                                                                                                                   :requestId ""
                                                                                                                                   :isEncrypted false
                                                                                                                                   :name ""
                                                                                                                                   :useTimestampAsPersistenceTimestamp false
                                                                                                                                   :value ""
                                                                                                                                   :selectedByUserTimestamp 0
                                                                                                                                   :timestamp 0
                                                                                                                                   :isLargeValue false}]
                                                                                                               :eventCancelled false
                                                                                                               :eventOrganizer ""
                                                                                                               :eventUrl ""
                                                                                                               :eventDescription ""
                                                                                                               :eventName ""
                                                                                                               :eventType ""
                                                                                                               :endDateTime ""
                                                                                                               :objectId ""}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/batch/update"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/batch/update"),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/batch/update");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/batch/update"

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/batch/update HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 916

{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/batch/update")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/batch/update"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/batch/update")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/batch/update")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      startDateTime: '',
      customProperties: [
        {
          sourceId: '',
          selectedByUser: false,
          sourceLabel: '',
          sourceUpstreamDeployable: '',
          source: '',
          updatedByUserId: 0,
          persistenceTimestamp: 0,
          sourceMetadata: '',
          dataSensitivity: '',
          sourceVid: [],
          unit: '',
          requestId: '',
          isEncrypted: false,
          name: '',
          useTimestampAsPersistenceTimestamp: false,
          value: '',
          selectedByUserTimestamp: 0,
          timestamp: 0,
          isLargeValue: false
        }
      ],
      eventCancelled: false,
      eventOrganizer: '',
      eventUrl: '',
      eventDescription: '',
      eventName: '',
      eventType: '',
      endDateTime: '',
      objectId: ''
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/batch/update');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/update',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [
      {
        startDateTime: '',
        customProperties: [
          {
            sourceId: '',
            selectedByUser: false,
            sourceLabel: '',
            sourceUpstreamDeployable: '',
            source: '',
            updatedByUserId: 0,
            persistenceTimestamp: 0,
            sourceMetadata: '',
            dataSensitivity: '',
            sourceVid: [],
            unit: '',
            requestId: '',
            isEncrypted: false,
            name: '',
            useTimestampAsPersistenceTimestamp: false,
            value: '',
            selectedByUserTimestamp: 0,
            timestamp: 0,
            isLargeValue: false
          }
        ],
        eventCancelled: false,
        eventOrganizer: '',
        eventUrl: '',
        eventDescription: '',
        eventName: '',
        eventType: '',
        endDateTime: '',
        objectId: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/batch/update';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"eventCancelled":false,"eventOrganizer":"","eventUrl":"","eventDescription":"","eventName":"","eventType":"","endDateTime":"","objectId":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/update',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "startDateTime": "",\n      "customProperties": [\n        {\n          "sourceId": "",\n          "selectedByUser": false,\n          "sourceLabel": "",\n          "sourceUpstreamDeployable": "",\n          "source": "",\n          "updatedByUserId": 0,\n          "persistenceTimestamp": 0,\n          "sourceMetadata": "",\n          "dataSensitivity": "",\n          "sourceVid": [],\n          "unit": "",\n          "requestId": "",\n          "isEncrypted": false,\n          "name": "",\n          "useTimestampAsPersistenceTimestamp": false,\n          "value": "",\n          "selectedByUserTimestamp": 0,\n          "timestamp": 0,\n          "isLargeValue": false\n        }\n      ],\n      "eventCancelled": false,\n      "eventOrganizer": "",\n      "eventUrl": "",\n      "eventDescription": "",\n      "eventName": "",\n      "eventType": "",\n      "endDateTime": "",\n      "objectId": ""\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/batch/update")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/batch/update',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  inputs: [
    {
      startDateTime: '',
      customProperties: [
        {
          sourceId: '',
          selectedByUser: false,
          sourceLabel: '',
          sourceUpstreamDeployable: '',
          source: '',
          updatedByUserId: 0,
          persistenceTimestamp: 0,
          sourceMetadata: '',
          dataSensitivity: '',
          sourceVid: [],
          unit: '',
          requestId: '',
          isEncrypted: false,
          name: '',
          useTimestampAsPersistenceTimestamp: false,
          value: '',
          selectedByUserTimestamp: 0,
          timestamp: 0,
          isLargeValue: false
        }
      ],
      eventCancelled: false,
      eventOrganizer: '',
      eventUrl: '',
      eventDescription: '',
      eventName: '',
      eventType: '',
      endDateTime: '',
      objectId: ''
    }
  ]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/update',
  headers: {'content-type': 'application/json'},
  body: {
    inputs: [
      {
        startDateTime: '',
        customProperties: [
          {
            sourceId: '',
            selectedByUser: false,
            sourceLabel: '',
            sourceUpstreamDeployable: '',
            source: '',
            updatedByUserId: 0,
            persistenceTimestamp: 0,
            sourceMetadata: '',
            dataSensitivity: '',
            sourceVid: [],
            unit: '',
            requestId: '',
            isEncrypted: false,
            name: '',
            useTimestampAsPersistenceTimestamp: false,
            value: '',
            selectedByUserTimestamp: 0,
            timestamp: 0,
            isLargeValue: false
          }
        ],
        eventCancelled: false,
        eventOrganizer: '',
        eventUrl: '',
        eventDescription: '',
        eventName: '',
        eventType: '',
        endDateTime: '',
        objectId: ''
      }
    ]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/batch/update');

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      startDateTime: '',
      customProperties: [
        {
          sourceId: '',
          selectedByUser: false,
          sourceLabel: '',
          sourceUpstreamDeployable: '',
          source: '',
          updatedByUserId: 0,
          persistenceTimestamp: 0,
          sourceMetadata: '',
          dataSensitivity: '',
          sourceVid: [],
          unit: '',
          requestId: '',
          isEncrypted: false,
          name: '',
          useTimestampAsPersistenceTimestamp: false,
          value: '',
          selectedByUserTimestamp: 0,
          timestamp: 0,
          isLargeValue: false
        }
      ],
      eventCancelled: false,
      eventOrganizer: '',
      eventUrl: '',
      eventDescription: '',
      eventName: '',
      eventType: '',
      endDateTime: '',
      objectId: ''
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/batch/update',
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [
      {
        startDateTime: '',
        customProperties: [
          {
            sourceId: '',
            selectedByUser: false,
            sourceLabel: '',
            sourceUpstreamDeployable: '',
            source: '',
            updatedByUserId: 0,
            persistenceTimestamp: 0,
            sourceMetadata: '',
            dataSensitivity: '',
            sourceVid: [],
            unit: '',
            requestId: '',
            isEncrypted: false,
            name: '',
            useTimestampAsPersistenceTimestamp: false,
            value: '',
            selectedByUserTimestamp: 0,
            timestamp: 0,
            isLargeValue: false
          }
        ],
        eventCancelled: false,
        eventOrganizer: '',
        eventUrl: '',
        eventDescription: '',
        eventName: '',
        eventType: '',
        endDateTime: '',
        objectId: ''
      }
    ]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/batch/update';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"startDateTime":"","customProperties":[{"sourceId":"","selectedByUser":false,"sourceLabel":"","sourceUpstreamDeployable":"","source":"","updatedByUserId":0,"persistenceTimestamp":0,"sourceMetadata":"","dataSensitivity":"","sourceVid":[],"unit":"","requestId":"","isEncrypted":false,"name":"","useTimestampAsPersistenceTimestamp":false,"value":"","selectedByUserTimestamp":0,"timestamp":0,"isLargeValue":false}],"eventCancelled":false,"eventOrganizer":"","eventUrl":"","eventDescription":"","eventName":"","eventType":"","endDateTime":"","objectId":""}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"startDateTime": @"", @"customProperties": @[ @{ @"sourceId": @"", @"selectedByUser": @NO, @"sourceLabel": @"", @"sourceUpstreamDeployable": @"", @"source": @"", @"updatedByUserId": @0, @"persistenceTimestamp": @0, @"sourceMetadata": @"", @"dataSensitivity": @"", @"sourceVid": @[  ], @"unit": @"", @"requestId": @"", @"isEncrypted": @NO, @"name": @"", @"useTimestampAsPersistenceTimestamp": @NO, @"value": @"", @"selectedByUserTimestamp": @0, @"timestamp": @0, @"isLargeValue": @NO } ], @"eventCancelled": @NO, @"eventOrganizer": @"", @"eventUrl": @"", @"eventDescription": @"", @"eventName": @"", @"eventType": @"", @"endDateTime": @"", @"objectId": @"" } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/batch/update"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/batch/update" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/batch/update",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'startDateTime' => '',
                'customProperties' => [
                                [
                                                                'sourceId' => '',
                                                                'selectedByUser' => null,
                                                                'sourceLabel' => '',
                                                                'sourceUpstreamDeployable' => '',
                                                                'source' => '',
                                                                'updatedByUserId' => 0,
                                                                'persistenceTimestamp' => 0,
                                                                'sourceMetadata' => '',
                                                                'dataSensitivity' => '',
                                                                'sourceVid' => [
                                                                                                                                
                                                                ],
                                                                'unit' => '',
                                                                'requestId' => '',
                                                                'isEncrypted' => null,
                                                                'name' => '',
                                                                'useTimestampAsPersistenceTimestamp' => null,
                                                                'value' => '',
                                                                'selectedByUserTimestamp' => 0,
                                                                'timestamp' => 0,
                                                                'isLargeValue' => null
                                ]
                ],
                'eventCancelled' => null,
                'eventOrganizer' => '',
                'eventUrl' => '',
                'eventDescription' => '',
                'eventName' => '',
                'eventType' => '',
                'endDateTime' => '',
                'objectId' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/batch/update', [
  'body' => '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/batch/update');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'startDateTime' => '',
        'customProperties' => [
                [
                                'sourceId' => '',
                                'selectedByUser' => null,
                                'sourceLabel' => '',
                                'sourceUpstreamDeployable' => '',
                                'source' => '',
                                'updatedByUserId' => 0,
                                'persistenceTimestamp' => 0,
                                'sourceMetadata' => '',
                                'dataSensitivity' => '',
                                'sourceVid' => [
                                                                
                                ],
                                'unit' => '',
                                'requestId' => '',
                                'isEncrypted' => null,
                                'name' => '',
                                'useTimestampAsPersistenceTimestamp' => null,
                                'value' => '',
                                'selectedByUserTimestamp' => 0,
                                'timestamp' => 0,
                                'isLargeValue' => null
                ]
        ],
        'eventCancelled' => null,
        'eventOrganizer' => '',
        'eventUrl' => '',
        'eventDescription' => '',
        'eventName' => '',
        'eventType' => '',
        'endDateTime' => '',
        'objectId' => ''
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'startDateTime' => '',
        'customProperties' => [
                [
                                'sourceId' => '',
                                'selectedByUser' => null,
                                'sourceLabel' => '',
                                'sourceUpstreamDeployable' => '',
                                'source' => '',
                                'updatedByUserId' => 0,
                                'persistenceTimestamp' => 0,
                                'sourceMetadata' => '',
                                'dataSensitivity' => '',
                                'sourceVid' => [
                                                                
                                ],
                                'unit' => '',
                                'requestId' => '',
                                'isEncrypted' => null,
                                'name' => '',
                                'useTimestampAsPersistenceTimestamp' => null,
                                'value' => '',
                                'selectedByUserTimestamp' => 0,
                                'timestamp' => 0,
                                'isLargeValue' => null
                ]
        ],
        'eventCancelled' => null,
        'eventOrganizer' => '',
        'eventUrl' => '',
        'eventDescription' => '',
        'eventName' => '',
        'eventType' => '',
        'endDateTime' => '',
        'objectId' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/batch/update');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/batch/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/batch/update' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/batch/update", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/batch/update"

payload = { "inputs": [
        {
            "startDateTime": "",
            "customProperties": [
                {
                    "sourceId": "",
                    "selectedByUser": False,
                    "sourceLabel": "",
                    "sourceUpstreamDeployable": "",
                    "source": "",
                    "updatedByUserId": 0,
                    "persistenceTimestamp": 0,
                    "sourceMetadata": "",
                    "dataSensitivity": "",
                    "sourceVid": [],
                    "unit": "",
                    "requestId": "",
                    "isEncrypted": False,
                    "name": "",
                    "useTimestampAsPersistenceTimestamp": False,
                    "value": "",
                    "selectedByUserTimestamp": 0,
                    "timestamp": 0,
                    "isLargeValue": False
                }
            ],
            "eventCancelled": False,
            "eventOrganizer": "",
            "eventUrl": "",
            "eventDescription": "",
            "eventName": "",
            "eventType": "",
            "endDateTime": "",
            "objectId": ""
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/batch/update"

payload <- "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/batch/update")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/batch/update') do |req|
  req.body = "{\n  \"inputs\": [\n    {\n      \"startDateTime\": \"\",\n      \"customProperties\": [\n        {\n          \"sourceId\": \"\",\n          \"selectedByUser\": false,\n          \"sourceLabel\": \"\",\n          \"sourceUpstreamDeployable\": \"\",\n          \"source\": \"\",\n          \"updatedByUserId\": 0,\n          \"persistenceTimestamp\": 0,\n          \"sourceMetadata\": \"\",\n          \"dataSensitivity\": \"\",\n          \"sourceVid\": [],\n          \"unit\": \"\",\n          \"requestId\": \"\",\n          \"isEncrypted\": false,\n          \"name\": \"\",\n          \"useTimestampAsPersistenceTimestamp\": false,\n          \"value\": \"\",\n          \"selectedByUserTimestamp\": 0,\n          \"timestamp\": 0,\n          \"isLargeValue\": false\n        }\n      ],\n      \"eventCancelled\": false,\n      \"eventOrganizer\": \"\",\n      \"eventUrl\": \"\",\n      \"eventDescription\": \"\",\n      \"eventName\": \"\",\n      \"eventType\": \"\",\n      \"endDateTime\": \"\",\n      \"objectId\": \"\"\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/batch/update";

    let payload = json!({"inputs": (
            json!({
                "startDateTime": "",
                "customProperties": (
                    json!({
                        "sourceId": "",
                        "selectedByUser": false,
                        "sourceLabel": "",
                        "sourceUpstreamDeployable": "",
                        "source": "",
                        "updatedByUserId": 0,
                        "persistenceTimestamp": 0,
                        "sourceMetadata": "",
                        "dataSensitivity": "",
                        "sourceVid": (),
                        "unit": "",
                        "requestId": "",
                        "isEncrypted": false,
                        "name": "",
                        "useTimestampAsPersistenceTimestamp": false,
                        "value": "",
                        "selectedByUserTimestamp": 0,
                        "timestamp": 0,
                        "isLargeValue": false
                    })
                ),
                "eventCancelled": false,
                "eventOrganizer": "",
                "eventUrl": "",
                "eventDescription": "",
                "eventName": "",
                "eventType": "",
                "endDateTime": "",
                "objectId": ""
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url {{baseUrl}}/marketing/v3/marketing-events/batch/update \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}'
echo '{
  "inputs": [
    {
      "startDateTime": "",
      "customProperties": [
        {
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        }
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/marketing/v3/marketing-events/batch/update \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "startDateTime": "",\n      "customProperties": [\n        {\n          "sourceId": "",\n          "selectedByUser": false,\n          "sourceLabel": "",\n          "sourceUpstreamDeployable": "",\n          "source": "",\n          "updatedByUserId": 0,\n          "persistenceTimestamp": 0,\n          "sourceMetadata": "",\n          "dataSensitivity": "",\n          "sourceVid": [],\n          "unit": "",\n          "requestId": "",\n          "isEncrypted": false,\n          "name": "",\n          "useTimestampAsPersistenceTimestamp": false,\n          "value": "",\n          "selectedByUserTimestamp": 0,\n          "timestamp": 0,\n          "isLargeValue": false\n        }\n      ],\n      "eventCancelled": false,\n      "eventOrganizer": "",\n      "eventUrl": "",\n      "eventDescription": "",\n      "eventName": "",\n      "eventType": "",\n      "endDateTime": "",\n      "objectId": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/batch/update
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "startDateTime": "",
      "customProperties": [
        [
          "sourceId": "",
          "selectedByUser": false,
          "sourceLabel": "",
          "sourceUpstreamDeployable": "",
          "source": "",
          "updatedByUserId": 0,
          "persistenceTimestamp": 0,
          "sourceMetadata": "",
          "dataSensitivity": "",
          "sourceVid": [],
          "unit": "",
          "requestId": "",
          "isEncrypted": false,
          "name": "",
          "useTimestampAsPersistenceTimestamp": false,
          "value": "",
          "selectedByUserTimestamp": 0,
          "timestamp": 0,
          "isLargeValue": false
        ]
      ],
      "eventCancelled": false,
      "eventOrganizer": "",
      "eventUrl": "",
      "eventDescription": "",
      "eventName": "",
      "eventType": "",
      "endDateTime": "",
      "objectId": ""
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/batch/update")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Mark a marketing event as cancelled
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel
QUERY PARAMS

externalAccountId
externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel" {:query-params {:externalAccountId ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId="

response = HTTP::Client.post url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId="),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=");
var request = new RestRequest("", Method.Post);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId="

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

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId= HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId="))
    .method("POST", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")
  .post(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel',
  params: {externalAccountId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=',
  method: 'POST',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")
  .post(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel',
  qs: {externalAccountId: ''}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel');

req.query({
  externalAccountId: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel',
  params: {externalAccountId: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=" in

Client.call `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData([
  'externalAccountId' => ''
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel');
$request->setRequestMethod('POST');
$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=' -Method POST 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=' -Method POST 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel"

querystring = {"externalAccountId":""}

response = requests.post(url, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel"

queryString <- list(externalAccountId = "")

response <- VERB("POST", url, query = queryString, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events/:externalEventId/cancel') do |req|
  req.params['externalAccountId'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let client = reqwest::Client::new();
    let response = client.post(url)
        .query(&querystring)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId='
http POST '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId='
wget --quiet \
  --method POST \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId='
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/cancel?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Mark a marketing event as completed
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete
QUERY PARAMS

externalAccountId
externalEventId
BODY json

{
  "startDateTime": "",
  "endDateTime": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete" {:query-params {:externalAccountId ""}
                                                                                                           :content-type :json
                                                                                                           :form-params {:startDateTime ""
                                                                                                                         :endDateTime ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId="
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId="),
    Content = new StringContent("{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId="

	payload := strings.NewReader("{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 46

{
  "startDateTime": "",
  "endDateTime": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId="))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=")
  .header("content-type", "application/json")
  .body("{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  startDateTime: '',
  endDateTime: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {startDateTime: '', endDateTime: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "startDateTime": "",\n  "endDateTime": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({startDateTime: '', endDateTime: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete',
  qs: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  body: {startDateTime: '', endDateTime: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete');

req.query({
  externalAccountId: ''
});

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  startDateTime: '',
  endDateTime: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {startDateTime: '', endDateTime: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"startDateTime":"","endDateTime":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"startDateTime": @"",
                              @"endDateTime": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'startDateTime' => '',
    'endDateTime' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=', [
  'body' => '{
  "startDateTime": "",
  "endDateTime": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData([
  'externalAccountId' => ''
]);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'startDateTime' => '',
  'endDateTime' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'startDateTime' => '',
  'endDateTime' => ''
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "endDateTime": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "startDateTime": "",
  "endDateTime": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete"

querystring = {"externalAccountId":""}

payload = {
    "startDateTime": "",
    "endDateTime": ""
}
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete"

queryString <- list(externalAccountId = "")

payload <- "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events/:externalEventId/complete') do |req|
  req.params['externalAccountId'] = ''
  req.body = "{\n  \"startDateTime\": \"\",\n  \"endDateTime\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let payload = json!({
        "startDateTime": "",
        "endDateTime": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .query(&querystring)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=' \
  --header 'content-type: application/json' \
  --data '{
  "startDateTime": "",
  "endDateTime": ""
}'
echo '{
  "startDateTime": "",
  "endDateTime": ""
}' |  \
  http POST '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "startDateTime": "",\n  "endDateTime": ""\n}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId='
import Foundation

let headers = ["content-type": "application/json"]
let parameters = [
  "startDateTime": "",
  "endDateTime": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/complete?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Find App-Specific Marketing Events by External Event Id
{{baseUrl}}/marketing/v3/marketing-events/events/search
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

q
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/search?q=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/events/search" {:headers {:private-app "{{apiKey}}"}
                                                                                       :query-params {:q ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/search?q="
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/search?q="),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/search?q=");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/search?q="

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/events/search?q= HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/events/search?q=")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/search?q="))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/search?q=")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/events/search?q=")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/search',
  params: {q: ''},
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/search?q=")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/search?q=',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/search',
  qs: {q: ''},
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/events/search');

req.query({
  q: ''
});

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/search',
  params: {q: ''},
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/search?q="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/search?q=" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/search?q=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/search');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'q' => ''
]);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/search');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'q' => ''
]));

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/events/search?q=", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/search"

querystring = {"q":""}

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/search"

queryString <- list(q = "")

response <- VERB("GET", url, query = queryString, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/search?q=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/events/search') do |req|
  req.headers['private-app'] = '{{apiKey}}'
  req.params['q'] = ''
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/search";

    let querystring = [
        ("q", ""),
    ];

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=' \
  --header 'private-app: {{apiKey}}'
http GET '{{baseUrl}}/marketing/v3/marketing-events/events/search?q=' \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/search?q='
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/search?q=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Find Marketing Events by External Event Id
{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/:externalEventId/identifiers HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:externalEventId/identifiers',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/:externalEventId/identifiers", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/:externalEventId/identifiers') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:externalEventId/identifiers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
PUT Associate a list with a marketing event (PUT)
{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
QUERY PARAMS

externalAccountId
externalEventId
listId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

	req, _ := http.NewRequest("PUT", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"))
    .method("PUT", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId';
const options = {method: 'PUT'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId';
const options = {method: 'PUT'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
http PUT {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
PUT Associate a list with a marketing event
{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
QUERY PARAMS

marketingEventId
listId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PUT");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/put "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

response = HTTP::Client.put url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Put,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId");
var request = new RestRequest("", Method.Put);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

	req, _ := http.NewRequest("PUT", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
PUT /baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PUT", "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"))
    .method("PUT", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .put(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.put("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PUT', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId';
const options = {method: 'PUT'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId',
  method: 'PUT',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .put(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'PUT',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('PUT', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'PUT',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId';
const options = {method: 'PUT'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"PUT"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId" in

Client.call `PUT uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "PUT",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PUT', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');
$request->setMethod(HTTP_METH_PUT);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');
$request->setRequestMethod('PUT');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId' -Method PUT 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId' -Method PUT 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("PUT", "/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

response = requests.put(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

response <- VERB("PUT", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.put('/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("PUT").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request PUT \
  --url {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
http PUT {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
wget --quiet \
  --method PUT \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
DELETE Disassociate a list from a marketing event (DELETE)
{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
QUERY PARAMS

externalAccountId
externalEventId
listId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

	req, _ := http.NewRequest("DELETE", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
http DELETE {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists/:listId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
DELETE Disassociate a list from a marketing event
{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
QUERY PARAMS

marketingEventId
listId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

response = HTTP::Client.delete url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId");
var request = new RestRequest("", Method.Delete);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

	req, _ := http.NewRequest("DELETE", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"))
    .method("DELETE", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .delete(null)
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId',
  method: 'DELETE',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")
  .delete(null)
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId';
const options = {method: 'DELETE'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId" in

Client.call `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');
$request->setMethod(HTTP_METH_DELETE);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId');
$request->setRequestMethod('DELETE');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId' -Method DELETE 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId' -Method DELETE 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("DELETE", "/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

response = requests.delete(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId"

response <- VERB("DELETE", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId') do |req|
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId";

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
http DELETE {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
wget --quiet \
  --method DELETE \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists/:listId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Get lists associated with a marketing event (GET)
{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists
QUERY PARAMS

marketingEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"

	req, _ := http.NewRequest("GET", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/associations/:marketingEventId/lists') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists
http GET {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/associations/:marketingEventId/lists")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Get lists associated with a marketing event
{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists
QUERY PARAMS

externalAccountId
externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"

	req, _ := http.NewRequest("GET", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists'
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists');

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists'
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists');
$request->setMethod(HTTP_METH_GET);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists');
$request->setRequestMethod('GET');
$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"

response = requests.get(url)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists"

response <- VERB("GET", url, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists') do |req|
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists";

    let client = reqwest::Client::new();
    let response = client.get(url)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists
http GET {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists
wget --quiet \
  --method GET \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/associations/:externalAccountId/:externalEventId/lists")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Read participations breakdown by Contact identifier
{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

contactIdentifier
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/participations/contacts/:contactIdentifier/breakdown")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Read participations breakdown by Marketing Event external identifier
{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

externalAccountId
externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId/breakdown")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Read participations breakdown by Marketing Event internal identifier
{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

marketingEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/participations/:marketingEventId/breakdown HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/participations/:marketingEventId/breakdown',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/participations/:marketingEventId/breakdown", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/participations/:marketingEventId/breakdown') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId/breakdown")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Read participations counters by Marketing Event external identifier
{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

externalAccountId
externalEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/participations/:externalAccountId/:externalEventId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Read participations counters by Marketing Event internal identifier
{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId
HEADERS

private-app
{{apiKey}}
QUERY PARAMS

marketingEventId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "private-app: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId" {:headers {:private-app "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"
headers = HTTP::Headers{
  "private-app" => "{{apiKey}}"
}

response = HTTP::Client.get url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"),
    Headers =
    {
        { "private-app", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId");
var request = new RestRequest("", Method.Get);
request.AddHeader("private-app", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("private-app", "{{apiKey}}")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/participations/:marketingEventId HTTP/1.1
Private-App: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId")
  .setHeader("private-app", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"))
    .header("private-app", "{{apiKey}}")
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId")
  .header("private-app", "{{apiKey}}")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId');
xhr.setRequestHeader('private-app', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId',
  method: 'GET',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId")
  .get()
  .addHeader("private-app", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/participations/:marketingEventId',
  headers: {
    'private-app': '{{apiKey}}'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId',
  headers: {'private-app': '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId');

req.headers({
  'private-app': '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId',
  headers: {'private-app': '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId';
const options = {method: 'GET', headers: {'private-app': '{{apiKey}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"private-app": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];
[request setAllHTTPHeaderFields:headers];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId" in
let headers = Header.add (Header.init ()) "private-app" "{{apiKey}}" in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "private-app: {{apiKey}}"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId', [
  'headers' => [
    'private-app' => '{{apiKey}}',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId');
$request->setRequestMethod('GET');
$request->setHeaders([
  'private-app' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId' -Method GET -Headers $headers
$headers=@{}
$headers.Add("private-app", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = { 'private-app': "{{apiKey}}" }

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/participations/:marketingEventId", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"

headers = {"private-app": "{{apiKey}}"}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId"

response <- VERB("GET", url, add_headers('private-app' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["private-app"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/participations/:marketingEventId') do |req|
  req.headers['private-app'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("private-app", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.get(url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url {{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId \
  --header 'private-app: {{apiKey}}'
http GET {{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId \
  private-app:'{{apiKey}}'
wget --quiet \
  --method GET \
  --header 'private-app: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId
import Foundation

let headers = ["private-app": "{{apiKey}}"]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/participations/:marketingEventId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
GET Retrieve the application settings
{{baseUrl}}/marketing/v3/marketing-events/:appId/settings
QUERY PARAMS

hapikey
{{apiKey}}
appId
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings" {:query-params {:hapikey "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"

response = HTTP::Client.get url
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Get,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"),
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D");
var request = new RestRequest("", Method.Get);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"

	req, _ := http.NewRequest("GET", url, nil)

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D HTTP/1.1
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"))
    .method("GET", HttpRequest.BodyPublishers.noBody())
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .get()
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .asString();
const data = null;

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('GET', '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings',
  params: {hapikey: '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D',
  method: 'GET',
  headers: {}
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .get()
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D',
  headers: {}
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.end();
const request = require('request');

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings',
  qs: {hapikey: '{{apiKey}}'}
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('GET', '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings');

req.query({
  hapikey: '{{apiKey}}'
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'GET',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings',
  params: {hapikey: '{{apiKey}}'}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"GET"];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D" in

Client.call `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D');

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:appId/settings');
$request->setMethod(HTTP_METH_GET);

$request->setQueryData([
  'hapikey' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:appId/settings');
$request->setRequestMethod('GET');
$request->setQuery(new http\QueryString([
  'hapikey' => '{{apiKey}}'
]));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D' -Method GET 
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D' -Method GET 
import http.client

conn = http.client.HTTPSConnection("example.com")

conn.request("GET", "/baseUrl/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings"

querystring = {"hapikey":"{{apiKey}}"}

response = requests.get(url, params=querystring)

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings"

queryString <- list(hapikey = "{{apiKey}}")

response <- VERB("GET", url, query = queryString, content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/marketing/v3/marketing-events/:appId/settings') do |req|
  req.params['hapikey'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings";

    let querystring = [
        ("hapikey", "{{apiKey}}"),
    ];

    let client = reqwest::Client::new();
    let response = client.get(url)
        .query(&querystring)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request GET \
  --url '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D'
http GET '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D'
wget --quiet \
  --method GET \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D'
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Update the application settings
{{baseUrl}}/marketing/v3/marketing-events/:appId/settings
QUERY PARAMS

hapikey
{{apiKey}}
appId
BODY json

{
  "eventDetailsUrl": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"eventDetailsUrl\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings" {:query-params {:hapikey "{{apiKey}}"}
                                                                                          :content-type :json
                                                                                          :form-params {:eventDetailsUrl ""}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"eventDetailsUrl\": \"\"\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"),
    Content = new StringContent("{\n  \"eventDetailsUrl\": \"\"\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"eventDetailsUrl\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"

	payload := strings.NewReader("{\n  \"eventDetailsUrl\": \"\"\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 27

{
  "eventDetailsUrl": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"eventDetailsUrl\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"eventDetailsUrl\": \"\"\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"eventDetailsUrl\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .header("content-type", "application/json")
  .body("{\n  \"eventDetailsUrl\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  eventDetailsUrl: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings',
  params: {hapikey: '{{apiKey}}'},
  headers: {'content-type': 'application/json'},
  data: {eventDetailsUrl: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"eventDetailsUrl":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "eventDetailsUrl": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"eventDetailsUrl\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({eventDetailsUrl: ''}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings',
  qs: {hapikey: '{{apiKey}}'},
  headers: {'content-type': 'application/json'},
  body: {eventDetailsUrl: ''},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings');

req.query({
  hapikey: '{{apiKey}}'
});

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  eventDetailsUrl: ''
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings',
  params: {hapikey: '{{apiKey}}'},
  headers: {'content-type': 'application/json'},
  data: {eventDetailsUrl: ''}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"eventDetailsUrl":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"eventDetailsUrl": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"eventDetailsUrl\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'eventDetailsUrl' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D', [
  'body' => '{
  "eventDetailsUrl": ""
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/:appId/settings');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData([
  'hapikey' => '{{apiKey}}'
]);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'eventDetailsUrl' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'eventDetailsUrl' => ''
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/:appId/settings');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString([
  'hapikey' => '{{apiKey}}'
]));

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "eventDetailsUrl": ""
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "eventDetailsUrl": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"eventDetailsUrl\": \"\"\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings"

querystring = {"hapikey":"{{apiKey}}"}

payload = { "eventDetailsUrl": "" }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings"

queryString <- list(hapikey = "{{apiKey}}")

payload <- "{\n  \"eventDetailsUrl\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"eventDetailsUrl\": \"\"\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/:appId/settings') do |req|
  req.params['hapikey'] = '{{apiKey}}'
  req.body = "{\n  \"eventDetailsUrl\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings";

    let querystring = [
        ("hapikey", "{{apiKey}}"),
    ];

    let payload = json!({"eventDetailsUrl": ""});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .query(&querystring)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D' \
  --header 'content-type: application/json' \
  --data '{
  "eventDetailsUrl": ""
}'
echo '{
  "eventDetailsUrl": ""
}' |  \
  http POST '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "eventDetailsUrl": ""\n}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D'
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["eventDetailsUrl": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/:appId/settings?hapikey=%7B%7BapiKey%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Record a subscriber state by contact ID
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert
QUERY PARAMS

externalAccountId
externalEventId
subscriberState
BODY json

{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert" {:query-params {:externalAccountId ""}
                                                                                                                          :content-type :json
                                                                                                                          :form-params {:inputs [{:vid 0
                                                                                                                                                  :properties {}
                                                                                                                                                  :interactionDateTime 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId="
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId="),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId="

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 104

{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId="))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      vid: 0,
      properties: {},
      interactionDateTime: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"vid":0,"properties":{},"interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "vid": 0,\n      "properties": {},\n      "interactionDateTime": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert',
  qs: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  body: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]},
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert');

req.query({
  externalAccountId: ''
});

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      vid: 0,
      properties: {},
      interactionDateTime: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {inputs: [{vid: 0, properties: {}, interactionDateTime: 0}]}
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"vid":0,"properties":{},"interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"vid": @0, @"properties": @{  }, @"interactionDateTime": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'vid' => 0,
                'properties' => [
                                
                ],
                'interactionDateTime' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=', [
  'body' => '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData([
  'externalAccountId' => ''
]);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'vid' => 0,
        'properties' => [
                
        ],
        'interactionDateTime' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'vid' => 0,
        'properties' => [
                
        ],
        'interactionDateTime' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert"

querystring = {"externalAccountId":""}

payload = { "inputs": [
        {
            "vid": 0,
            "properties": {},
            "interactionDateTime": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert"

queryString <- list(externalAccountId = "")

payload <- "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert') do |req|
  req.params['externalAccountId'] = ''
  req.body = "{\n  \"inputs\": [\n    {\n      \"vid\": 0,\n      \"properties\": {},\n      \"interactionDateTime\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let payload = json!({"inputs": (
            json!({
                "vid": 0,
                "properties": json!({}),
                "interactionDateTime": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .query(&querystring)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=' \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "vid": 0,
      "properties": {},
      "interactionDateTime": 0
    }
  ]
}' |  \
  http POST '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "vid": 0,\n      "properties": {},\n      "interactionDateTime": 0\n    }\n  ]\n}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId='
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "vid": 0,
      "properties": [],
      "interactionDateTime": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/upsert?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}
POST Record a subscriber state by contact email
{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert
QUERY PARAMS

externalAccountId
externalEventId
subscriberState
BODY json

{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert" {:query-params {:externalAccountId ""}
                                                                                                                                :content-type :json
                                                                                                                                :form-params {:inputs [{:contactProperties {}
                                                                                                                                                        :properties {}
                                                                                                                                                        :email ""
                                                                                                                                                        :interactionDateTime 0}]}})
require "http/client"

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId="
headers = HTTP::Headers{
  "content-type" => "application/json"
}
reqBody = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = HTTP::Client.post url, headers: headers, body: reqBody
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId="),
    Content = new StringContent("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=");
var request = new RestRequest("", Method.Post);
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId="

	payload := strings.NewReader("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")

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

	req.Header.Add("content-type", "application/json")

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

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

	fmt.Println(res)
	fmt.Println(string(body))

}
POST /baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId= HTTP/1.1
Content-Type: application/json
Host: example.com
Content-Length: 138

{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId="))
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"))
    .build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=")
  .post(body)
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=")
  .header("content-type", "application/json")
  .body("{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  inputs: [
    {
      contactProperties: {},
      properties: {},
      email: '',
      interactionDateTime: 0
    }
  ]
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"contactProperties":{},"properties":{},"email":"","interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
const settings = {
  async: true,
  crossDomain: true,
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=',
  method: 'POST',
  headers: {
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "inputs": [\n    {\n      "contactProperties": {},\n      "properties": {},\n      "email": "",\n      "interactionDateTime": 0\n    }\n  ]\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=")
  .post(body)
  .addHeader("content-type", "application/json")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'POST',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=',
  headers: {
    'content-type': 'application/json'
  }
};

const req = http.request(options, function (res) {
  const chunks = [];

  res.on('data', function (chunk) {
    chunks.push(chunk);
  });

  res.on('end', function () {
    const body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(JSON.stringify({
  inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert',
  qs: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  body: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  },
  json: true
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert');

req.query({
  externalAccountId: ''
});

req.headers({
  'content-type': 'application/json'
});

req.type('json');
req.send({
  inputs: [
    {
      contactProperties: {},
      properties: {},
      email: '',
      interactionDateTime: 0
    }
  ]
});

req.end(function (res) {
  if (res.error) throw new Error(res.error);

  console.log(res.body);
});
const axios = require('axios').default;

const options = {
  method: 'POST',
  url: '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert',
  params: {externalAccountId: ''},
  headers: {'content-type': 'application/json'},
  data: {
    inputs: [{contactProperties: {}, properties: {}, email: '', interactionDateTime: 0}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=';
const options = {
  method: 'POST',
  headers: {'content-type': 'application/json'},
  body: '{"inputs":[{"contactProperties":{},"properties":{},"email":"","interactionDateTime":0}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"inputs": @[ @{ @"contactProperties": @{  }, @"properties": @{  }, @"email": @"", @"interactionDateTime": @0 } ] };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId="]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"POST"];
[request setAllHTTPHeaderFields:headers];
[request setHTTPBody:postData];

NSURLSession *session = [NSURLSession sharedSession];
NSURLSessionDataTask *dataTask = [session dataTaskWithRequest:request
                                            completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
                                                if (error) {
                                                    NSLog(@"%@", error);
                                                } else {
                                                    NSHTTPURLResponse *httpResponse = (NSHTTPURLResponse *) response;
                                                    NSLog(@"%@", httpResponse);
                                                }
                                            }];
[dataTask resume];
open Cohttp_lwt_unix
open Cohttp
open Lwt

let uri = Uri.of_string "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=" in
let headers = Header.add (Header.init ()) "content-type" "application/json" in
let body = Cohttp_lwt_body.of_string "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'inputs' => [
        [
                'contactProperties' => [
                                
                ],
                'properties' => [
                                
                ],
                'email' => '',
                'interactionDateTime' => 0
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=', [
  'body' => '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}',
  'headers' => [
    'content-type' => 'application/json',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert');
$request->setMethod(HTTP_METH_POST);

$request->setQueryData([
  'externalAccountId' => ''
]);

$request->setHeaders([
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'inputs' => [
    [
        'contactProperties' => [
                
        ],
        'properties' => [
                
        ],
        'email' => '',
        'interactionDateTime' => 0
    ]
  ]
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'inputs' => [
    [
        'contactProperties' => [
                
        ],
        'properties' => [
                
        ],
        'email' => '',
        'interactionDateTime' => 0
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setQuery(new http\QueryString([
  'externalAccountId' => ''
]));

$request->setHeaders([
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
$headers=@{}
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

headers = { 'content-type': "application/json" }

conn.request("POST", "/baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert"

querystring = {"externalAccountId":""}

payload = { "inputs": [
        {
            "contactProperties": {},
            "properties": {},
            "email": "",
            "interactionDateTime": 0
        }
    ] }
headers = {"content-type": "application/json"}

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

print(response.json())
library(httr)

url <- "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert"

queryString <- list(externalAccountId = "")

payload <- "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, query = queryString, content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request.body = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
  headers: {'Content-Type' => 'application/json'}
)

response = conn.post('/baseUrl/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert') do |req|
  req.params['externalAccountId'] = ''
  req.body = "{\n  \"inputs\": [\n    {\n      \"contactProperties\": {},\n      \"properties\": {},\n      \"email\": \"\",\n      \"interactionDateTime\": 0\n    }\n  ]\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert";

    let querystring = [
        ("externalAccountId", ""),
    ];

    let payload = json!({"inputs": (
            json!({
                "contactProperties": json!({}),
                "properties": json!({}),
                "email": "",
                "interactionDateTime": 0
            })
        )});

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("content-type", "application/json".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.post(url)
        .query(&querystring)
        .headers(headers)
        .json(&payload)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request POST \
  --url '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=' \
  --header 'content-type: application/json' \
  --data '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}'
echo '{
  "inputs": [
    {
      "contactProperties": {},
      "properties": {},
      "email": "",
      "interactionDateTime": 0
    }
  ]
}' |  \
  http POST '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=' \
  content-type:application/json
wget --quiet \
  --method POST \
  --header 'content-type: application/json' \
  --body-data '{\n  "inputs": [\n    {\n      "contactProperties": {},\n      "properties": {},\n      "email": "",\n      "interactionDateTime": 0\n    }\n  ]\n}' \
  --output-document \
  - '{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId='
import Foundation

let headers = ["content-type": "application/json"]
let parameters = ["inputs": [
    [
      "contactProperties": [],
      "properties": [],
      "email": "",
      "interactionDateTime": 0
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/marketing/v3/marketing-events/events/:externalEventId/:subscriberState/email-upsert?externalAccountId=")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
RESPONSE HEADERS

Content-Type
*/*
RESPONSE BODY text

{
  "message": "Invalid input (details will vary based on the error)",
  "correlationId": "aeb5f871-7f07-4993-9211-075dc63e7cbf",
  "category": "VALIDATION_ERROR",
  "links": {
    "knowledge-base": "https://www.hubspot.com/products/service/knowledge-base"
  }
}