POST Create activity
{{baseUrl}}/crm/activities
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/activities");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}");

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

(client/post "{{baseUrl}}/crm/activities" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}
                                                           :content-type :json
                                                           :form-params {:account_id ""
                                                                         :activity_date ""
                                                                         :activity_datetime ""
                                                                         :all_day_event false
                                                                         :archived false
                                                                         :asset_id ""
                                                                         :attendees [{:contact_id ""
                                                                                      :created_at ""
                                                                                      :email_address ""
                                                                                      :first_name ""
                                                                                      :id ""
                                                                                      :is_organizer false
                                                                                      :last_name ""
                                                                                      :middle_name ""
                                                                                      :name ""
                                                                                      :prefix ""
                                                                                      :status ""
                                                                                      :suffix ""
                                                                                      :updated_at ""
                                                                                      :user_id ""}]
                                                                         :campaign_id ""
                                                                         :case_id ""
                                                                         :child false
                                                                         :company_id ""
                                                                         :contact_id ""
                                                                         :contract_id ""
                                                                         :created_at ""
                                                                         :created_by ""
                                                                         :custom_fields [{:description ""
                                                                                          :id ""
                                                                                          :name ""
                                                                                          :value ""}]
                                                                         :custom_object_id ""
                                                                         :deleted false
                                                                         :description ""
                                                                         :done false
                                                                         :downstream_id ""
                                                                         :duration_minutes 0
                                                                         :duration_seconds 0
                                                                         :end_date ""
                                                                         :end_datetime ""
                                                                         :event_sub_type ""
                                                                         :group_event false
                                                                         :group_event_type ""
                                                                         :id ""
                                                                         :lead_id ""
                                                                         :location ""
                                                                         :location_address {:city ""
                                                                                            :contact_name ""
                                                                                            :country ""
                                                                                            :county ""
                                                                                            :email ""
                                                                                            :fax ""
                                                                                            :id ""
                                                                                            :latitude ""
                                                                                            :line1 ""
                                                                                            :line2 ""
                                                                                            :line3 ""
                                                                                            :line4 ""
                                                                                            :longitude ""
                                                                                            :name ""
                                                                                            :phone_number ""
                                                                                            :postal_code ""
                                                                                            :row_version ""
                                                                                            :salutation ""
                                                                                            :state ""
                                                                                            :street_number ""
                                                                                            :string ""
                                                                                            :type ""
                                                                                            :website ""}
                                                                         :note ""
                                                                         :opportunity_id ""
                                                                         :owner_id ""
                                                                         :private false
                                                                         :product_id ""
                                                                         :recurrent false
                                                                         :reminder_datetime ""
                                                                         :reminder_set false
                                                                         :show_as ""
                                                                         :solution_id ""
                                                                         :start_datetime ""
                                                                         :title ""
                                                                         :type ""
                                                                         :updated_at ""
                                                                         :updated_by ""
                                                                         :user_id ""
                                                                         :video_conference_id ""
                                                                         :video_conference_url ""}})
require "http/client"

url = "{{baseUrl}}/crm/activities"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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}}/crm/activities"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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}}/crm/activities");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/activities"

	payload := strings.NewReader("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/activities HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1915

{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/activities")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/activities"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/activities")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/activities")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  account_id: '',
  activity_date: '',
  activity_datetime: '',
  all_day_event: false,
  archived: false,
  asset_id: '',
  attendees: [
    {
      contact_id: '',
      created_at: '',
      email_address: '',
      first_name: '',
      id: '',
      is_organizer: false,
      last_name: '',
      middle_name: '',
      name: '',
      prefix: '',
      status: '',
      suffix: '',
      updated_at: '',
      user_id: ''
    }
  ],
  campaign_id: '',
  case_id: '',
  child: false,
  company_id: '',
  contact_id: '',
  contract_id: '',
  created_at: '',
  created_by: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  custom_object_id: '',
  deleted: false,
  description: '',
  done: false,
  downstream_id: '',
  duration_minutes: 0,
  duration_seconds: 0,
  end_date: '',
  end_datetime: '',
  event_sub_type: '',
  group_event: false,
  group_event_type: '',
  id: '',
  lead_id: '',
  location: '',
  location_address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  note: '',
  opportunity_id: '',
  owner_id: '',
  private: false,
  product_id: '',
  recurrent: false,
  reminder_datetime: '',
  reminder_set: false,
  show_as: '',
  solution_id: '',
  start_datetime: '',
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  user_id: '',
  video_conference_id: '',
  video_conference_url: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/activities');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    account_id: '',
    activity_date: '',
    activity_datetime: '',
    all_day_event: false,
    archived: false,
    asset_id: '',
    attendees: [
      {
        contact_id: '',
        created_at: '',
        email_address: '',
        first_name: '',
        id: '',
        is_organizer: false,
        last_name: '',
        middle_name: '',
        name: '',
        prefix: '',
        status: '',
        suffix: '',
        updated_at: '',
        user_id: ''
      }
    ],
    campaign_id: '',
    case_id: '',
    child: false,
    company_id: '',
    contact_id: '',
    contract_id: '',
    created_at: '',
    created_by: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    custom_object_id: '',
    deleted: false,
    description: '',
    done: false,
    downstream_id: '',
    duration_minutes: 0,
    duration_seconds: 0,
    end_date: '',
    end_datetime: '',
    event_sub_type: '',
    group_event: false,
    group_event_type: '',
    id: '',
    lead_id: '',
    location: '',
    location_address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    note: '',
    opportunity_id: '',
    owner_id: '',
    private: false,
    product_id: '',
    recurrent: false,
    reminder_datetime: '',
    reminder_set: false,
    show_as: '',
    solution_id: '',
    start_datetime: '',
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    user_id: '',
    video_conference_id: '',
    video_conference_url: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/activities';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"account_id":"","activity_date":"","activity_datetime":"","all_day_event":false,"archived":false,"asset_id":"","attendees":[{"contact_id":"","created_at":"","email_address":"","first_name":"","id":"","is_organizer":false,"last_name":"","middle_name":"","name":"","prefix":"","status":"","suffix":"","updated_at":"","user_id":""}],"campaign_id":"","case_id":"","child":false,"company_id":"","contact_id":"","contract_id":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"custom_object_id":"","deleted":false,"description":"","done":false,"downstream_id":"","duration_minutes":0,"duration_seconds":0,"end_date":"","end_datetime":"","event_sub_type":"","group_event":false,"group_event_type":"","id":"","lead_id":"","location":"","location_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"note":"","opportunity_id":"","owner_id":"","private":false,"product_id":"","recurrent":false,"reminder_datetime":"","reminder_set":false,"show_as":"","solution_id":"","start_datetime":"","title":"","type":"","updated_at":"","updated_by":"","user_id":"","video_conference_id":"","video_conference_url":""}'
};

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}}/crm/activities',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "account_id": "",\n  "activity_date": "",\n  "activity_datetime": "",\n  "all_day_event": false,\n  "archived": false,\n  "asset_id": "",\n  "attendees": [\n    {\n      "contact_id": "",\n      "created_at": "",\n      "email_address": "",\n      "first_name": "",\n      "id": "",\n      "is_organizer": false,\n      "last_name": "",\n      "middle_name": "",\n      "name": "",\n      "prefix": "",\n      "status": "",\n      "suffix": "",\n      "updated_at": "",\n      "user_id": ""\n    }\n  ],\n  "campaign_id": "",\n  "case_id": "",\n  "child": false,\n  "company_id": "",\n  "contact_id": "",\n  "contract_id": "",\n  "created_at": "",\n  "created_by": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "custom_object_id": "",\n  "deleted": false,\n  "description": "",\n  "done": false,\n  "downstream_id": "",\n  "duration_minutes": 0,\n  "duration_seconds": 0,\n  "end_date": "",\n  "end_datetime": "",\n  "event_sub_type": "",\n  "group_event": false,\n  "group_event_type": "",\n  "id": "",\n  "lead_id": "",\n  "location": "",\n  "location_address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "note": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "private": false,\n  "product_id": "",\n  "recurrent": false,\n  "reminder_datetime": "",\n  "reminder_set": false,\n  "show_as": "",\n  "solution_id": "",\n  "start_datetime": "",\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "user_id": "",\n  "video_conference_id": "",\n  "video_conference_url": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/activities")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  account_id: '',
  activity_date: '',
  activity_datetime: '',
  all_day_event: false,
  archived: false,
  asset_id: '',
  attendees: [
    {
      contact_id: '',
      created_at: '',
      email_address: '',
      first_name: '',
      id: '',
      is_organizer: false,
      last_name: '',
      middle_name: '',
      name: '',
      prefix: '',
      status: '',
      suffix: '',
      updated_at: '',
      user_id: ''
    }
  ],
  campaign_id: '',
  case_id: '',
  child: false,
  company_id: '',
  contact_id: '',
  contract_id: '',
  created_at: '',
  created_by: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  custom_object_id: '',
  deleted: false,
  description: '',
  done: false,
  downstream_id: '',
  duration_minutes: 0,
  duration_seconds: 0,
  end_date: '',
  end_datetime: '',
  event_sub_type: '',
  group_event: false,
  group_event_type: '',
  id: '',
  lead_id: '',
  location: '',
  location_address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  note: '',
  opportunity_id: '',
  owner_id: '',
  private: false,
  product_id: '',
  recurrent: false,
  reminder_datetime: '',
  reminder_set: false,
  show_as: '',
  solution_id: '',
  start_datetime: '',
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  user_id: '',
  video_conference_id: '',
  video_conference_url: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    account_id: '',
    activity_date: '',
    activity_datetime: '',
    all_day_event: false,
    archived: false,
    asset_id: '',
    attendees: [
      {
        contact_id: '',
        created_at: '',
        email_address: '',
        first_name: '',
        id: '',
        is_organizer: false,
        last_name: '',
        middle_name: '',
        name: '',
        prefix: '',
        status: '',
        suffix: '',
        updated_at: '',
        user_id: ''
      }
    ],
    campaign_id: '',
    case_id: '',
    child: false,
    company_id: '',
    contact_id: '',
    contract_id: '',
    created_at: '',
    created_by: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    custom_object_id: '',
    deleted: false,
    description: '',
    done: false,
    downstream_id: '',
    duration_minutes: 0,
    duration_seconds: 0,
    end_date: '',
    end_datetime: '',
    event_sub_type: '',
    group_event: false,
    group_event_type: '',
    id: '',
    lead_id: '',
    location: '',
    location_address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    note: '',
    opportunity_id: '',
    owner_id: '',
    private: false,
    product_id: '',
    recurrent: false,
    reminder_datetime: '',
    reminder_set: false,
    show_as: '',
    solution_id: '',
    start_datetime: '',
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    user_id: '',
    video_conference_id: '',
    video_conference_url: ''
  },
  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}}/crm/activities');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  account_id: '',
  activity_date: '',
  activity_datetime: '',
  all_day_event: false,
  archived: false,
  asset_id: '',
  attendees: [
    {
      contact_id: '',
      created_at: '',
      email_address: '',
      first_name: '',
      id: '',
      is_organizer: false,
      last_name: '',
      middle_name: '',
      name: '',
      prefix: '',
      status: '',
      suffix: '',
      updated_at: '',
      user_id: ''
    }
  ],
  campaign_id: '',
  case_id: '',
  child: false,
  company_id: '',
  contact_id: '',
  contract_id: '',
  created_at: '',
  created_by: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  custom_object_id: '',
  deleted: false,
  description: '',
  done: false,
  downstream_id: '',
  duration_minutes: 0,
  duration_seconds: 0,
  end_date: '',
  end_datetime: '',
  event_sub_type: '',
  group_event: false,
  group_event_type: '',
  id: '',
  lead_id: '',
  location: '',
  location_address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  note: '',
  opportunity_id: '',
  owner_id: '',
  private: false,
  product_id: '',
  recurrent: false,
  reminder_datetime: '',
  reminder_set: false,
  show_as: '',
  solution_id: '',
  start_datetime: '',
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  user_id: '',
  video_conference_id: '',
  video_conference_url: ''
});

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}}/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    account_id: '',
    activity_date: '',
    activity_datetime: '',
    all_day_event: false,
    archived: false,
    asset_id: '',
    attendees: [
      {
        contact_id: '',
        created_at: '',
        email_address: '',
        first_name: '',
        id: '',
        is_organizer: false,
        last_name: '',
        middle_name: '',
        name: '',
        prefix: '',
        status: '',
        suffix: '',
        updated_at: '',
        user_id: ''
      }
    ],
    campaign_id: '',
    case_id: '',
    child: false,
    company_id: '',
    contact_id: '',
    contract_id: '',
    created_at: '',
    created_by: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    custom_object_id: '',
    deleted: false,
    description: '',
    done: false,
    downstream_id: '',
    duration_minutes: 0,
    duration_seconds: 0,
    end_date: '',
    end_datetime: '',
    event_sub_type: '',
    group_event: false,
    group_event_type: '',
    id: '',
    lead_id: '',
    location: '',
    location_address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    note: '',
    opportunity_id: '',
    owner_id: '',
    private: false,
    product_id: '',
    recurrent: false,
    reminder_datetime: '',
    reminder_set: false,
    show_as: '',
    solution_id: '',
    start_datetime: '',
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    user_id: '',
    video_conference_id: '',
    video_conference_url: ''
  }
};

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

const url = '{{baseUrl}}/crm/activities';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"account_id":"","activity_date":"","activity_datetime":"","all_day_event":false,"archived":false,"asset_id":"","attendees":[{"contact_id":"","created_at":"","email_address":"","first_name":"","id":"","is_organizer":false,"last_name":"","middle_name":"","name":"","prefix":"","status":"","suffix":"","updated_at":"","user_id":""}],"campaign_id":"","case_id":"","child":false,"company_id":"","contact_id":"","contract_id":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"custom_object_id":"","deleted":false,"description":"","done":false,"downstream_id":"","duration_minutes":0,"duration_seconds":0,"end_date":"","end_datetime":"","event_sub_type":"","group_event":false,"group_event_type":"","id":"","lead_id":"","location":"","location_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"note":"","opportunity_id":"","owner_id":"","private":false,"product_id":"","recurrent":false,"reminder_datetime":"","reminder_set":false,"show_as":"","solution_id":"","start_datetime":"","title":"","type":"","updated_at":"","updated_by":"","user_id":"","video_conference_id":"","video_conference_url":""}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_id": @"",
                              @"activity_date": @"",
                              @"activity_datetime": @"",
                              @"all_day_event": @NO,
                              @"archived": @NO,
                              @"asset_id": @"",
                              @"attendees": @[ @{ @"contact_id": @"", @"created_at": @"", @"email_address": @"", @"first_name": @"", @"id": @"", @"is_organizer": @NO, @"last_name": @"", @"middle_name": @"", @"name": @"", @"prefix": @"", @"status": @"", @"suffix": @"", @"updated_at": @"", @"user_id": @"" } ],
                              @"campaign_id": @"",
                              @"case_id": @"",
                              @"child": @NO,
                              @"company_id": @"",
                              @"contact_id": @"",
                              @"contract_id": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"custom_object_id": @"",
                              @"deleted": @NO,
                              @"description": @"",
                              @"done": @NO,
                              @"downstream_id": @"",
                              @"duration_minutes": @0,
                              @"duration_seconds": @0,
                              @"end_date": @"",
                              @"end_datetime": @"",
                              @"event_sub_type": @"",
                              @"group_event": @NO,
                              @"group_event_type": @"",
                              @"id": @"",
                              @"lead_id": @"",
                              @"location": @"",
                              @"location_address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" },
                              @"note": @"",
                              @"opportunity_id": @"",
                              @"owner_id": @"",
                              @"private": @NO,
                              @"product_id": @"",
                              @"recurrent": @NO,
                              @"reminder_datetime": @"",
                              @"reminder_set": @NO,
                              @"show_as": @"",
                              @"solution_id": @"",
                              @"start_datetime": @"",
                              @"title": @"",
                              @"type": @"",
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"user_id": @"",
                              @"video_conference_id": @"",
                              @"video_conference_url": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/activities"]
                                                       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}}/crm/activities" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/activities",
  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([
    'account_id' => '',
    'activity_date' => '',
    'activity_datetime' => '',
    'all_day_event' => null,
    'archived' => null,
    'asset_id' => '',
    'attendees' => [
        [
                'contact_id' => '',
                'created_at' => '',
                'email_address' => '',
                'first_name' => '',
                'id' => '',
                'is_organizer' => null,
                'last_name' => '',
                'middle_name' => '',
                'name' => '',
                'prefix' => '',
                'status' => '',
                'suffix' => '',
                'updated_at' => '',
                'user_id' => ''
        ]
    ],
    'campaign_id' => '',
    'case_id' => '',
    'child' => null,
    'company_id' => '',
    'contact_id' => '',
    'contract_id' => '',
    'created_at' => '',
    'created_by' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'custom_object_id' => '',
    'deleted' => null,
    'description' => '',
    'done' => null,
    'downstream_id' => '',
    'duration_minutes' => 0,
    'duration_seconds' => 0,
    'end_date' => '',
    'end_datetime' => '',
    'event_sub_type' => '',
    'group_event' => null,
    'group_event_type' => '',
    'id' => '',
    'lead_id' => '',
    'location' => '',
    'location_address' => [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ],
    'note' => '',
    'opportunity_id' => '',
    'owner_id' => '',
    'private' => null,
    'product_id' => '',
    'recurrent' => null,
    'reminder_datetime' => '',
    'reminder_set' => null,
    'show_as' => '',
    'solution_id' => '',
    'start_datetime' => '',
    'title' => '',
    'type' => '',
    'updated_at' => '',
    'updated_by' => '',
    'user_id' => '',
    'video_conference_id' => '',
    'video_conference_url' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/activities', [
  'body' => '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/activities');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'account_id' => '',
  'activity_date' => '',
  'activity_datetime' => '',
  'all_day_event' => null,
  'archived' => null,
  'asset_id' => '',
  'attendees' => [
    [
        'contact_id' => '',
        'created_at' => '',
        'email_address' => '',
        'first_name' => '',
        'id' => '',
        'is_organizer' => null,
        'last_name' => '',
        'middle_name' => '',
        'name' => '',
        'prefix' => '',
        'status' => '',
        'suffix' => '',
        'updated_at' => '',
        'user_id' => ''
    ]
  ],
  'campaign_id' => '',
  'case_id' => '',
  'child' => null,
  'company_id' => '',
  'contact_id' => '',
  'contract_id' => '',
  'created_at' => '',
  'created_by' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'custom_object_id' => '',
  'deleted' => null,
  'description' => '',
  'done' => null,
  'downstream_id' => '',
  'duration_minutes' => 0,
  'duration_seconds' => 0,
  'end_date' => '',
  'end_datetime' => '',
  'event_sub_type' => '',
  'group_event' => null,
  'group_event_type' => '',
  'id' => '',
  'lead_id' => '',
  'location' => '',
  'location_address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'note' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'private' => null,
  'product_id' => '',
  'recurrent' => null,
  'reminder_datetime' => '',
  'reminder_set' => null,
  'show_as' => '',
  'solution_id' => '',
  'start_datetime' => '',
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'user_id' => '',
  'video_conference_id' => '',
  'video_conference_url' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'account_id' => '',
  'activity_date' => '',
  'activity_datetime' => '',
  'all_day_event' => null,
  'archived' => null,
  'asset_id' => '',
  'attendees' => [
    [
        'contact_id' => '',
        'created_at' => '',
        'email_address' => '',
        'first_name' => '',
        'id' => '',
        'is_organizer' => null,
        'last_name' => '',
        'middle_name' => '',
        'name' => '',
        'prefix' => '',
        'status' => '',
        'suffix' => '',
        'updated_at' => '',
        'user_id' => ''
    ]
  ],
  'campaign_id' => '',
  'case_id' => '',
  'child' => null,
  'company_id' => '',
  'contact_id' => '',
  'contract_id' => '',
  'created_at' => '',
  'created_by' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'custom_object_id' => '',
  'deleted' => null,
  'description' => '',
  'done' => null,
  'downstream_id' => '',
  'duration_minutes' => 0,
  'duration_seconds' => 0,
  'end_date' => '',
  'end_datetime' => '',
  'event_sub_type' => '',
  'group_event' => null,
  'group_event_type' => '',
  'id' => '',
  'lead_id' => '',
  'location' => '',
  'location_address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'note' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'private' => null,
  'product_id' => '',
  'recurrent' => null,
  'reminder_datetime' => '',
  'reminder_set' => null,
  'show_as' => '',
  'solution_id' => '',
  'start_datetime' => '',
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'user_id' => '',
  'video_conference_id' => '',
  'video_conference_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/activities');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/activities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/activities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}'
import http.client

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

payload = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/activities", payload, headers)

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

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

url = "{{baseUrl}}/crm/activities"

payload = {
    "account_id": "",
    "activity_date": "",
    "activity_datetime": "",
    "all_day_event": False,
    "archived": False,
    "asset_id": "",
    "attendees": [
        {
            "contact_id": "",
            "created_at": "",
            "email_address": "",
            "first_name": "",
            "id": "",
            "is_organizer": False,
            "last_name": "",
            "middle_name": "",
            "name": "",
            "prefix": "",
            "status": "",
            "suffix": "",
            "updated_at": "",
            "user_id": ""
        }
    ],
    "campaign_id": "",
    "case_id": "",
    "child": False,
    "company_id": "",
    "contact_id": "",
    "contract_id": "",
    "created_at": "",
    "created_by": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "custom_object_id": "",
    "deleted": False,
    "description": "",
    "done": False,
    "downstream_id": "",
    "duration_minutes": 0,
    "duration_seconds": 0,
    "end_date": "",
    "end_datetime": "",
    "event_sub_type": "",
    "group_event": False,
    "group_event_type": "",
    "id": "",
    "lead_id": "",
    "location": "",
    "location_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
    },
    "note": "",
    "opportunity_id": "",
    "owner_id": "",
    "private": False,
    "product_id": "",
    "recurrent": False,
    "reminder_datetime": "",
    "reminder_set": False,
    "show_as": "",
    "solution_id": "",
    "start_datetime": "",
    "title": "",
    "type": "",
    "updated_at": "",
    "updated_by": "",
    "user_id": "",
    "video_conference_id": "",
    "video_conference_url": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/activities"

payload <- "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/activities")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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/crm/activities') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/activities";

    let payload = json!({
        "account_id": "",
        "activity_date": "",
        "activity_datetime": "",
        "all_day_event": false,
        "archived": false,
        "asset_id": "",
        "attendees": (
            json!({
                "contact_id": "",
                "created_at": "",
                "email_address": "",
                "first_name": "",
                "id": "",
                "is_organizer": false,
                "last_name": "",
                "middle_name": "",
                "name": "",
                "prefix": "",
                "status": "",
                "suffix": "",
                "updated_at": "",
                "user_id": ""
            })
        ),
        "campaign_id": "",
        "case_id": "",
        "child": false,
        "company_id": "",
        "contact_id": "",
        "contract_id": "",
        "created_at": "",
        "created_by": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "custom_object_id": "",
        "deleted": false,
        "description": "",
        "done": false,
        "downstream_id": "",
        "duration_minutes": 0,
        "duration_seconds": 0,
        "end_date": "",
        "end_datetime": "",
        "event_sub_type": "",
        "group_event": false,
        "group_event_type": "",
        "id": "",
        "lead_id": "",
        "location": "",
        "location_address": json!({
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }),
        "note": "",
        "opportunity_id": "",
        "owner_id": "",
        "private": false,
        "product_id": "",
        "recurrent": false,
        "reminder_datetime": "",
        "reminder_set": false,
        "show_as": "",
        "solution_id": "",
        "start_datetime": "",
        "title": "",
        "type": "",
        "updated_at": "",
        "updated_by": "",
        "user_id": "",
        "video_conference_id": "",
        "video_conference_url": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/activities \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}'
echo '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}' |  \
  http POST {{baseUrl}}/crm/activities \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "account_id": "",\n  "activity_date": "",\n  "activity_datetime": "",\n  "all_day_event": false,\n  "archived": false,\n  "asset_id": "",\n  "attendees": [\n    {\n      "contact_id": "",\n      "created_at": "",\n      "email_address": "",\n      "first_name": "",\n      "id": "",\n      "is_organizer": false,\n      "last_name": "",\n      "middle_name": "",\n      "name": "",\n      "prefix": "",\n      "status": "",\n      "suffix": "",\n      "updated_at": "",\n      "user_id": ""\n    }\n  ],\n  "campaign_id": "",\n  "case_id": "",\n  "child": false,\n  "company_id": "",\n  "contact_id": "",\n  "contract_id": "",\n  "created_at": "",\n  "created_by": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "custom_object_id": "",\n  "deleted": false,\n  "description": "",\n  "done": false,\n  "downstream_id": "",\n  "duration_minutes": 0,\n  "duration_seconds": 0,\n  "end_date": "",\n  "end_datetime": "",\n  "event_sub_type": "",\n  "group_event": false,\n  "group_event_type": "",\n  "id": "",\n  "lead_id": "",\n  "location": "",\n  "location_address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "note": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "private": false,\n  "product_id": "",\n  "recurrent": false,\n  "reminder_datetime": "",\n  "reminder_set": false,\n  "show_as": "",\n  "solution_id": "",\n  "start_datetime": "",\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "user_id": "",\n  "video_conference_id": "",\n  "video_conference_url": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/activities
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    [
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    ]
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": [
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  ],
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/activities")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "activities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete activity
{{baseUrl}}/crm/activities/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/activities/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/activities/:id" {:headers {:x-apideck-consumer-id ""
                                                                           :x-apideck-app-id ""
                                                                           :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/activities/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/activities/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/activities/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/activities/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/activities/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/activities/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/activities/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/activities/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/activities/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/activities/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/activities/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/activities/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/activities/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/activities/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/activities/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/activities/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/activities/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/activities/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/activities/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/activities/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/activities/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/activities/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/activities/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/activities/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/activities/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/activities/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/activities/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/activities/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/activities/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/activities/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/activities/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/activities/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "activities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get activity
{{baseUrl}}/crm/activities/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/activities/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/activities/:id" {:headers {:x-apideck-consumer-id ""
                                                                        :x-apideck-app-id ""
                                                                        :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/activities/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/activities/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/activities/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/activities/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/activities/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/activities/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/activities/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/activities/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/activities/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/activities/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/activities/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/activities/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/activities/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/activities/:id"]
                                                       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}}/crm/activities/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/activities/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/activities/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/activities/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/activities/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/activities/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/activities/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/activities/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/activities/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/activities/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/activities/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/activities/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/activities/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/activities/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/activities/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/activities/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/activities/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "account_id": "12345",
    "activity_date": "2021-05-01",
    "activity_datetime": "2021-05-01T12:00:00.000Z",
    "all_day_event": false,
    "archived": false,
    "asset_id": "12345",
    "campaign_id": "12345",
    "case_id": "12345",
    "child": false,
    "company_id": "12345",
    "contact_id": "12345",
    "contract_id": "12345",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "custom_object_id": "12345",
    "deleted": false,
    "description": "More info about the meeting",
    "done": false,
    "downstream_id": "12345",
    "duration_minutes": 30,
    "duration_seconds": 1800,
    "end_date": "2021-05-01",
    "end_datetime": "2021-05-01T12:30:00.000Z",
    "event_sub_type": "debrief",
    "group_event": true,
    "group_event_type": "Proposed",
    "id": "12345",
    "lead_id": "12345",
    "location": "Space",
    "note": "An internal note about the meeting",
    "opportunity_id": "12345",
    "owner_id": "12345",
    "private": true,
    "product_id": "12345",
    "recurrent": false,
    "reminder_datetime": "2021-05-01T17:00:00.000Z",
    "reminder_set": false,
    "show_as": "busy",
    "solution_id": "12345",
    "start_datetime": "2021-05-01T12:00:00.000Z",
    "title": "Meeting",
    "type": "meeting",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345",
    "user_id": "12345",
    "video_conference_id": "zoom:88120759396",
    "video_conference_url": "https://us02web.zoom.us/j/88120759396"
  },
  "operation": "one",
  "resource": "activities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List activities
{{baseUrl}}/crm/activities
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/activities");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/activities" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/activities"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/activities"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/activities");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/activities"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/activities HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/activities")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/activities"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/activities")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/activities")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/activities');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/activities';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/activities")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/activities');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/activities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/activities';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/activities"]
                                                       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}}/crm/activities" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/activities",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/activities', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/activities');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/activities');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/activities' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/activities' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/activities", headers=headers)

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

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

url = "{{baseUrl}}/crm/activities"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/activities"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/activities")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/activities') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/activities";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/activities \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/activities \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/activities
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/activities")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "activities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update activity
{{baseUrl}}/crm/activities/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/activities/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}");

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

(client/patch "{{baseUrl}}/crm/activities/:id" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}
                                                                :content-type :json
                                                                :form-params {:account_id ""
                                                                              :activity_date ""
                                                                              :activity_datetime ""
                                                                              :all_day_event false
                                                                              :archived false
                                                                              :asset_id ""
                                                                              :attendees [{:contact_id ""
                                                                                           :created_at ""
                                                                                           :email_address ""
                                                                                           :first_name ""
                                                                                           :id ""
                                                                                           :is_organizer false
                                                                                           :last_name ""
                                                                                           :middle_name ""
                                                                                           :name ""
                                                                                           :prefix ""
                                                                                           :status ""
                                                                                           :suffix ""
                                                                                           :updated_at ""
                                                                                           :user_id ""}]
                                                                              :campaign_id ""
                                                                              :case_id ""
                                                                              :child false
                                                                              :company_id ""
                                                                              :contact_id ""
                                                                              :contract_id ""
                                                                              :created_at ""
                                                                              :created_by ""
                                                                              :custom_fields [{:description ""
                                                                                               :id ""
                                                                                               :name ""
                                                                                               :value ""}]
                                                                              :custom_object_id ""
                                                                              :deleted false
                                                                              :description ""
                                                                              :done false
                                                                              :downstream_id ""
                                                                              :duration_minutes 0
                                                                              :duration_seconds 0
                                                                              :end_date ""
                                                                              :end_datetime ""
                                                                              :event_sub_type ""
                                                                              :group_event false
                                                                              :group_event_type ""
                                                                              :id ""
                                                                              :lead_id ""
                                                                              :location ""
                                                                              :location_address {:city ""
                                                                                                 :contact_name ""
                                                                                                 :country ""
                                                                                                 :county ""
                                                                                                 :email ""
                                                                                                 :fax ""
                                                                                                 :id ""
                                                                                                 :latitude ""
                                                                                                 :line1 ""
                                                                                                 :line2 ""
                                                                                                 :line3 ""
                                                                                                 :line4 ""
                                                                                                 :longitude ""
                                                                                                 :name ""
                                                                                                 :phone_number ""
                                                                                                 :postal_code ""
                                                                                                 :row_version ""
                                                                                                 :salutation ""
                                                                                                 :state ""
                                                                                                 :street_number ""
                                                                                                 :string ""
                                                                                                 :type ""
                                                                                                 :website ""}
                                                                              :note ""
                                                                              :opportunity_id ""
                                                                              :owner_id ""
                                                                              :private false
                                                                              :product_id ""
                                                                              :recurrent false
                                                                              :reminder_datetime ""
                                                                              :reminder_set false
                                                                              :show_as ""
                                                                              :solution_id ""
                                                                              :start_datetime ""
                                                                              :title ""
                                                                              :type ""
                                                                              :updated_at ""
                                                                              :updated_by ""
                                                                              :user_id ""
                                                                              :video_conference_id ""
                                                                              :video_conference_url ""}})
require "http/client"

url = "{{baseUrl}}/crm/activities/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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}}/crm/activities/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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}}/crm/activities/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/activities/:id"

	payload := strings.NewReader("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/activities/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1915

{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/activities/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/activities/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/activities/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/activities/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  account_id: '',
  activity_date: '',
  activity_datetime: '',
  all_day_event: false,
  archived: false,
  asset_id: '',
  attendees: [
    {
      contact_id: '',
      created_at: '',
      email_address: '',
      first_name: '',
      id: '',
      is_organizer: false,
      last_name: '',
      middle_name: '',
      name: '',
      prefix: '',
      status: '',
      suffix: '',
      updated_at: '',
      user_id: ''
    }
  ],
  campaign_id: '',
  case_id: '',
  child: false,
  company_id: '',
  contact_id: '',
  contract_id: '',
  created_at: '',
  created_by: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  custom_object_id: '',
  deleted: false,
  description: '',
  done: false,
  downstream_id: '',
  duration_minutes: 0,
  duration_seconds: 0,
  end_date: '',
  end_datetime: '',
  event_sub_type: '',
  group_event: false,
  group_event_type: '',
  id: '',
  lead_id: '',
  location: '',
  location_address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  note: '',
  opportunity_id: '',
  owner_id: '',
  private: false,
  product_id: '',
  recurrent: false,
  reminder_datetime: '',
  reminder_set: false,
  show_as: '',
  solution_id: '',
  start_datetime: '',
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  user_id: '',
  video_conference_id: '',
  video_conference_url: ''
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/activities/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    account_id: '',
    activity_date: '',
    activity_datetime: '',
    all_day_event: false,
    archived: false,
    asset_id: '',
    attendees: [
      {
        contact_id: '',
        created_at: '',
        email_address: '',
        first_name: '',
        id: '',
        is_organizer: false,
        last_name: '',
        middle_name: '',
        name: '',
        prefix: '',
        status: '',
        suffix: '',
        updated_at: '',
        user_id: ''
      }
    ],
    campaign_id: '',
    case_id: '',
    child: false,
    company_id: '',
    contact_id: '',
    contract_id: '',
    created_at: '',
    created_by: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    custom_object_id: '',
    deleted: false,
    description: '',
    done: false,
    downstream_id: '',
    duration_minutes: 0,
    duration_seconds: 0,
    end_date: '',
    end_datetime: '',
    event_sub_type: '',
    group_event: false,
    group_event_type: '',
    id: '',
    lead_id: '',
    location: '',
    location_address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    note: '',
    opportunity_id: '',
    owner_id: '',
    private: false,
    product_id: '',
    recurrent: false,
    reminder_datetime: '',
    reminder_set: false,
    show_as: '',
    solution_id: '',
    start_datetime: '',
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    user_id: '',
    video_conference_id: '',
    video_conference_url: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/activities/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"account_id":"","activity_date":"","activity_datetime":"","all_day_event":false,"archived":false,"asset_id":"","attendees":[{"contact_id":"","created_at":"","email_address":"","first_name":"","id":"","is_organizer":false,"last_name":"","middle_name":"","name":"","prefix":"","status":"","suffix":"","updated_at":"","user_id":""}],"campaign_id":"","case_id":"","child":false,"company_id":"","contact_id":"","contract_id":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"custom_object_id":"","deleted":false,"description":"","done":false,"downstream_id":"","duration_minutes":0,"duration_seconds":0,"end_date":"","end_datetime":"","event_sub_type":"","group_event":false,"group_event_type":"","id":"","lead_id":"","location":"","location_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"note":"","opportunity_id":"","owner_id":"","private":false,"product_id":"","recurrent":false,"reminder_datetime":"","reminder_set":false,"show_as":"","solution_id":"","start_datetime":"","title":"","type":"","updated_at":"","updated_by":"","user_id":"","video_conference_id":"","video_conference_url":""}'
};

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}}/crm/activities/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "account_id": "",\n  "activity_date": "",\n  "activity_datetime": "",\n  "all_day_event": false,\n  "archived": false,\n  "asset_id": "",\n  "attendees": [\n    {\n      "contact_id": "",\n      "created_at": "",\n      "email_address": "",\n      "first_name": "",\n      "id": "",\n      "is_organizer": false,\n      "last_name": "",\n      "middle_name": "",\n      "name": "",\n      "prefix": "",\n      "status": "",\n      "suffix": "",\n      "updated_at": "",\n      "user_id": ""\n    }\n  ],\n  "campaign_id": "",\n  "case_id": "",\n  "child": false,\n  "company_id": "",\n  "contact_id": "",\n  "contract_id": "",\n  "created_at": "",\n  "created_by": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "custom_object_id": "",\n  "deleted": false,\n  "description": "",\n  "done": false,\n  "downstream_id": "",\n  "duration_minutes": 0,\n  "duration_seconds": 0,\n  "end_date": "",\n  "end_datetime": "",\n  "event_sub_type": "",\n  "group_event": false,\n  "group_event_type": "",\n  "id": "",\n  "lead_id": "",\n  "location": "",\n  "location_address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "note": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "private": false,\n  "product_id": "",\n  "recurrent": false,\n  "reminder_datetime": "",\n  "reminder_set": false,\n  "show_as": "",\n  "solution_id": "",\n  "start_datetime": "",\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "user_id": "",\n  "video_conference_id": "",\n  "video_conference_url": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/activities/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  account_id: '',
  activity_date: '',
  activity_datetime: '',
  all_day_event: false,
  archived: false,
  asset_id: '',
  attendees: [
    {
      contact_id: '',
      created_at: '',
      email_address: '',
      first_name: '',
      id: '',
      is_organizer: false,
      last_name: '',
      middle_name: '',
      name: '',
      prefix: '',
      status: '',
      suffix: '',
      updated_at: '',
      user_id: ''
    }
  ],
  campaign_id: '',
  case_id: '',
  child: false,
  company_id: '',
  contact_id: '',
  contract_id: '',
  created_at: '',
  created_by: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  custom_object_id: '',
  deleted: false,
  description: '',
  done: false,
  downstream_id: '',
  duration_minutes: 0,
  duration_seconds: 0,
  end_date: '',
  end_datetime: '',
  event_sub_type: '',
  group_event: false,
  group_event_type: '',
  id: '',
  lead_id: '',
  location: '',
  location_address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  note: '',
  opportunity_id: '',
  owner_id: '',
  private: false,
  product_id: '',
  recurrent: false,
  reminder_datetime: '',
  reminder_set: false,
  show_as: '',
  solution_id: '',
  start_datetime: '',
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  user_id: '',
  video_conference_id: '',
  video_conference_url: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    account_id: '',
    activity_date: '',
    activity_datetime: '',
    all_day_event: false,
    archived: false,
    asset_id: '',
    attendees: [
      {
        contact_id: '',
        created_at: '',
        email_address: '',
        first_name: '',
        id: '',
        is_organizer: false,
        last_name: '',
        middle_name: '',
        name: '',
        prefix: '',
        status: '',
        suffix: '',
        updated_at: '',
        user_id: ''
      }
    ],
    campaign_id: '',
    case_id: '',
    child: false,
    company_id: '',
    contact_id: '',
    contract_id: '',
    created_at: '',
    created_by: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    custom_object_id: '',
    deleted: false,
    description: '',
    done: false,
    downstream_id: '',
    duration_minutes: 0,
    duration_seconds: 0,
    end_date: '',
    end_datetime: '',
    event_sub_type: '',
    group_event: false,
    group_event_type: '',
    id: '',
    lead_id: '',
    location: '',
    location_address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    note: '',
    opportunity_id: '',
    owner_id: '',
    private: false,
    product_id: '',
    recurrent: false,
    reminder_datetime: '',
    reminder_set: false,
    show_as: '',
    solution_id: '',
    start_datetime: '',
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    user_id: '',
    video_conference_id: '',
    video_conference_url: ''
  },
  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}}/crm/activities/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  account_id: '',
  activity_date: '',
  activity_datetime: '',
  all_day_event: false,
  archived: false,
  asset_id: '',
  attendees: [
    {
      contact_id: '',
      created_at: '',
      email_address: '',
      first_name: '',
      id: '',
      is_organizer: false,
      last_name: '',
      middle_name: '',
      name: '',
      prefix: '',
      status: '',
      suffix: '',
      updated_at: '',
      user_id: ''
    }
  ],
  campaign_id: '',
  case_id: '',
  child: false,
  company_id: '',
  contact_id: '',
  contract_id: '',
  created_at: '',
  created_by: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  custom_object_id: '',
  deleted: false,
  description: '',
  done: false,
  downstream_id: '',
  duration_minutes: 0,
  duration_seconds: 0,
  end_date: '',
  end_datetime: '',
  event_sub_type: '',
  group_event: false,
  group_event_type: '',
  id: '',
  lead_id: '',
  location: '',
  location_address: {
    city: '',
    contact_name: '',
    country: '',
    county: '',
    email: '',
    fax: '',
    id: '',
    latitude: '',
    line1: '',
    line2: '',
    line3: '',
    line4: '',
    longitude: '',
    name: '',
    phone_number: '',
    postal_code: '',
    row_version: '',
    salutation: '',
    state: '',
    street_number: '',
    string: '',
    type: '',
    website: ''
  },
  note: '',
  opportunity_id: '',
  owner_id: '',
  private: false,
  product_id: '',
  recurrent: false,
  reminder_datetime: '',
  reminder_set: false,
  show_as: '',
  solution_id: '',
  start_datetime: '',
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  user_id: '',
  video_conference_id: '',
  video_conference_url: ''
});

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}}/crm/activities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    account_id: '',
    activity_date: '',
    activity_datetime: '',
    all_day_event: false,
    archived: false,
    asset_id: '',
    attendees: [
      {
        contact_id: '',
        created_at: '',
        email_address: '',
        first_name: '',
        id: '',
        is_organizer: false,
        last_name: '',
        middle_name: '',
        name: '',
        prefix: '',
        status: '',
        suffix: '',
        updated_at: '',
        user_id: ''
      }
    ],
    campaign_id: '',
    case_id: '',
    child: false,
    company_id: '',
    contact_id: '',
    contract_id: '',
    created_at: '',
    created_by: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    custom_object_id: '',
    deleted: false,
    description: '',
    done: false,
    downstream_id: '',
    duration_minutes: 0,
    duration_seconds: 0,
    end_date: '',
    end_datetime: '',
    event_sub_type: '',
    group_event: false,
    group_event_type: '',
    id: '',
    lead_id: '',
    location: '',
    location_address: {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    },
    note: '',
    opportunity_id: '',
    owner_id: '',
    private: false,
    product_id: '',
    recurrent: false,
    reminder_datetime: '',
    reminder_set: false,
    show_as: '',
    solution_id: '',
    start_datetime: '',
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    user_id: '',
    video_conference_id: '',
    video_conference_url: ''
  }
};

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

const url = '{{baseUrl}}/crm/activities/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"account_id":"","activity_date":"","activity_datetime":"","all_day_event":false,"archived":false,"asset_id":"","attendees":[{"contact_id":"","created_at":"","email_address":"","first_name":"","id":"","is_organizer":false,"last_name":"","middle_name":"","name":"","prefix":"","status":"","suffix":"","updated_at":"","user_id":""}],"campaign_id":"","case_id":"","child":false,"company_id":"","contact_id":"","contract_id":"","created_at":"","created_by":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"custom_object_id":"","deleted":false,"description":"","done":false,"downstream_id":"","duration_minutes":0,"duration_seconds":0,"end_date":"","end_datetime":"","event_sub_type":"","group_event":false,"group_event_type":"","id":"","lead_id":"","location":"","location_address":{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""},"note":"","opportunity_id":"","owner_id":"","private":false,"product_id":"","recurrent":false,"reminder_datetime":"","reminder_set":false,"show_as":"","solution_id":"","start_datetime":"","title":"","type":"","updated_at":"","updated_by":"","user_id":"","video_conference_id":"","video_conference_url":""}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"account_id": @"",
                              @"activity_date": @"",
                              @"activity_datetime": @"",
                              @"all_day_event": @NO,
                              @"archived": @NO,
                              @"asset_id": @"",
                              @"attendees": @[ @{ @"contact_id": @"", @"created_at": @"", @"email_address": @"", @"first_name": @"", @"id": @"", @"is_organizer": @NO, @"last_name": @"", @"middle_name": @"", @"name": @"", @"prefix": @"", @"status": @"", @"suffix": @"", @"updated_at": @"", @"user_id": @"" } ],
                              @"campaign_id": @"",
                              @"case_id": @"",
                              @"child": @NO,
                              @"company_id": @"",
                              @"contact_id": @"",
                              @"contract_id": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"custom_object_id": @"",
                              @"deleted": @NO,
                              @"description": @"",
                              @"done": @NO,
                              @"downstream_id": @"",
                              @"duration_minutes": @0,
                              @"duration_seconds": @0,
                              @"end_date": @"",
                              @"end_datetime": @"",
                              @"event_sub_type": @"",
                              @"group_event": @NO,
                              @"group_event_type": @"",
                              @"id": @"",
                              @"lead_id": @"",
                              @"location": @"",
                              @"location_address": @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" },
                              @"note": @"",
                              @"opportunity_id": @"",
                              @"owner_id": @"",
                              @"private": @NO,
                              @"product_id": @"",
                              @"recurrent": @NO,
                              @"reminder_datetime": @"",
                              @"reminder_set": @NO,
                              @"show_as": @"",
                              @"solution_id": @"",
                              @"start_datetime": @"",
                              @"title": @"",
                              @"type": @"",
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"user_id": @"",
                              @"video_conference_id": @"",
                              @"video_conference_url": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/activities/:id"]
                                                       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}}/crm/activities/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/activities/:id",
  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([
    'account_id' => '',
    'activity_date' => '',
    'activity_datetime' => '',
    'all_day_event' => null,
    'archived' => null,
    'asset_id' => '',
    'attendees' => [
        [
                'contact_id' => '',
                'created_at' => '',
                'email_address' => '',
                'first_name' => '',
                'id' => '',
                'is_organizer' => null,
                'last_name' => '',
                'middle_name' => '',
                'name' => '',
                'prefix' => '',
                'status' => '',
                'suffix' => '',
                'updated_at' => '',
                'user_id' => ''
        ]
    ],
    'campaign_id' => '',
    'case_id' => '',
    'child' => null,
    'company_id' => '',
    'contact_id' => '',
    'contract_id' => '',
    'created_at' => '',
    'created_by' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'custom_object_id' => '',
    'deleted' => null,
    'description' => '',
    'done' => null,
    'downstream_id' => '',
    'duration_minutes' => 0,
    'duration_seconds' => 0,
    'end_date' => '',
    'end_datetime' => '',
    'event_sub_type' => '',
    'group_event' => null,
    'group_event_type' => '',
    'id' => '',
    'lead_id' => '',
    'location' => '',
    'location_address' => [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ],
    'note' => '',
    'opportunity_id' => '',
    'owner_id' => '',
    'private' => null,
    'product_id' => '',
    'recurrent' => null,
    'reminder_datetime' => '',
    'reminder_set' => null,
    'show_as' => '',
    'solution_id' => '',
    'start_datetime' => '',
    'title' => '',
    'type' => '',
    'updated_at' => '',
    'updated_by' => '',
    'user_id' => '',
    'video_conference_id' => '',
    'video_conference_url' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/activities/:id', [
  'body' => '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/activities/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'account_id' => '',
  'activity_date' => '',
  'activity_datetime' => '',
  'all_day_event' => null,
  'archived' => null,
  'asset_id' => '',
  'attendees' => [
    [
        'contact_id' => '',
        'created_at' => '',
        'email_address' => '',
        'first_name' => '',
        'id' => '',
        'is_organizer' => null,
        'last_name' => '',
        'middle_name' => '',
        'name' => '',
        'prefix' => '',
        'status' => '',
        'suffix' => '',
        'updated_at' => '',
        'user_id' => ''
    ]
  ],
  'campaign_id' => '',
  'case_id' => '',
  'child' => null,
  'company_id' => '',
  'contact_id' => '',
  'contract_id' => '',
  'created_at' => '',
  'created_by' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'custom_object_id' => '',
  'deleted' => null,
  'description' => '',
  'done' => null,
  'downstream_id' => '',
  'duration_minutes' => 0,
  'duration_seconds' => 0,
  'end_date' => '',
  'end_datetime' => '',
  'event_sub_type' => '',
  'group_event' => null,
  'group_event_type' => '',
  'id' => '',
  'lead_id' => '',
  'location' => '',
  'location_address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'note' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'private' => null,
  'product_id' => '',
  'recurrent' => null,
  'reminder_datetime' => '',
  'reminder_set' => null,
  'show_as' => '',
  'solution_id' => '',
  'start_datetime' => '',
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'user_id' => '',
  'video_conference_id' => '',
  'video_conference_url' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'account_id' => '',
  'activity_date' => '',
  'activity_datetime' => '',
  'all_day_event' => null,
  'archived' => null,
  'asset_id' => '',
  'attendees' => [
    [
        'contact_id' => '',
        'created_at' => '',
        'email_address' => '',
        'first_name' => '',
        'id' => '',
        'is_organizer' => null,
        'last_name' => '',
        'middle_name' => '',
        'name' => '',
        'prefix' => '',
        'status' => '',
        'suffix' => '',
        'updated_at' => '',
        'user_id' => ''
    ]
  ],
  'campaign_id' => '',
  'case_id' => '',
  'child' => null,
  'company_id' => '',
  'contact_id' => '',
  'contract_id' => '',
  'created_at' => '',
  'created_by' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'custom_object_id' => '',
  'deleted' => null,
  'description' => '',
  'done' => null,
  'downstream_id' => '',
  'duration_minutes' => 0,
  'duration_seconds' => 0,
  'end_date' => '',
  'end_datetime' => '',
  'event_sub_type' => '',
  'group_event' => null,
  'group_event_type' => '',
  'id' => '',
  'lead_id' => '',
  'location' => '',
  'location_address' => [
    'city' => '',
    'contact_name' => '',
    'country' => '',
    'county' => '',
    'email' => '',
    'fax' => '',
    'id' => '',
    'latitude' => '',
    'line1' => '',
    'line2' => '',
    'line3' => '',
    'line4' => '',
    'longitude' => '',
    'name' => '',
    'phone_number' => '',
    'postal_code' => '',
    'row_version' => '',
    'salutation' => '',
    'state' => '',
    'street_number' => '',
    'string' => '',
    'type' => '',
    'website' => ''
  ],
  'note' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'private' => null,
  'product_id' => '',
  'recurrent' => null,
  'reminder_datetime' => '',
  'reminder_set' => null,
  'show_as' => '',
  'solution_id' => '',
  'start_datetime' => '',
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'user_id' => '',
  'video_conference_id' => '',
  'video_conference_url' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/activities/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/activities/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/activities/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}'
import http.client

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

payload = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/activities/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/activities/:id"

payload = {
    "account_id": "",
    "activity_date": "",
    "activity_datetime": "",
    "all_day_event": False,
    "archived": False,
    "asset_id": "",
    "attendees": [
        {
            "contact_id": "",
            "created_at": "",
            "email_address": "",
            "first_name": "",
            "id": "",
            "is_organizer": False,
            "last_name": "",
            "middle_name": "",
            "name": "",
            "prefix": "",
            "status": "",
            "suffix": "",
            "updated_at": "",
            "user_id": ""
        }
    ],
    "campaign_id": "",
    "case_id": "",
    "child": False,
    "company_id": "",
    "contact_id": "",
    "contract_id": "",
    "created_at": "",
    "created_by": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "custom_object_id": "",
    "deleted": False,
    "description": "",
    "done": False,
    "downstream_id": "",
    "duration_minutes": 0,
    "duration_seconds": 0,
    "end_date": "",
    "end_datetime": "",
    "event_sub_type": "",
    "group_event": False,
    "group_event_type": "",
    "id": "",
    "lead_id": "",
    "location": "",
    "location_address": {
        "city": "",
        "contact_name": "",
        "country": "",
        "county": "",
        "email": "",
        "fax": "",
        "id": "",
        "latitude": "",
        "line1": "",
        "line2": "",
        "line3": "",
        "line4": "",
        "longitude": "",
        "name": "",
        "phone_number": "",
        "postal_code": "",
        "row_version": "",
        "salutation": "",
        "state": "",
        "street_number": "",
        "string": "",
        "type": "",
        "website": ""
    },
    "note": "",
    "opportunity_id": "",
    "owner_id": "",
    "private": False,
    "product_id": "",
    "recurrent": False,
    "reminder_datetime": "",
    "reminder_set": False,
    "show_as": "",
    "solution_id": "",
    "start_datetime": "",
    "title": "",
    "type": "",
    "updated_at": "",
    "updated_by": "",
    "user_id": "",
    "video_conference_id": "",
    "video_conference_url": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/activities/:id"

payload <- "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/activities/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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/crm/activities/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"account_id\": \"\",\n  \"activity_date\": \"\",\n  \"activity_datetime\": \"\",\n  \"all_day_event\": false,\n  \"archived\": false,\n  \"asset_id\": \"\",\n  \"attendees\": [\n    {\n      \"contact_id\": \"\",\n      \"created_at\": \"\",\n      \"email_address\": \"\",\n      \"first_name\": \"\",\n      \"id\": \"\",\n      \"is_organizer\": false,\n      \"last_name\": \"\",\n      \"middle_name\": \"\",\n      \"name\": \"\",\n      \"prefix\": \"\",\n      \"status\": \"\",\n      \"suffix\": \"\",\n      \"updated_at\": \"\",\n      \"user_id\": \"\"\n    }\n  ],\n  \"campaign_id\": \"\",\n  \"case_id\": \"\",\n  \"child\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"contract_id\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"custom_object_id\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"done\": false,\n  \"downstream_id\": \"\",\n  \"duration_minutes\": 0,\n  \"duration_seconds\": 0,\n  \"end_date\": \"\",\n  \"end_datetime\": \"\",\n  \"event_sub_type\": \"\",\n  \"group_event\": false,\n  \"group_event_type\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"location\": \"\",\n  \"location_address\": {\n    \"city\": \"\",\n    \"contact_name\": \"\",\n    \"country\": \"\",\n    \"county\": \"\",\n    \"email\": \"\",\n    \"fax\": \"\",\n    \"id\": \"\",\n    \"latitude\": \"\",\n    \"line1\": \"\",\n    \"line2\": \"\",\n    \"line3\": \"\",\n    \"line4\": \"\",\n    \"longitude\": \"\",\n    \"name\": \"\",\n    \"phone_number\": \"\",\n    \"postal_code\": \"\",\n    \"row_version\": \"\",\n    \"salutation\": \"\",\n    \"state\": \"\",\n    \"street_number\": \"\",\n    \"string\": \"\",\n    \"type\": \"\",\n    \"website\": \"\"\n  },\n  \"note\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"private\": false,\n  \"product_id\": \"\",\n  \"recurrent\": false,\n  \"reminder_datetime\": \"\",\n  \"reminder_set\": false,\n  \"show_as\": \"\",\n  \"solution_id\": \"\",\n  \"start_datetime\": \"\",\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"user_id\": \"\",\n  \"video_conference_id\": \"\",\n  \"video_conference_url\": \"\"\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}}/crm/activities/:id";

    let payload = json!({
        "account_id": "",
        "activity_date": "",
        "activity_datetime": "",
        "all_day_event": false,
        "archived": false,
        "asset_id": "",
        "attendees": (
            json!({
                "contact_id": "",
                "created_at": "",
                "email_address": "",
                "first_name": "",
                "id": "",
                "is_organizer": false,
                "last_name": "",
                "middle_name": "",
                "name": "",
                "prefix": "",
                "status": "",
                "suffix": "",
                "updated_at": "",
                "user_id": ""
            })
        ),
        "campaign_id": "",
        "case_id": "",
        "child": false,
        "company_id": "",
        "contact_id": "",
        "contract_id": "",
        "created_at": "",
        "created_by": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "custom_object_id": "",
        "deleted": false,
        "description": "",
        "done": false,
        "downstream_id": "",
        "duration_minutes": 0,
        "duration_seconds": 0,
        "end_date": "",
        "end_datetime": "",
        "event_sub_type": "",
        "group_event": false,
        "group_event_type": "",
        "id": "",
        "lead_id": "",
        "location": "",
        "location_address": json!({
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }),
        "note": "",
        "opportunity_id": "",
        "owner_id": "",
        "private": false,
        "product_id": "",
        "recurrent": false,
        "reminder_datetime": "",
        "reminder_set": false,
        "show_as": "",
        "solution_id": "",
        "start_datetime": "",
        "title": "",
        "type": "",
        "updated_at": "",
        "updated_by": "",
        "user_id": "",
        "video_conference_id": "",
        "video_conference_url": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/activities/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}'
echo '{
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    {
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    }
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": {
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  },
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
}' |  \
  http PATCH {{baseUrl}}/crm/activities/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "account_id": "",\n  "activity_date": "",\n  "activity_datetime": "",\n  "all_day_event": false,\n  "archived": false,\n  "asset_id": "",\n  "attendees": [\n    {\n      "contact_id": "",\n      "created_at": "",\n      "email_address": "",\n      "first_name": "",\n      "id": "",\n      "is_organizer": false,\n      "last_name": "",\n      "middle_name": "",\n      "name": "",\n      "prefix": "",\n      "status": "",\n      "suffix": "",\n      "updated_at": "",\n      "user_id": ""\n    }\n  ],\n  "campaign_id": "",\n  "case_id": "",\n  "child": false,\n  "company_id": "",\n  "contact_id": "",\n  "contract_id": "",\n  "created_at": "",\n  "created_by": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "custom_object_id": "",\n  "deleted": false,\n  "description": "",\n  "done": false,\n  "downstream_id": "",\n  "duration_minutes": 0,\n  "duration_seconds": 0,\n  "end_date": "",\n  "end_datetime": "",\n  "event_sub_type": "",\n  "group_event": false,\n  "group_event_type": "",\n  "id": "",\n  "lead_id": "",\n  "location": "",\n  "location_address": {\n    "city": "",\n    "contact_name": "",\n    "country": "",\n    "county": "",\n    "email": "",\n    "fax": "",\n    "id": "",\n    "latitude": "",\n    "line1": "",\n    "line2": "",\n    "line3": "",\n    "line4": "",\n    "longitude": "",\n    "name": "",\n    "phone_number": "",\n    "postal_code": "",\n    "row_version": "",\n    "salutation": "",\n    "state": "",\n    "street_number": "",\n    "string": "",\n    "type": "",\n    "website": ""\n  },\n  "note": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "private": false,\n  "product_id": "",\n  "recurrent": false,\n  "reminder_datetime": "",\n  "reminder_set": false,\n  "show_as": "",\n  "solution_id": "",\n  "start_datetime": "",\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "user_id": "",\n  "video_conference_id": "",\n  "video_conference_url": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/activities/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "account_id": "",
  "activity_date": "",
  "activity_datetime": "",
  "all_day_event": false,
  "archived": false,
  "asset_id": "",
  "attendees": [
    [
      "contact_id": "",
      "created_at": "",
      "email_address": "",
      "first_name": "",
      "id": "",
      "is_organizer": false,
      "last_name": "",
      "middle_name": "",
      "name": "",
      "prefix": "",
      "status": "",
      "suffix": "",
      "updated_at": "",
      "user_id": ""
    ]
  ],
  "campaign_id": "",
  "case_id": "",
  "child": false,
  "company_id": "",
  "contact_id": "",
  "contract_id": "",
  "created_at": "",
  "created_by": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "custom_object_id": "",
  "deleted": false,
  "description": "",
  "done": false,
  "downstream_id": "",
  "duration_minutes": 0,
  "duration_seconds": 0,
  "end_date": "",
  "end_datetime": "",
  "event_sub_type": "",
  "group_event": false,
  "group_event_type": "",
  "id": "",
  "lead_id": "",
  "location": "",
  "location_address": [
    "city": "",
    "contact_name": "",
    "country": "",
    "county": "",
    "email": "",
    "fax": "",
    "id": "",
    "latitude": "",
    "line1": "",
    "line2": "",
    "line3": "",
    "line4": "",
    "longitude": "",
    "name": "",
    "phone_number": "",
    "postal_code": "",
    "row_version": "",
    "salutation": "",
    "state": "",
    "street_number": "",
    "string": "",
    "type": "",
    "website": ""
  ],
  "note": "",
  "opportunity_id": "",
  "owner_id": "",
  "private": false,
  "product_id": "",
  "recurrent": false,
  "reminder_datetime": "",
  "reminder_set": false,
  "show_as": "",
  "solution_id": "",
  "start_datetime": "",
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "user_id": "",
  "video_conference_id": "",
  "video_conference_url": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/activities/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "activities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create company
{{baseUrl}}/crm/companies
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/companies");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");

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

(client/post "{{baseUrl}}/crm/companies" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}
                                                          :content-type :json
                                                          :form-params {:abn_branch ""
                                                                        :abn_or_tfn ""
                                                                        :acn ""
                                                                        :addresses [{:city ""
                                                                                     :contact_name ""
                                                                                     :country ""
                                                                                     :county ""
                                                                                     :email ""
                                                                                     :fax ""
                                                                                     :id ""
                                                                                     :latitude ""
                                                                                     :line1 ""
                                                                                     :line2 ""
                                                                                     :line3 ""
                                                                                     :line4 ""
                                                                                     :longitude ""
                                                                                     :name ""
                                                                                     :phone_number ""
                                                                                     :postal_code ""
                                                                                     :row_version ""
                                                                                     :salutation ""
                                                                                     :state ""
                                                                                     :street_number ""
                                                                                     :string ""
                                                                                     :type ""
                                                                                     :website ""}]
                                                                        :annual_revenue ""
                                                                        :bank_accounts [{:account_name ""
                                                                                         :account_number ""
                                                                                         :account_type ""
                                                                                         :bank_code ""
                                                                                         :bic ""
                                                                                         :branch_identifier ""
                                                                                         :bsb_number ""
                                                                                         :currency ""
                                                                                         :iban ""}]
                                                                        :birthday ""
                                                                        :created_at ""
                                                                        :created_by ""
                                                                        :currency ""
                                                                        :custom_fields [{:description ""
                                                                                         :id ""
                                                                                         :name ""
                                                                                         :value ""}]
                                                                        :deleted false
                                                                        :description ""
                                                                        :emails [{:email ""
                                                                                  :id ""
                                                                                  :type ""}]
                                                                        :fax ""
                                                                        :first_name ""
                                                                        :id ""
                                                                        :image ""
                                                                        :industry ""
                                                                        :interaction_count 0
                                                                        :last_activity_at ""
                                                                        :last_name ""
                                                                        :name ""
                                                                        :number_of_employees ""
                                                                        :owner_id ""
                                                                        :ownership ""
                                                                        :parent_id ""
                                                                        :payee_number ""
                                                                        :phone_numbers [{:area_code ""
                                                                                         :country_code ""
                                                                                         :extension ""
                                                                                         :id ""
                                                                                         :number ""
                                                                                         :type ""}]
                                                                        :read_only false
                                                                        :row_type {:id ""
                                                                                   :name ""}
                                                                        :sales_tax_number ""
                                                                        :salutation ""
                                                                        :social_links [{:id ""
                                                                                        :type ""
                                                                                        :url ""}]
                                                                        :status ""
                                                                        :tags []
                                                                        :updated_at ""
                                                                        :updated_by ""
                                                                        :vat_number ""
                                                                        :websites [{:id ""
                                                                                    :type ""
                                                                                    :url ""}]}})
require "http/client"

url = "{{baseUrl}}/crm/companies"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/companies"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/companies");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/companies"

	payload := strings.NewReader("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/companies HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1971

{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/companies")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/companies"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/companies")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/companies")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  abn_branch: '',
  abn_or_tfn: '',
  acn: '',
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  annual_revenue: '',
  bank_accounts: [
    {
      account_name: '',
      account_number: '',
      account_type: '',
      bank_code: '',
      bic: '',
      branch_identifier: '',
      bsb_number: '',
      currency: '',
      iban: ''
    }
  ],
  birthday: '',
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  deleted: false,
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  image: '',
  industry: '',
  interaction_count: 0,
  last_activity_at: '',
  last_name: '',
  name: '',
  number_of_employees: '',
  owner_id: '',
  ownership: '',
  parent_id: '',
  payee_number: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  read_only: false,
  row_type: {
    id: '',
    name: ''
  },
  sales_tax_number: '',
  salutation: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  updated_at: '',
  updated_by: '',
  vat_number: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/companies');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abn_branch: '',
    abn_or_tfn: '',
    acn: '',
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    annual_revenue: '',
    bank_accounts: [
      {
        account_name: '',
        account_number: '',
        account_type: '',
        bank_code: '',
        bic: '',
        branch_identifier: '',
        bsb_number: '',
        currency: '',
        iban: ''
      }
    ],
    birthday: '',
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    deleted: false,
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    image: '',
    industry: '',
    interaction_count: 0,
    last_activity_at: '',
    last_name: '',
    name: '',
    number_of_employees: '',
    owner_id: '',
    ownership: '',
    parent_id: '',
    payee_number: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    read_only: false,
    row_type: {id: '', name: ''},
    sales_tax_number: '',
    salutation: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    updated_at: '',
    updated_by: '',
    vat_number: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/companies';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abn_branch":"","abn_or_tfn":"","acn":"","addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"annual_revenue":"","bank_accounts":[{"account_name":"","account_number":"","account_type":"","bank_code":"","bic":"","branch_identifier":"","bsb_number":"","currency":"","iban":""}],"birthday":"","created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deleted":false,"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","image":"","industry":"","interaction_count":0,"last_activity_at":"","last_name":"","name":"","number_of_employees":"","owner_id":"","ownership":"","parent_id":"","payee_number":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"read_only":false,"row_type":{"id":"","name":""},"sales_tax_number":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"updated_at":"","updated_by":"","vat_number":"","websites":[{"id":"","type":"","url":""}]}'
};

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}}/crm/companies',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "abn_branch": "",\n  "abn_or_tfn": "",\n  "acn": "",\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "annual_revenue": "",\n  "bank_accounts": [\n    {\n      "account_name": "",\n      "account_number": "",\n      "account_type": "",\n      "bank_code": "",\n      "bic": "",\n      "branch_identifier": "",\n      "bsb_number": "",\n      "currency": "",\n      "iban": ""\n    }\n  ],\n  "birthday": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "deleted": false,\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "industry": "",\n  "interaction_count": 0,\n  "last_activity_at": "",\n  "last_name": "",\n  "name": "",\n  "number_of_employees": "",\n  "owner_id": "",\n  "ownership": "",\n  "parent_id": "",\n  "payee_number": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "read_only": false,\n  "row_type": {\n    "id": "",\n    "name": ""\n  },\n  "sales_tax_number": "",\n  "salutation": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "updated_at": "",\n  "updated_by": "",\n  "vat_number": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\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  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/companies")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  abn_branch: '',
  abn_or_tfn: '',
  acn: '',
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  annual_revenue: '',
  bank_accounts: [
    {
      account_name: '',
      account_number: '',
      account_type: '',
      bank_code: '',
      bic: '',
      branch_identifier: '',
      bsb_number: '',
      currency: '',
      iban: ''
    }
  ],
  birthday: '',
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  deleted: false,
  description: '',
  emails: [{email: '', id: '', type: ''}],
  fax: '',
  first_name: '',
  id: '',
  image: '',
  industry: '',
  interaction_count: 0,
  last_activity_at: '',
  last_name: '',
  name: '',
  number_of_employees: '',
  owner_id: '',
  ownership: '',
  parent_id: '',
  payee_number: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  read_only: false,
  row_type: {id: '', name: ''},
  sales_tax_number: '',
  salutation: '',
  social_links: [{id: '', type: '', url: ''}],
  status: '',
  tags: [],
  updated_at: '',
  updated_by: '',
  vat_number: '',
  websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    abn_branch: '',
    abn_or_tfn: '',
    acn: '',
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    annual_revenue: '',
    bank_accounts: [
      {
        account_name: '',
        account_number: '',
        account_type: '',
        bank_code: '',
        bic: '',
        branch_identifier: '',
        bsb_number: '',
        currency: '',
        iban: ''
      }
    ],
    birthday: '',
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    deleted: false,
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    image: '',
    industry: '',
    interaction_count: 0,
    last_activity_at: '',
    last_name: '',
    name: '',
    number_of_employees: '',
    owner_id: '',
    ownership: '',
    parent_id: '',
    payee_number: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    read_only: false,
    row_type: {id: '', name: ''},
    sales_tax_number: '',
    salutation: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    updated_at: '',
    updated_by: '',
    vat_number: '',
    websites: [{id: '', type: '', url: ''}]
  },
  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}}/crm/companies');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  abn_branch: '',
  abn_or_tfn: '',
  acn: '',
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  annual_revenue: '',
  bank_accounts: [
    {
      account_name: '',
      account_number: '',
      account_type: '',
      bank_code: '',
      bic: '',
      branch_identifier: '',
      bsb_number: '',
      currency: '',
      iban: ''
    }
  ],
  birthday: '',
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  deleted: false,
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  image: '',
  industry: '',
  interaction_count: 0,
  last_activity_at: '',
  last_name: '',
  name: '',
  number_of_employees: '',
  owner_id: '',
  ownership: '',
  parent_id: '',
  payee_number: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  read_only: false,
  row_type: {
    id: '',
    name: ''
  },
  sales_tax_number: '',
  salutation: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  updated_at: '',
  updated_by: '',
  vat_number: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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}}/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abn_branch: '',
    abn_or_tfn: '',
    acn: '',
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    annual_revenue: '',
    bank_accounts: [
      {
        account_name: '',
        account_number: '',
        account_type: '',
        bank_code: '',
        bic: '',
        branch_identifier: '',
        bsb_number: '',
        currency: '',
        iban: ''
      }
    ],
    birthday: '',
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    deleted: false,
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    image: '',
    industry: '',
    interaction_count: 0,
    last_activity_at: '',
    last_name: '',
    name: '',
    number_of_employees: '',
    owner_id: '',
    ownership: '',
    parent_id: '',
    payee_number: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    read_only: false,
    row_type: {id: '', name: ''},
    sales_tax_number: '',
    salutation: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    updated_at: '',
    updated_by: '',
    vat_number: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

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

const url = '{{baseUrl}}/crm/companies';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abn_branch":"","abn_or_tfn":"","acn":"","addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"annual_revenue":"","bank_accounts":[{"account_name":"","account_number":"","account_type":"","bank_code":"","bic":"","branch_identifier":"","bsb_number":"","currency":"","iban":""}],"birthday":"","created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deleted":false,"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","image":"","industry":"","interaction_count":0,"last_activity_at":"","last_name":"","name":"","number_of_employees":"","owner_id":"","ownership":"","parent_id":"","payee_number":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"read_only":false,"row_type":{"id":"","name":""},"sales_tax_number":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"updated_at":"","updated_by":"","vat_number":"","websites":[{"id":"","type":"","url":""}]}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"abn_branch": @"",
                              @"abn_or_tfn": @"",
                              @"acn": @"",
                              @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"annual_revenue": @"",
                              @"bank_accounts": @[ @{ @"account_name": @"", @"account_number": @"", @"account_type": @"", @"bank_code": @"", @"bic": @"", @"branch_identifier": @"", @"bsb_number": @"", @"currency": @"", @"iban": @"" } ],
                              @"birthday": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"deleted": @NO,
                              @"description": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"fax": @"",
                              @"first_name": @"",
                              @"id": @"",
                              @"image": @"",
                              @"industry": @"",
                              @"interaction_count": @0,
                              @"last_activity_at": @"",
                              @"last_name": @"",
                              @"name": @"",
                              @"number_of_employees": @"",
                              @"owner_id": @"",
                              @"ownership": @"",
                              @"parent_id": @"",
                              @"payee_number": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"read_only": @NO,
                              @"row_type": @{ @"id": @"", @"name": @"" },
                              @"sales_tax_number": @"",
                              @"salutation": @"",
                              @"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
                              @"status": @"",
                              @"tags": @[  ],
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"vat_number": @"",
                              @"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/companies"]
                                                       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}}/crm/companies" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/companies",
  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([
    'abn_branch' => '',
    'abn_or_tfn' => '',
    'acn' => '',
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'annual_revenue' => '',
    'bank_accounts' => [
        [
                'account_name' => '',
                'account_number' => '',
                'account_type' => '',
                'bank_code' => '',
                'bic' => '',
                'branch_identifier' => '',
                'bsb_number' => '',
                'currency' => '',
                'iban' => ''
        ]
    ],
    'birthday' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'deleted' => null,
    'description' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'fax' => '',
    'first_name' => '',
    'id' => '',
    'image' => '',
    'industry' => '',
    'interaction_count' => 0,
    'last_activity_at' => '',
    'last_name' => '',
    'name' => '',
    'number_of_employees' => '',
    'owner_id' => '',
    'ownership' => '',
    'parent_id' => '',
    'payee_number' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'read_only' => null,
    'row_type' => [
        'id' => '',
        'name' => ''
    ],
    'sales_tax_number' => '',
    'salutation' => '',
    'social_links' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ],
    'status' => '',
    'tags' => [
        
    ],
    'updated_at' => '',
    'updated_by' => '',
    'vat_number' => '',
    'websites' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/companies', [
  'body' => '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/companies');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'abn_branch' => '',
  'abn_or_tfn' => '',
  'acn' => '',
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'annual_revenue' => '',
  'bank_accounts' => [
    [
        'account_name' => '',
        'account_number' => '',
        'account_type' => '',
        'bank_code' => '',
        'bic' => '',
        'branch_identifier' => '',
        'bsb_number' => '',
        'currency' => '',
        'iban' => ''
    ]
  ],
  'birthday' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'deleted' => null,
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'industry' => '',
  'interaction_count' => 0,
  'last_activity_at' => '',
  'last_name' => '',
  'name' => '',
  'number_of_employees' => '',
  'owner_id' => '',
  'ownership' => '',
  'parent_id' => '',
  'payee_number' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'read_only' => null,
  'row_type' => [
    'id' => '',
    'name' => ''
  ],
  'sales_tax_number' => '',
  'salutation' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'vat_number' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'abn_branch' => '',
  'abn_or_tfn' => '',
  'acn' => '',
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'annual_revenue' => '',
  'bank_accounts' => [
    [
        'account_name' => '',
        'account_number' => '',
        'account_type' => '',
        'bank_code' => '',
        'bic' => '',
        'branch_identifier' => '',
        'bsb_number' => '',
        'currency' => '',
        'iban' => ''
    ]
  ],
  'birthday' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'deleted' => null,
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'industry' => '',
  'interaction_count' => 0,
  'last_activity_at' => '',
  'last_name' => '',
  'name' => '',
  'number_of_employees' => '',
  'owner_id' => '',
  'ownership' => '',
  'parent_id' => '',
  'payee_number' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'read_only' => null,
  'row_type' => [
    'id' => '',
    'name' => ''
  ],
  'sales_tax_number' => '',
  'salutation' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'vat_number' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/crm/companies');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/companies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/companies' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
import http.client

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

payload = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/companies", payload, headers)

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

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

url = "{{baseUrl}}/crm/companies"

payload = {
    "abn_branch": "",
    "abn_or_tfn": "",
    "acn": "",
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "annual_revenue": "",
    "bank_accounts": [
        {
            "account_name": "",
            "account_number": "",
            "account_type": "",
            "bank_code": "",
            "bic": "",
            "branch_identifier": "",
            "bsb_number": "",
            "currency": "",
            "iban": ""
        }
    ],
    "birthday": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "deleted": False,
    "description": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "fax": "",
    "first_name": "",
    "id": "",
    "image": "",
    "industry": "",
    "interaction_count": 0,
    "last_activity_at": "",
    "last_name": "",
    "name": "",
    "number_of_employees": "",
    "owner_id": "",
    "ownership": "",
    "parent_id": "",
    "payee_number": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "read_only": False,
    "row_type": {
        "id": "",
        "name": ""
    },
    "sales_tax_number": "",
    "salutation": "",
    "social_links": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ],
    "status": "",
    "tags": [],
    "updated_at": "",
    "updated_by": "",
    "vat_number": "",
    "websites": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ]
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/companies"

payload <- "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/companies")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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/crm/companies') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/companies";

    let payload = json!({
        "abn_branch": "",
        "abn_or_tfn": "",
        "acn": "",
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "annual_revenue": "",
        "bank_accounts": (
            json!({
                "account_name": "",
                "account_number": "",
                "account_type": "",
                "bank_code": "",
                "bic": "",
                "branch_identifier": "",
                "bsb_number": "",
                "currency": "",
                "iban": ""
            })
        ),
        "birthday": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "deleted": false,
        "description": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "fax": "",
        "first_name": "",
        "id": "",
        "image": "",
        "industry": "",
        "interaction_count": 0,
        "last_activity_at": "",
        "last_name": "",
        "name": "",
        "number_of_employees": "",
        "owner_id": "",
        "ownership": "",
        "parent_id": "",
        "payee_number": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "read_only": false,
        "row_type": json!({
            "id": "",
            "name": ""
        }),
        "sales_tax_number": "",
        "salutation": "",
        "social_links": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        ),
        "status": "",
        "tags": (),
        "updated_at": "",
        "updated_by": "",
        "vat_number": "",
        "websites": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/companies \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
echo '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/crm/companies \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "abn_branch": "",\n  "abn_or_tfn": "",\n  "acn": "",\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "annual_revenue": "",\n  "bank_accounts": [\n    {\n      "account_name": "",\n      "account_number": "",\n      "account_type": "",\n      "bank_code": "",\n      "bic": "",\n      "branch_identifier": "",\n      "bsb_number": "",\n      "currency": "",\n      "iban": ""\n    }\n  ],\n  "birthday": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "deleted": false,\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "industry": "",\n  "interaction_count": 0,\n  "last_activity_at": "",\n  "last_name": "",\n  "name": "",\n  "number_of_employees": "",\n  "owner_id": "",\n  "ownership": "",\n  "parent_id": "",\n  "payee_number": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "read_only": false,\n  "row_type": {\n    "id": "",\n    "name": ""\n  },\n  "sales_tax_number": "",\n  "salutation": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "updated_at": "",\n  "updated_by": "",\n  "vat_number": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/crm/companies
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "annual_revenue": "",
  "bank_accounts": [
    [
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    ]
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "deleted": false,
  "description": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "read_only": false,
  "row_type": [
    "id": "",
    "name": ""
  ],
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/companies")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete company
{{baseUrl}}/crm/companies/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/companies/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/companies/:id" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/companies/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/companies/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/companies/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/companies/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/companies/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/companies/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/companies/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/companies/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/companies/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/companies/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/companies/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/companies/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/companies/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/companies/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/companies/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/companies/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/companies/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/companies/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/companies/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/companies/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/companies/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/companies/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/companies/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/companies/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/companies/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/companies/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/companies/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/companies/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/companies/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/companies/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/companies/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/companies/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get company
{{baseUrl}}/crm/companies/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/companies/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/companies/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/companies/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/companies/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/companies/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/companies/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/companies/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/companies/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/companies/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/companies/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/companies/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/companies/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/companies/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/companies/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/companies/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/companies/:id"]
                                                       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}}/crm/companies/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/companies/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/companies/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/companies/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/companies/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/companies/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/companies/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/companies/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/companies/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/companies/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/companies/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/companies/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/companies/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/companies/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/companies/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/companies/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/companies/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "abn_branch": "123",
    "abn_or_tfn": "46 115 614 695",
    "acn": "XXX XXX XXX",
    "annual_revenue": "+$35m",
    "birthday": "2000-08-12",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "deleted": false,
    "description": "Space Exploration Technologies Corp. is an American aerospace manufacturer, space transportation services and communications company headquartered in Hawthorne, California.",
    "fax": "+12129876543",
    "first_name": "Elon",
    "id": "12345",
    "image": "https://www.spacex.com/static/images/share.jpg",
    "industry": "Apparel",
    "interaction_count": 1,
    "last_activity_at": "2020-09-30T07:43:32.000Z",
    "last_name": "Musk",
    "name": "SpaceX",
    "number_of_employees": "500-1000",
    "owner_id": "12345",
    "ownership": "Public",
    "parent_id": "22345",
    "payee_number": "78932EN",
    "read_only": false,
    "sales_tax_number": "12456EN",
    "salutation": "Mr",
    "status": "Open",
    "tags": [
      "New"
    ],
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345",
    "vat_number": "BE0689615164"
  },
  "operation": "one",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List companies
{{baseUrl}}/crm/companies
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/companies");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/companies" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/companies"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/companies"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/companies");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/companies"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/companies HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/companies")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/companies"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/companies")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/companies")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/companies');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/companies';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/companies")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/companies');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/companies',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/companies';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/companies"]
                                                       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}}/crm/companies" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/companies",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/companies', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/companies');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/companies');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/companies' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/companies' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/companies", headers=headers)

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

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

url = "{{baseUrl}}/crm/companies"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/companies"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/companies")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/companies') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/companies";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/companies \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/companies \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/companies
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/companies")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update company
{{baseUrl}}/crm/companies/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/companies/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");

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

(client/patch "{{baseUrl}}/crm/companies/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}
                                                               :content-type :json
                                                               :form-params {:abn_branch ""
                                                                             :abn_or_tfn ""
                                                                             :acn ""
                                                                             :addresses [{:city ""
                                                                                          :contact_name ""
                                                                                          :country ""
                                                                                          :county ""
                                                                                          :email ""
                                                                                          :fax ""
                                                                                          :id ""
                                                                                          :latitude ""
                                                                                          :line1 ""
                                                                                          :line2 ""
                                                                                          :line3 ""
                                                                                          :line4 ""
                                                                                          :longitude ""
                                                                                          :name ""
                                                                                          :phone_number ""
                                                                                          :postal_code ""
                                                                                          :row_version ""
                                                                                          :salutation ""
                                                                                          :state ""
                                                                                          :street_number ""
                                                                                          :string ""
                                                                                          :type ""
                                                                                          :website ""}]
                                                                             :annual_revenue ""
                                                                             :bank_accounts [{:account_name ""
                                                                                              :account_number ""
                                                                                              :account_type ""
                                                                                              :bank_code ""
                                                                                              :bic ""
                                                                                              :branch_identifier ""
                                                                                              :bsb_number ""
                                                                                              :currency ""
                                                                                              :iban ""}]
                                                                             :birthday ""
                                                                             :created_at ""
                                                                             :created_by ""
                                                                             :currency ""
                                                                             :custom_fields [{:description ""
                                                                                              :id ""
                                                                                              :name ""
                                                                                              :value ""}]
                                                                             :deleted false
                                                                             :description ""
                                                                             :emails [{:email ""
                                                                                       :id ""
                                                                                       :type ""}]
                                                                             :fax ""
                                                                             :first_name ""
                                                                             :id ""
                                                                             :image ""
                                                                             :industry ""
                                                                             :interaction_count 0
                                                                             :last_activity_at ""
                                                                             :last_name ""
                                                                             :name ""
                                                                             :number_of_employees ""
                                                                             :owner_id ""
                                                                             :ownership ""
                                                                             :parent_id ""
                                                                             :payee_number ""
                                                                             :phone_numbers [{:area_code ""
                                                                                              :country_code ""
                                                                                              :extension ""
                                                                                              :id ""
                                                                                              :number ""
                                                                                              :type ""}]
                                                                             :read_only false
                                                                             :row_type {:id ""
                                                                                        :name ""}
                                                                             :sales_tax_number ""
                                                                             :salutation ""
                                                                             :social_links [{:id ""
                                                                                             :type ""
                                                                                             :url ""}]
                                                                             :status ""
                                                                             :tags []
                                                                             :updated_at ""
                                                                             :updated_by ""
                                                                             :vat_number ""
                                                                             :websites [{:id ""
                                                                                         :type ""
                                                                                         :url ""}]}})
require "http/client"

url = "{{baseUrl}}/crm/companies/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\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}}/crm/companies/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/companies/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/companies/:id"

	payload := strings.NewReader("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/companies/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1971

{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/companies/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/companies/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/companies/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/companies/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  abn_branch: '',
  abn_or_tfn: '',
  acn: '',
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  annual_revenue: '',
  bank_accounts: [
    {
      account_name: '',
      account_number: '',
      account_type: '',
      bank_code: '',
      bic: '',
      branch_identifier: '',
      bsb_number: '',
      currency: '',
      iban: ''
    }
  ],
  birthday: '',
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  deleted: false,
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  image: '',
  industry: '',
  interaction_count: 0,
  last_activity_at: '',
  last_name: '',
  name: '',
  number_of_employees: '',
  owner_id: '',
  ownership: '',
  parent_id: '',
  payee_number: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  read_only: false,
  row_type: {
    id: '',
    name: ''
  },
  sales_tax_number: '',
  salutation: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  updated_at: '',
  updated_by: '',
  vat_number: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/companies/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abn_branch: '',
    abn_or_tfn: '',
    acn: '',
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    annual_revenue: '',
    bank_accounts: [
      {
        account_name: '',
        account_number: '',
        account_type: '',
        bank_code: '',
        bic: '',
        branch_identifier: '',
        bsb_number: '',
        currency: '',
        iban: ''
      }
    ],
    birthday: '',
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    deleted: false,
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    image: '',
    industry: '',
    interaction_count: 0,
    last_activity_at: '',
    last_name: '',
    name: '',
    number_of_employees: '',
    owner_id: '',
    ownership: '',
    parent_id: '',
    payee_number: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    read_only: false,
    row_type: {id: '', name: ''},
    sales_tax_number: '',
    salutation: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    updated_at: '',
    updated_by: '',
    vat_number: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/companies/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abn_branch":"","abn_or_tfn":"","acn":"","addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"annual_revenue":"","bank_accounts":[{"account_name":"","account_number":"","account_type":"","bank_code":"","bic":"","branch_identifier":"","bsb_number":"","currency":"","iban":""}],"birthday":"","created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deleted":false,"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","image":"","industry":"","interaction_count":0,"last_activity_at":"","last_name":"","name":"","number_of_employees":"","owner_id":"","ownership":"","parent_id":"","payee_number":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"read_only":false,"row_type":{"id":"","name":""},"sales_tax_number":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"updated_at":"","updated_by":"","vat_number":"","websites":[{"id":"","type":"","url":""}]}'
};

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}}/crm/companies/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "abn_branch": "",\n  "abn_or_tfn": "",\n  "acn": "",\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "annual_revenue": "",\n  "bank_accounts": [\n    {\n      "account_name": "",\n      "account_number": "",\n      "account_type": "",\n      "bank_code": "",\n      "bic": "",\n      "branch_identifier": "",\n      "bsb_number": "",\n      "currency": "",\n      "iban": ""\n    }\n  ],\n  "birthday": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "deleted": false,\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "industry": "",\n  "interaction_count": 0,\n  "last_activity_at": "",\n  "last_name": "",\n  "name": "",\n  "number_of_employees": "",\n  "owner_id": "",\n  "ownership": "",\n  "parent_id": "",\n  "payee_number": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "read_only": false,\n  "row_type": {\n    "id": "",\n    "name": ""\n  },\n  "sales_tax_number": "",\n  "salutation": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "updated_at": "",\n  "updated_by": "",\n  "vat_number": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\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  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/companies/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  abn_branch: '',
  abn_or_tfn: '',
  acn: '',
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  annual_revenue: '',
  bank_accounts: [
    {
      account_name: '',
      account_number: '',
      account_type: '',
      bank_code: '',
      bic: '',
      branch_identifier: '',
      bsb_number: '',
      currency: '',
      iban: ''
    }
  ],
  birthday: '',
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  deleted: false,
  description: '',
  emails: [{email: '', id: '', type: ''}],
  fax: '',
  first_name: '',
  id: '',
  image: '',
  industry: '',
  interaction_count: 0,
  last_activity_at: '',
  last_name: '',
  name: '',
  number_of_employees: '',
  owner_id: '',
  ownership: '',
  parent_id: '',
  payee_number: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  read_only: false,
  row_type: {id: '', name: ''},
  sales_tax_number: '',
  salutation: '',
  social_links: [{id: '', type: '', url: ''}],
  status: '',
  tags: [],
  updated_at: '',
  updated_by: '',
  vat_number: '',
  websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    abn_branch: '',
    abn_or_tfn: '',
    acn: '',
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    annual_revenue: '',
    bank_accounts: [
      {
        account_name: '',
        account_number: '',
        account_type: '',
        bank_code: '',
        bic: '',
        branch_identifier: '',
        bsb_number: '',
        currency: '',
        iban: ''
      }
    ],
    birthday: '',
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    deleted: false,
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    image: '',
    industry: '',
    interaction_count: 0,
    last_activity_at: '',
    last_name: '',
    name: '',
    number_of_employees: '',
    owner_id: '',
    ownership: '',
    parent_id: '',
    payee_number: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    read_only: false,
    row_type: {id: '', name: ''},
    sales_tax_number: '',
    salutation: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    updated_at: '',
    updated_by: '',
    vat_number: '',
    websites: [{id: '', type: '', url: ''}]
  },
  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}}/crm/companies/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  abn_branch: '',
  abn_or_tfn: '',
  acn: '',
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  annual_revenue: '',
  bank_accounts: [
    {
      account_name: '',
      account_number: '',
      account_type: '',
      bank_code: '',
      bic: '',
      branch_identifier: '',
      bsb_number: '',
      currency: '',
      iban: ''
    }
  ],
  birthday: '',
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  deleted: false,
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  image: '',
  industry: '',
  interaction_count: 0,
  last_activity_at: '',
  last_name: '',
  name: '',
  number_of_employees: '',
  owner_id: '',
  ownership: '',
  parent_id: '',
  payee_number: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  read_only: false,
  row_type: {
    id: '',
    name: ''
  },
  sales_tax_number: '',
  salutation: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  updated_at: '',
  updated_by: '',
  vat_number: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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}}/crm/companies/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    abn_branch: '',
    abn_or_tfn: '',
    acn: '',
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    annual_revenue: '',
    bank_accounts: [
      {
        account_name: '',
        account_number: '',
        account_type: '',
        bank_code: '',
        bic: '',
        branch_identifier: '',
        bsb_number: '',
        currency: '',
        iban: ''
      }
    ],
    birthday: '',
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    deleted: false,
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    image: '',
    industry: '',
    interaction_count: 0,
    last_activity_at: '',
    last_name: '',
    name: '',
    number_of_employees: '',
    owner_id: '',
    ownership: '',
    parent_id: '',
    payee_number: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    read_only: false,
    row_type: {id: '', name: ''},
    sales_tax_number: '',
    salutation: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    updated_at: '',
    updated_by: '',
    vat_number: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

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

const url = '{{baseUrl}}/crm/companies/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"abn_branch":"","abn_or_tfn":"","acn":"","addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"annual_revenue":"","bank_accounts":[{"account_name":"","account_number":"","account_type":"","bank_code":"","bic":"","branch_identifier":"","bsb_number":"","currency":"","iban":""}],"birthday":"","created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"deleted":false,"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","image":"","industry":"","interaction_count":0,"last_activity_at":"","last_name":"","name":"","number_of_employees":"","owner_id":"","ownership":"","parent_id":"","payee_number":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"read_only":false,"row_type":{"id":"","name":""},"sales_tax_number":"","salutation":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"updated_at":"","updated_by":"","vat_number":"","websites":[{"id":"","type":"","url":""}]}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"abn_branch": @"",
                              @"abn_or_tfn": @"",
                              @"acn": @"",
                              @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"annual_revenue": @"",
                              @"bank_accounts": @[ @{ @"account_name": @"", @"account_number": @"", @"account_type": @"", @"bank_code": @"", @"bic": @"", @"branch_identifier": @"", @"bsb_number": @"", @"currency": @"", @"iban": @"" } ],
                              @"birthday": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"deleted": @NO,
                              @"description": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"fax": @"",
                              @"first_name": @"",
                              @"id": @"",
                              @"image": @"",
                              @"industry": @"",
                              @"interaction_count": @0,
                              @"last_activity_at": @"",
                              @"last_name": @"",
                              @"name": @"",
                              @"number_of_employees": @"",
                              @"owner_id": @"",
                              @"ownership": @"",
                              @"parent_id": @"",
                              @"payee_number": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"read_only": @NO,
                              @"row_type": @{ @"id": @"", @"name": @"" },
                              @"sales_tax_number": @"",
                              @"salutation": @"",
                              @"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
                              @"status": @"",
                              @"tags": @[  ],
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"vat_number": @"",
                              @"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/companies/:id"]
                                                       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}}/crm/companies/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/companies/:id",
  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([
    'abn_branch' => '',
    'abn_or_tfn' => '',
    'acn' => '',
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'annual_revenue' => '',
    'bank_accounts' => [
        [
                'account_name' => '',
                'account_number' => '',
                'account_type' => '',
                'bank_code' => '',
                'bic' => '',
                'branch_identifier' => '',
                'bsb_number' => '',
                'currency' => '',
                'iban' => ''
        ]
    ],
    'birthday' => '',
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'deleted' => null,
    'description' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'fax' => '',
    'first_name' => '',
    'id' => '',
    'image' => '',
    'industry' => '',
    'interaction_count' => 0,
    'last_activity_at' => '',
    'last_name' => '',
    'name' => '',
    'number_of_employees' => '',
    'owner_id' => '',
    'ownership' => '',
    'parent_id' => '',
    'payee_number' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'read_only' => null,
    'row_type' => [
        'id' => '',
        'name' => ''
    ],
    'sales_tax_number' => '',
    'salutation' => '',
    'social_links' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ],
    'status' => '',
    'tags' => [
        
    ],
    'updated_at' => '',
    'updated_by' => '',
    'vat_number' => '',
    'websites' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/companies/:id', [
  'body' => '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/companies/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'abn_branch' => '',
  'abn_or_tfn' => '',
  'acn' => '',
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'annual_revenue' => '',
  'bank_accounts' => [
    [
        'account_name' => '',
        'account_number' => '',
        'account_type' => '',
        'bank_code' => '',
        'bic' => '',
        'branch_identifier' => '',
        'bsb_number' => '',
        'currency' => '',
        'iban' => ''
    ]
  ],
  'birthday' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'deleted' => null,
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'industry' => '',
  'interaction_count' => 0,
  'last_activity_at' => '',
  'last_name' => '',
  'name' => '',
  'number_of_employees' => '',
  'owner_id' => '',
  'ownership' => '',
  'parent_id' => '',
  'payee_number' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'read_only' => null,
  'row_type' => [
    'id' => '',
    'name' => ''
  ],
  'sales_tax_number' => '',
  'salutation' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'vat_number' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'abn_branch' => '',
  'abn_or_tfn' => '',
  'acn' => '',
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'annual_revenue' => '',
  'bank_accounts' => [
    [
        'account_name' => '',
        'account_number' => '',
        'account_type' => '',
        'bank_code' => '',
        'bic' => '',
        'branch_identifier' => '',
        'bsb_number' => '',
        'currency' => '',
        'iban' => ''
    ]
  ],
  'birthday' => '',
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'deleted' => null,
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'industry' => '',
  'interaction_count' => 0,
  'last_activity_at' => '',
  'last_name' => '',
  'name' => '',
  'number_of_employees' => '',
  'owner_id' => '',
  'ownership' => '',
  'parent_id' => '',
  'payee_number' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'read_only' => null,
  'row_type' => [
    'id' => '',
    'name' => ''
  ],
  'sales_tax_number' => '',
  'salutation' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'updated_at' => '',
  'updated_by' => '',
  'vat_number' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/crm/companies/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/companies/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/companies/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
import http.client

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

payload = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/companies/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/companies/:id"

payload = {
    "abn_branch": "",
    "abn_or_tfn": "",
    "acn": "",
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "annual_revenue": "",
    "bank_accounts": [
        {
            "account_name": "",
            "account_number": "",
            "account_type": "",
            "bank_code": "",
            "bic": "",
            "branch_identifier": "",
            "bsb_number": "",
            "currency": "",
            "iban": ""
        }
    ],
    "birthday": "",
    "created_at": "",
    "created_by": "",
    "currency": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "deleted": False,
    "description": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "fax": "",
    "first_name": "",
    "id": "",
    "image": "",
    "industry": "",
    "interaction_count": 0,
    "last_activity_at": "",
    "last_name": "",
    "name": "",
    "number_of_employees": "",
    "owner_id": "",
    "ownership": "",
    "parent_id": "",
    "payee_number": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "read_only": False,
    "row_type": {
        "id": "",
        "name": ""
    },
    "sales_tax_number": "",
    "salutation": "",
    "social_links": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ],
    "status": "",
    "tags": [],
    "updated_at": "",
    "updated_by": "",
    "vat_number": "",
    "websites": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ]
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/companies/:id"

payload <- "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/companies/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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.patch('/baseUrl/crm/companies/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"abn_branch\": \"\",\n  \"abn_or_tfn\": \"\",\n  \"acn\": \"\",\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"annual_revenue\": \"\",\n  \"bank_accounts\": [\n    {\n      \"account_name\": \"\",\n      \"account_number\": \"\",\n      \"account_type\": \"\",\n      \"bank_code\": \"\",\n      \"bic\": \"\",\n      \"branch_identifier\": \"\",\n      \"bsb_number\": \"\",\n      \"currency\": \"\",\n      \"iban\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"deleted\": false,\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"industry\": \"\",\n  \"interaction_count\": 0,\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"name\": \"\",\n  \"number_of_employees\": \"\",\n  \"owner_id\": \"\",\n  \"ownership\": \"\",\n  \"parent_id\": \"\",\n  \"payee_number\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"read_only\": false,\n  \"row_type\": {\n    \"id\": \"\",\n    \"name\": \"\"\n  },\n  \"sales_tax_number\": \"\",\n  \"salutation\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"vat_number\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\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}}/crm/companies/:id";

    let payload = json!({
        "abn_branch": "",
        "abn_or_tfn": "",
        "acn": "",
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "annual_revenue": "",
        "bank_accounts": (
            json!({
                "account_name": "",
                "account_number": "",
                "account_type": "",
                "bank_code": "",
                "bic": "",
                "branch_identifier": "",
                "bsb_number": "",
                "currency": "",
                "iban": ""
            })
        ),
        "birthday": "",
        "created_at": "",
        "created_by": "",
        "currency": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "deleted": false,
        "description": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "fax": "",
        "first_name": "",
        "id": "",
        "image": "",
        "industry": "",
        "interaction_count": 0,
        "last_activity_at": "",
        "last_name": "",
        "name": "",
        "number_of_employees": "",
        "owner_id": "",
        "ownership": "",
        "parent_id": "",
        "payee_number": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "read_only": false,
        "row_type": json!({
            "id": "",
            "name": ""
        }),
        "sales_tax_number": "",
        "salutation": "",
        "social_links": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        ),
        "status": "",
        "tags": (),
        "updated_at": "",
        "updated_by": "",
        "vat_number": "",
        "websites": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/companies/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
echo '{
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "annual_revenue": "",
  "bank_accounts": [
    {
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    }
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "deleted": false,
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "read_only": false,
  "row_type": {
    "id": "",
    "name": ""
  },
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}' |  \
  http PATCH {{baseUrl}}/crm/companies/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "abn_branch": "",\n  "abn_or_tfn": "",\n  "acn": "",\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "annual_revenue": "",\n  "bank_accounts": [\n    {\n      "account_name": "",\n      "account_number": "",\n      "account_type": "",\n      "bank_code": "",\n      "bic": "",\n      "branch_identifier": "",\n      "bsb_number": "",\n      "currency": "",\n      "iban": ""\n    }\n  ],\n  "birthday": "",\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "deleted": false,\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "industry": "",\n  "interaction_count": 0,\n  "last_activity_at": "",\n  "last_name": "",\n  "name": "",\n  "number_of_employees": "",\n  "owner_id": "",\n  "ownership": "",\n  "parent_id": "",\n  "payee_number": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "read_only": false,\n  "row_type": {\n    "id": "",\n    "name": ""\n  },\n  "sales_tax_number": "",\n  "salutation": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "updated_at": "",\n  "updated_by": "",\n  "vat_number": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/crm/companies/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "abn_branch": "",
  "abn_or_tfn": "",
  "acn": "",
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "annual_revenue": "",
  "bank_accounts": [
    [
      "account_name": "",
      "account_number": "",
      "account_type": "",
      "bank_code": "",
      "bic": "",
      "branch_identifier": "",
      "bsb_number": "",
      "currency": "",
      "iban": ""
    ]
  ],
  "birthday": "",
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "deleted": false,
  "description": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "image": "",
  "industry": "",
  "interaction_count": 0,
  "last_activity_at": "",
  "last_name": "",
  "name": "",
  "number_of_employees": "",
  "owner_id": "",
  "ownership": "",
  "parent_id": "",
  "payee_number": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "read_only": false,
  "row_type": [
    "id": "",
    "name": ""
  ],
  "sales_tax_number": "",
  "salutation": "",
  "social_links": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ],
  "status": "",
  "tags": [],
  "updated_at": "",
  "updated_by": "",
  "vat_number": "",
  "websites": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/companies/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create contact
{{baseUrl}}/crm/contacts
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/contacts");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");

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

(client/post "{{baseUrl}}/crm/contacts" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}
                                                         :content-type :json
                                                         :form-params {:active false
                                                                       :addresses [{:city ""
                                                                                    :contact_name ""
                                                                                    :country ""
                                                                                    :county ""
                                                                                    :email ""
                                                                                    :fax ""
                                                                                    :id ""
                                                                                    :latitude ""
                                                                                    :line1 ""
                                                                                    :line2 ""
                                                                                    :line3 ""
                                                                                    :line4 ""
                                                                                    :longitude ""
                                                                                    :name ""
                                                                                    :phone_number ""
                                                                                    :postal_code ""
                                                                                    :row_version ""
                                                                                    :salutation ""
                                                                                    :state ""
                                                                                    :street_number ""
                                                                                    :string ""
                                                                                    :type ""
                                                                                    :website ""}]
                                                                       :birthday ""
                                                                       :company_id ""
                                                                       :company_name ""
                                                                       :created_at ""
                                                                       :current_balance ""
                                                                       :custom_fields [{:description ""
                                                                                        :id ""
                                                                                        :name ""
                                                                                        :value ""}]
                                                                       :department ""
                                                                       :description ""
                                                                       :email_domain ""
                                                                       :emails [{:email ""
                                                                                 :id ""
                                                                                 :type ""}]
                                                                       :fax ""
                                                                       :first_call_at ""
                                                                       :first_email_at ""
                                                                       :first_name ""
                                                                       :gender ""
                                                                       :id ""
                                                                       :image ""
                                                                       :language ""
                                                                       :last_activity_at ""
                                                                       :last_name ""
                                                                       :lead_id ""
                                                                       :lead_source ""
                                                                       :middle_name ""
                                                                       :name ""
                                                                       :owner_id ""
                                                                       :phone_numbers [{:area_code ""
                                                                                        :country_code ""
                                                                                        :extension ""
                                                                                        :id ""
                                                                                        :number ""
                                                                                        :type ""}]
                                                                       :photo_url ""
                                                                       :prefix ""
                                                                       :social_links [{:id ""
                                                                                       :type ""
                                                                                       :url ""}]
                                                                       :status ""
                                                                       :suffix ""
                                                                       :tags []
                                                                       :title ""
                                                                       :type ""
                                                                       :updated_at ""
                                                                       :websites [{:id ""
                                                                                   :type ""
                                                                                   :url ""}]}})
require "http/client"

url = "{{baseUrl}}/crm/contacts"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/contacts"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/contacts");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/contacts"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/contacts HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1641

{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/contacts")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/contacts"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/contacts")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/contacts")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  birthday: '',
  company_id: '',
  company_name: '',
  created_at: '',
  current_balance: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  department: '',
  description: '',
  email_domain: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_call_at: '',
  first_email_at: '',
  first_name: '',
  gender: '',
  id: '',
  image: '',
  language: '',
  last_activity_at: '',
  last_name: '',
  lead_id: '',
  lead_source: '',
  middle_name: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  photo_url: '',
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  suffix: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/contacts');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    birthday: '',
    company_id: '',
    company_name: '',
    created_at: '',
    current_balance: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    department: '',
    description: '',
    email_domain: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_call_at: '',
    first_email_at: '',
    first_name: '',
    gender: '',
    id: '',
    image: '',
    language: '',
    last_activity_at: '',
    last_name: '',
    lead_id: '',
    lead_source: '',
    middle_name: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    photo_url: '',
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    suffix: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/contacts';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","created_at":"","current_balance":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"department":"","description":"","email_domain":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_call_at":"","first_email_at":"","first_name":"","gender":"","id":"","image":"","language":"","last_activity_at":"","last_name":"","lead_id":"","lead_source":"","middle_name":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","suffix":"","tags":[],"title":"","type":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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}}/crm/contacts',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "birthday": "",\n  "company_id": "",\n  "company_name": "",\n  "created_at": "",\n  "current_balance": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "department": "",\n  "description": "",\n  "email_domain": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_call_at": "",\n  "first_email_at": "",\n  "first_name": "",\n  "gender": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_activity_at": "",\n  "last_name": "",\n  "lead_id": "",\n  "lead_source": "",\n  "middle_name": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "photo_url": "",\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "suffix": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\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  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/contacts")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  active: false,
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  birthday: '',
  company_id: '',
  company_name: '',
  created_at: '',
  current_balance: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  department: '',
  description: '',
  email_domain: '',
  emails: [{email: '', id: '', type: ''}],
  fax: '',
  first_call_at: '',
  first_email_at: '',
  first_name: '',
  gender: '',
  id: '',
  image: '',
  language: '',
  last_activity_at: '',
  last_name: '',
  lead_id: '',
  lead_source: '',
  middle_name: '',
  name: '',
  owner_id: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  photo_url: '',
  prefix: '',
  social_links: [{id: '', type: '', url: ''}],
  status: '',
  suffix: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    birthday: '',
    company_id: '',
    company_name: '',
    created_at: '',
    current_balance: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    department: '',
    description: '',
    email_domain: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_call_at: '',
    first_email_at: '',
    first_name: '',
    gender: '',
    id: '',
    image: '',
    language: '',
    last_activity_at: '',
    last_name: '',
    lead_id: '',
    lead_source: '',
    middle_name: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    photo_url: '',
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    suffix: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  },
  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}}/crm/contacts');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  birthday: '',
  company_id: '',
  company_name: '',
  created_at: '',
  current_balance: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  department: '',
  description: '',
  email_domain: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_call_at: '',
  first_email_at: '',
  first_name: '',
  gender: '',
  id: '',
  image: '',
  language: '',
  last_activity_at: '',
  last_name: '',
  lead_id: '',
  lead_source: '',
  middle_name: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  photo_url: '',
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  suffix: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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}}/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    birthday: '',
    company_id: '',
    company_name: '',
    created_at: '',
    current_balance: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    department: '',
    description: '',
    email_domain: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_call_at: '',
    first_email_at: '',
    first_name: '',
    gender: '',
    id: '',
    image: '',
    language: '',
    last_activity_at: '',
    last_name: '',
    lead_id: '',
    lead_source: '',
    middle_name: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    photo_url: '',
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    suffix: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

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

const url = '{{baseUrl}}/crm/contacts';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","created_at":"","current_balance":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"department":"","description":"","email_domain":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_call_at":"","first_email_at":"","first_name":"","gender":"","id":"","image":"","language":"","last_activity_at":"","last_name":"","lead_id":"","lead_source":"","middle_name":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","suffix":"","tags":[],"title":"","type":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"birthday": @"",
                              @"company_id": @"",
                              @"company_name": @"",
                              @"created_at": @"",
                              @"current_balance": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"department": @"",
                              @"description": @"",
                              @"email_domain": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"fax": @"",
                              @"first_call_at": @"",
                              @"first_email_at": @"",
                              @"first_name": @"",
                              @"gender": @"",
                              @"id": @"",
                              @"image": @"",
                              @"language": @"",
                              @"last_activity_at": @"",
                              @"last_name": @"",
                              @"lead_id": @"",
                              @"lead_source": @"",
                              @"middle_name": @"",
                              @"name": @"",
                              @"owner_id": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"photo_url": @"",
                              @"prefix": @"",
                              @"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
                              @"status": @"",
                              @"suffix": @"",
                              @"tags": @[  ],
                              @"title": @"",
                              @"type": @"",
                              @"updated_at": @"",
                              @"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/contacts"]
                                                       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}}/crm/contacts" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/contacts",
  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([
    'active' => null,
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'birthday' => '',
    'company_id' => '',
    'company_name' => '',
    'created_at' => '',
    'current_balance' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'department' => '',
    'description' => '',
    'email_domain' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'fax' => '',
    'first_call_at' => '',
    'first_email_at' => '',
    'first_name' => '',
    'gender' => '',
    'id' => '',
    'image' => '',
    'language' => '',
    'last_activity_at' => '',
    'last_name' => '',
    'lead_id' => '',
    'lead_source' => '',
    'middle_name' => '',
    'name' => '',
    'owner_id' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'photo_url' => '',
    'prefix' => '',
    'social_links' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ],
    'status' => '',
    'suffix' => '',
    'tags' => [
        
    ],
    'title' => '',
    'type' => '',
    'updated_at' => '',
    'websites' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/contacts', [
  'body' => '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/contacts');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'birthday' => '',
  'company_id' => '',
  'company_name' => '',
  'created_at' => '',
  'current_balance' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'department' => '',
  'description' => '',
  'email_domain' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_call_at' => '',
  'first_email_at' => '',
  'first_name' => '',
  'gender' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_activity_at' => '',
  'last_name' => '',
  'lead_id' => '',
  'lead_source' => '',
  'middle_name' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'photo_url' => '',
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'suffix' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'birthday' => '',
  'company_id' => '',
  'company_name' => '',
  'created_at' => '',
  'current_balance' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'department' => '',
  'description' => '',
  'email_domain' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_call_at' => '',
  'first_email_at' => '',
  'first_name' => '',
  'gender' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_activity_at' => '',
  'last_name' => '',
  'lead_id' => '',
  'lead_source' => '',
  'middle_name' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'photo_url' => '',
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'suffix' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/crm/contacts');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/contacts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/contacts' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
import http.client

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

payload = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/contacts", payload, headers)

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

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

url = "{{baseUrl}}/crm/contacts"

payload = {
    "active": False,
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "birthday": "",
    "company_id": "",
    "company_name": "",
    "created_at": "",
    "current_balance": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "department": "",
    "description": "",
    "email_domain": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "fax": "",
    "first_call_at": "",
    "first_email_at": "",
    "first_name": "",
    "gender": "",
    "id": "",
    "image": "",
    "language": "",
    "last_activity_at": "",
    "last_name": "",
    "lead_id": "",
    "lead_source": "",
    "middle_name": "",
    "name": "",
    "owner_id": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "photo_url": "",
    "prefix": "",
    "social_links": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ],
    "status": "",
    "suffix": "",
    "tags": [],
    "title": "",
    "type": "",
    "updated_at": "",
    "websites": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ]
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/contacts"

payload <- "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/contacts")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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/crm/contacts') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/contacts";

    let payload = json!({
        "active": false,
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "birthday": "",
        "company_id": "",
        "company_name": "",
        "created_at": "",
        "current_balance": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "department": "",
        "description": "",
        "email_domain": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "fax": "",
        "first_call_at": "",
        "first_email_at": "",
        "first_name": "",
        "gender": "",
        "id": "",
        "image": "",
        "language": "",
        "last_activity_at": "",
        "last_name": "",
        "lead_id": "",
        "lead_source": "",
        "middle_name": "",
        "name": "",
        "owner_id": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "photo_url": "",
        "prefix": "",
        "social_links": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        ),
        "status": "",
        "suffix": "",
        "tags": (),
        "title": "",
        "type": "",
        "updated_at": "",
        "websites": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/contacts \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
echo '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/crm/contacts \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "birthday": "",\n  "company_id": "",\n  "company_name": "",\n  "created_at": "",\n  "current_balance": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "department": "",\n  "description": "",\n  "email_domain": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_call_at": "",\n  "first_email_at": "",\n  "first_name": "",\n  "gender": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_activity_at": "",\n  "last_name": "",\n  "lead_id": "",\n  "lead_source": "",\n  "middle_name": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "photo_url": "",\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "suffix": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/crm/contacts
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/contacts")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "contacts",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete contact
{{baseUrl}}/crm/contacts/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/contacts/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/contacts/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/contacts/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/contacts/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/contacts/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/contacts/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/contacts/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/contacts/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/contacts/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/contacts/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/contacts/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/contacts/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/contacts/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/contacts/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/contacts/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/contacts/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/contacts/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/contacts/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/contacts/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/contacts/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/contacts/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/contacts/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/contacts/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/contacts/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/contacts/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/contacts/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/contacts/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/contacts/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/contacts/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/contacts/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/contacts/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/contacts/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/contacts/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/contacts/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "contacts",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get contact
{{baseUrl}}/crm/contacts/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/contacts/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/contacts/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/contacts/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/contacts/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/contacts/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/contacts/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/contacts/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/contacts/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/contacts/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/contacts/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/contacts/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/contacts/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/contacts/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/contacts/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/contacts/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/contacts/:id"]
                                                       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}}/crm/contacts/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/contacts/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/contacts/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/contacts/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/contacts/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/contacts/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/contacts/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/contacts/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/contacts/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/contacts/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/contacts/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/contacts/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/contacts/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/contacts/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/contacts/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/contacts/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/contacts/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "active": true,
    "birthday": "2000-08-12",
    "company_id": "23456",
    "company_name": "23456",
    "created_at": "2017-08-12T20:43:21.291Z",
    "current_balance": 10.5,
    "department": "Engineering",
    "description": "Internal champion",
    "email_domain": "gmail.com",
    "fax": "+12129876543",
    "first_call_at": "2020-09-30T07:43:32.000Z",
    "first_email_at": "2020-09-30T07:43:32.000Z",
    "first_name": "Elon",
    "gender": "female",
    "id": "12345",
    "image": "https://unavatar.io/elon-musk",
    "language": "EN",
    "last_activity_at": "2020-09-30T07:43:32.000Z",
    "last_name": "Musk",
    "lead_id": "34567",
    "lead_source": "Cold Call",
    "middle_name": "D.",
    "name": "Elon Musk",
    "owner_id": "54321",
    "photo_url": "https://unavatar.io/elon-musk",
    "prefix": "Mr.",
    "status": "open",
    "suffix": "PhD",
    "tags": [
      "New"
    ],
    "title": "CEO",
    "type": "personal",
    "updated_at": "2017-08-12T20:43:21.291Z"
  },
  "operation": "one",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List contacts
{{baseUrl}}/crm/contacts
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/contacts");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/contacts" {:headers {:x-apideck-consumer-id ""
                                                                  :x-apideck-app-id ""
                                                                  :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/contacts"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/contacts"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/contacts");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/contacts"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/contacts HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/contacts")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/contacts"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/contacts")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/contacts")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/contacts');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/contacts';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/contacts")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/contacts');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/contacts',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/contacts';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/contacts"]
                                                       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}}/crm/contacts" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/contacts",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/contacts', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/contacts');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/contacts');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/contacts' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/contacts' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/contacts", headers=headers)

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

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

url = "{{baseUrl}}/crm/contacts"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/contacts"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/contacts")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/contacts') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/contacts";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/contacts \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/contacts \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/contacts
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/contacts")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "contacts",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update contact
{{baseUrl}}/crm/contacts/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/contacts/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");

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

(client/patch "{{baseUrl}}/crm/contacts/:id" {:headers {:x-apideck-consumer-id ""
                                                                        :x-apideck-app-id ""
                                                                        :authorization "{{apiKey}}"}
                                                              :content-type :json
                                                              :form-params {:active false
                                                                            :addresses [{:city ""
                                                                                         :contact_name ""
                                                                                         :country ""
                                                                                         :county ""
                                                                                         :email ""
                                                                                         :fax ""
                                                                                         :id ""
                                                                                         :latitude ""
                                                                                         :line1 ""
                                                                                         :line2 ""
                                                                                         :line3 ""
                                                                                         :line4 ""
                                                                                         :longitude ""
                                                                                         :name ""
                                                                                         :phone_number ""
                                                                                         :postal_code ""
                                                                                         :row_version ""
                                                                                         :salutation ""
                                                                                         :state ""
                                                                                         :street_number ""
                                                                                         :string ""
                                                                                         :type ""
                                                                                         :website ""}]
                                                                            :birthday ""
                                                                            :company_id ""
                                                                            :company_name ""
                                                                            :created_at ""
                                                                            :current_balance ""
                                                                            :custom_fields [{:description ""
                                                                                             :id ""
                                                                                             :name ""
                                                                                             :value ""}]
                                                                            :department ""
                                                                            :description ""
                                                                            :email_domain ""
                                                                            :emails [{:email ""
                                                                                      :id ""
                                                                                      :type ""}]
                                                                            :fax ""
                                                                            :first_call_at ""
                                                                            :first_email_at ""
                                                                            :first_name ""
                                                                            :gender ""
                                                                            :id ""
                                                                            :image ""
                                                                            :language ""
                                                                            :last_activity_at ""
                                                                            :last_name ""
                                                                            :lead_id ""
                                                                            :lead_source ""
                                                                            :middle_name ""
                                                                            :name ""
                                                                            :owner_id ""
                                                                            :phone_numbers [{:area_code ""
                                                                                             :country_code ""
                                                                                             :extension ""
                                                                                             :id ""
                                                                                             :number ""
                                                                                             :type ""}]
                                                                            :photo_url ""
                                                                            :prefix ""
                                                                            :social_links [{:id ""
                                                                                            :type ""
                                                                                            :url ""}]
                                                                            :status ""
                                                                            :suffix ""
                                                                            :tags []
                                                                            :title ""
                                                                            :type ""
                                                                            :updated_at ""
                                                                            :websites [{:id ""
                                                                                        :type ""
                                                                                        :url ""}]}})
require "http/client"

url = "{{baseUrl}}/crm/contacts/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\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}}/crm/contacts/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/contacts/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/contacts/:id"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/contacts/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1641

{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/contacts/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/contacts/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/contacts/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/contacts/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  birthday: '',
  company_id: '',
  company_name: '',
  created_at: '',
  current_balance: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  department: '',
  description: '',
  email_domain: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_call_at: '',
  first_email_at: '',
  first_name: '',
  gender: '',
  id: '',
  image: '',
  language: '',
  last_activity_at: '',
  last_name: '',
  lead_id: '',
  lead_source: '',
  middle_name: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  photo_url: '',
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  suffix: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/contacts/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    birthday: '',
    company_id: '',
    company_name: '',
    created_at: '',
    current_balance: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    department: '',
    description: '',
    email_domain: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_call_at: '',
    first_email_at: '',
    first_name: '',
    gender: '',
    id: '',
    image: '',
    language: '',
    last_activity_at: '',
    last_name: '',
    lead_id: '',
    lead_source: '',
    middle_name: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    photo_url: '',
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    suffix: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/contacts/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","created_at":"","current_balance":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"department":"","description":"","email_domain":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_call_at":"","first_email_at":"","first_name":"","gender":"","id":"","image":"","language":"","last_activity_at":"","last_name":"","lead_id":"","lead_source":"","middle_name":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","suffix":"","tags":[],"title":"","type":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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}}/crm/contacts/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "birthday": "",\n  "company_id": "",\n  "company_name": "",\n  "created_at": "",\n  "current_balance": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "department": "",\n  "description": "",\n  "email_domain": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_call_at": "",\n  "first_email_at": "",\n  "first_name": "",\n  "gender": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_activity_at": "",\n  "last_name": "",\n  "lead_id": "",\n  "lead_source": "",\n  "middle_name": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "photo_url": "",\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "suffix": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\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  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/contacts/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  active: false,
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  birthday: '',
  company_id: '',
  company_name: '',
  created_at: '',
  current_balance: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  department: '',
  description: '',
  email_domain: '',
  emails: [{email: '', id: '', type: ''}],
  fax: '',
  first_call_at: '',
  first_email_at: '',
  first_name: '',
  gender: '',
  id: '',
  image: '',
  language: '',
  last_activity_at: '',
  last_name: '',
  lead_id: '',
  lead_source: '',
  middle_name: '',
  name: '',
  owner_id: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  photo_url: '',
  prefix: '',
  social_links: [{id: '', type: '', url: ''}],
  status: '',
  suffix: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    birthday: '',
    company_id: '',
    company_name: '',
    created_at: '',
    current_balance: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    department: '',
    description: '',
    email_domain: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_call_at: '',
    first_email_at: '',
    first_name: '',
    gender: '',
    id: '',
    image: '',
    language: '',
    last_activity_at: '',
    last_name: '',
    lead_id: '',
    lead_source: '',
    middle_name: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    photo_url: '',
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    suffix: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  },
  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}}/crm/contacts/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  birthday: '',
  company_id: '',
  company_name: '',
  created_at: '',
  current_balance: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  department: '',
  description: '',
  email_domain: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_call_at: '',
  first_email_at: '',
  first_name: '',
  gender: '',
  id: '',
  image: '',
  language: '',
  last_activity_at: '',
  last_name: '',
  lead_id: '',
  lead_source: '',
  middle_name: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  photo_url: '',
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  suffix: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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}}/crm/contacts/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    birthday: '',
    company_id: '',
    company_name: '',
    created_at: '',
    current_balance: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    department: '',
    description: '',
    email_domain: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_call_at: '',
    first_email_at: '',
    first_name: '',
    gender: '',
    id: '',
    image: '',
    language: '',
    last_activity_at: '',
    last_name: '',
    lead_id: '',
    lead_source: '',
    middle_name: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    photo_url: '',
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    suffix: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

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

const url = '{{baseUrl}}/crm/contacts/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"birthday":"","company_id":"","company_name":"","created_at":"","current_balance":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"department":"","description":"","email_domain":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_call_at":"","first_email_at":"","first_name":"","gender":"","id":"","image":"","language":"","last_activity_at":"","last_name":"","lead_id":"","lead_source":"","middle_name":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"photo_url":"","prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","suffix":"","tags":[],"title":"","type":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"birthday": @"",
                              @"company_id": @"",
                              @"company_name": @"",
                              @"created_at": @"",
                              @"current_balance": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"department": @"",
                              @"description": @"",
                              @"email_domain": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"fax": @"",
                              @"first_call_at": @"",
                              @"first_email_at": @"",
                              @"first_name": @"",
                              @"gender": @"",
                              @"id": @"",
                              @"image": @"",
                              @"language": @"",
                              @"last_activity_at": @"",
                              @"last_name": @"",
                              @"lead_id": @"",
                              @"lead_source": @"",
                              @"middle_name": @"",
                              @"name": @"",
                              @"owner_id": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"photo_url": @"",
                              @"prefix": @"",
                              @"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
                              @"status": @"",
                              @"suffix": @"",
                              @"tags": @[  ],
                              @"title": @"",
                              @"type": @"",
                              @"updated_at": @"",
                              @"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/contacts/:id"]
                                                       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}}/crm/contacts/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/contacts/:id",
  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([
    'active' => null,
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'birthday' => '',
    'company_id' => '',
    'company_name' => '',
    'created_at' => '',
    'current_balance' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'department' => '',
    'description' => '',
    'email_domain' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'fax' => '',
    'first_call_at' => '',
    'first_email_at' => '',
    'first_name' => '',
    'gender' => '',
    'id' => '',
    'image' => '',
    'language' => '',
    'last_activity_at' => '',
    'last_name' => '',
    'lead_id' => '',
    'lead_source' => '',
    'middle_name' => '',
    'name' => '',
    'owner_id' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'photo_url' => '',
    'prefix' => '',
    'social_links' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ],
    'status' => '',
    'suffix' => '',
    'tags' => [
        
    ],
    'title' => '',
    'type' => '',
    'updated_at' => '',
    'websites' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/contacts/:id', [
  'body' => '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/contacts/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'birthday' => '',
  'company_id' => '',
  'company_name' => '',
  'created_at' => '',
  'current_balance' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'department' => '',
  'description' => '',
  'email_domain' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_call_at' => '',
  'first_email_at' => '',
  'first_name' => '',
  'gender' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_activity_at' => '',
  'last_name' => '',
  'lead_id' => '',
  'lead_source' => '',
  'middle_name' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'photo_url' => '',
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'suffix' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'birthday' => '',
  'company_id' => '',
  'company_name' => '',
  'created_at' => '',
  'current_balance' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'department' => '',
  'description' => '',
  'email_domain' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_call_at' => '',
  'first_email_at' => '',
  'first_name' => '',
  'gender' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_activity_at' => '',
  'last_name' => '',
  'lead_id' => '',
  'lead_source' => '',
  'middle_name' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'photo_url' => '',
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'suffix' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/crm/contacts/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/contacts/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/contacts/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
import http.client

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

payload = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/contacts/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/contacts/:id"

payload = {
    "active": False,
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "birthday": "",
    "company_id": "",
    "company_name": "",
    "created_at": "",
    "current_balance": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "department": "",
    "description": "",
    "email_domain": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "fax": "",
    "first_call_at": "",
    "first_email_at": "",
    "first_name": "",
    "gender": "",
    "id": "",
    "image": "",
    "language": "",
    "last_activity_at": "",
    "last_name": "",
    "lead_id": "",
    "lead_source": "",
    "middle_name": "",
    "name": "",
    "owner_id": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "photo_url": "",
    "prefix": "",
    "social_links": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ],
    "status": "",
    "suffix": "",
    "tags": [],
    "title": "",
    "type": "",
    "updated_at": "",
    "websites": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ]
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/contacts/:id"

payload <- "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/contacts/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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.patch('/baseUrl/crm/contacts/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"birthday\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"current_balance\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"department\": \"\",\n  \"description\": \"\",\n  \"email_domain\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_call_at\": \"\",\n  \"first_email_at\": \"\",\n  \"first_name\": \"\",\n  \"gender\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_activity_at\": \"\",\n  \"last_name\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"middle_name\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"photo_url\": \"\",\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"suffix\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\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}}/crm/contacts/:id";

    let payload = json!({
        "active": false,
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "birthday": "",
        "company_id": "",
        "company_name": "",
        "created_at": "",
        "current_balance": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "department": "",
        "description": "",
        "email_domain": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "fax": "",
        "first_call_at": "",
        "first_email_at": "",
        "first_name": "",
        "gender": "",
        "id": "",
        "image": "",
        "language": "",
        "last_activity_at": "",
        "last_name": "",
        "lead_id": "",
        "lead_source": "",
        "middle_name": "",
        "name": "",
        "owner_id": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "photo_url": "",
        "prefix": "",
        "social_links": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        ),
        "status": "",
        "suffix": "",
        "tags": (),
        "title": "",
        "type": "",
        "updated_at": "",
        "websites": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/contacts/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
echo '{
  "active": false,
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}' |  \
  http PATCH {{baseUrl}}/crm/contacts/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "birthday": "",\n  "company_id": "",\n  "company_name": "",\n  "created_at": "",\n  "current_balance": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "department": "",\n  "description": "",\n  "email_domain": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_call_at": "",\n  "first_email_at": "",\n  "first_name": "",\n  "gender": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_activity_at": "",\n  "last_name": "",\n  "lead_id": "",\n  "lead_source": "",\n  "middle_name": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "photo_url": "",\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "suffix": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/crm/contacts/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "birthday": "",
  "company_id": "",
  "company_name": "",
  "created_at": "",
  "current_balance": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "department": "",
  "description": "",
  "email_domain": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "fax": "",
  "first_call_at": "",
  "first_email_at": "",
  "first_name": "",
  "gender": "",
  "id": "",
  "image": "",
  "language": "",
  "last_activity_at": "",
  "last_name": "",
  "lead_id": "",
  "lead_source": "",
  "middle_name": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "photo_url": "",
  "prefix": "",
  "social_links": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ],
  "status": "",
  "suffix": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "websites": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/contacts/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "contacts",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create lead
{{baseUrl}}/crm/leads
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/leads");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");

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

(client/post "{{baseUrl}}/crm/leads" {:headers {:x-apideck-consumer-id ""
                                                                :x-apideck-app-id ""
                                                                :authorization "{{apiKey}}"}
                                                      :content-type :json
                                                      :form-params {:addresses [{:city ""
                                                                                 :contact_name ""
                                                                                 :country ""
                                                                                 :county ""
                                                                                 :email ""
                                                                                 :fax ""
                                                                                 :id ""
                                                                                 :latitude ""
                                                                                 :line1 ""
                                                                                 :line2 ""
                                                                                 :line3 ""
                                                                                 :line4 ""
                                                                                 :longitude ""
                                                                                 :name ""
                                                                                 :phone_number ""
                                                                                 :postal_code ""
                                                                                 :row_version ""
                                                                                 :salutation ""
                                                                                 :state ""
                                                                                 :street_number ""
                                                                                 :string ""
                                                                                 :type ""
                                                                                 :website ""}]
                                                                    :company_id ""
                                                                    :company_name ""
                                                                    :contact_id ""
                                                                    :created_at ""
                                                                    :currency ""
                                                                    :custom_fields [{:description ""
                                                                                     :id ""
                                                                                     :name ""
                                                                                     :value ""}]
                                                                    :description ""
                                                                    :emails [{:email ""
                                                                              :id ""
                                                                              :type ""}]
                                                                    :fax ""
                                                                    :first_name ""
                                                                    :id ""
                                                                    :language ""
                                                                    :last_name ""
                                                                    :lead_source ""
                                                                    :monetary_amount ""
                                                                    :name ""
                                                                    :owner_id ""
                                                                    :phone_numbers [{:area_code ""
                                                                                     :country_code ""
                                                                                     :extension ""
                                                                                     :id ""
                                                                                     :number ""
                                                                                     :type ""}]
                                                                    :prefix ""
                                                                    :social_links [{:id ""
                                                                                    :type ""
                                                                                    :url ""}]
                                                                    :status ""
                                                                    :tags []
                                                                    :title ""
                                                                    :updated_at ""
                                                                    :websites [{:id ""
                                                                                :type ""
                                                                                :url ""}]}})
require "http/client"

url = "{{baseUrl}}/crm/leads"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/leads"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/leads");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/leads"

	payload := strings.NewReader("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/leads HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1409

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/leads")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/leads"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/leads")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/leads")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_id: '',
  company_name: '',
  contact_id: '',
  created_at: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  language: '',
  last_name: '',
  lead_source: '',
  monetary_amount: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  title: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/leads');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_id: '',
    company_name: '',
    contact_id: '',
    created_at: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    language: '',
    last_name: '',
    lead_source: '',
    monetary_amount: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    title: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/leads';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_id":"","company_name":"","contact_id":"","created_at":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","language":"","last_name":"","lead_source":"","monetary_amount":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"title":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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}}/crm/leads',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "created_at": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "language": "",\n  "last_name": "",\n  "lead_source": "",\n  "monetary_amount": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "title": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\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  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/leads")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_id: '',
  company_name: '',
  contact_id: '',
  created_at: '',
  currency: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  description: '',
  emails: [{email: '', id: '', type: ''}],
  fax: '',
  first_name: '',
  id: '',
  language: '',
  last_name: '',
  lead_source: '',
  monetary_amount: '',
  name: '',
  owner_id: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  prefix: '',
  social_links: [{id: '', type: '', url: ''}],
  status: '',
  tags: [],
  title: '',
  updated_at: '',
  websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_id: '',
    company_name: '',
    contact_id: '',
    created_at: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    language: '',
    last_name: '',
    lead_source: '',
    monetary_amount: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    title: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  },
  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}}/crm/leads');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_id: '',
  company_name: '',
  contact_id: '',
  created_at: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  language: '',
  last_name: '',
  lead_source: '',
  monetary_amount: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  title: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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}}/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_id: '',
    company_name: '',
    contact_id: '',
    created_at: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    language: '',
    last_name: '',
    lead_source: '',
    monetary_amount: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    title: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

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

const url = '{{baseUrl}}/crm/leads';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_id":"","company_name":"","contact_id":"","created_at":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","language":"","last_name":"","lead_source":"","monetary_amount":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"title":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"company_id": @"",
                              @"company_name": @"",
                              @"contact_id": @"",
                              @"created_at": @"",
                              @"currency": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"description": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"fax": @"",
                              @"first_name": @"",
                              @"id": @"",
                              @"language": @"",
                              @"last_name": @"",
                              @"lead_source": @"",
                              @"monetary_amount": @"",
                              @"name": @"",
                              @"owner_id": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"prefix": @"",
                              @"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
                              @"status": @"",
                              @"tags": @[  ],
                              @"title": @"",
                              @"updated_at": @"",
                              @"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/leads"]
                                                       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}}/crm/leads" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/leads",
  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([
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'company_id' => '',
    'company_name' => '',
    'contact_id' => '',
    'created_at' => '',
    'currency' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'description' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'fax' => '',
    'first_name' => '',
    'id' => '',
    'language' => '',
    'last_name' => '',
    'lead_source' => '',
    'monetary_amount' => '',
    'name' => '',
    'owner_id' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'prefix' => '',
    'social_links' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ],
    'status' => '',
    'tags' => [
        
    ],
    'title' => '',
    'updated_at' => '',
    'websites' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/leads', [
  'body' => '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/leads');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'created_at' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'language' => '',
  'last_name' => '',
  'lead_source' => '',
  'monetary_amount' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'title' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'created_at' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'language' => '',
  'last_name' => '',
  'lead_source' => '',
  'monetary_amount' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'title' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/crm/leads');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/leads' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/leads' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
import http.client

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

payload = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/leads", payload, headers)

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

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

url = "{{baseUrl}}/crm/leads"

payload = {
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "company_id": "",
    "company_name": "",
    "contact_id": "",
    "created_at": "",
    "currency": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "description": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "fax": "",
    "first_name": "",
    "id": "",
    "language": "",
    "last_name": "",
    "lead_source": "",
    "monetary_amount": "",
    "name": "",
    "owner_id": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "prefix": "",
    "social_links": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ],
    "status": "",
    "tags": [],
    "title": "",
    "updated_at": "",
    "websites": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ]
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/leads"

payload <- "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/leads")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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/crm/leads') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/leads";

    let payload = json!({
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "company_id": "",
        "company_name": "",
        "contact_id": "",
        "created_at": "",
        "currency": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "description": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "fax": "",
        "first_name": "",
        "id": "",
        "language": "",
        "last_name": "",
        "lead_source": "",
        "monetary_amount": "",
        "name": "",
        "owner_id": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "prefix": "",
        "social_links": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        ),
        "status": "",
        "tags": (),
        "title": "",
        "updated_at": "",
        "websites": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/leads \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
echo '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}' |  \
  http POST {{baseUrl}}/crm/leads \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "created_at": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "language": "",\n  "last_name": "",\n  "lead_source": "",\n  "monetary_amount": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "title": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/crm/leads
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "description": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "prefix": "",
  "social_links": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/leads")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete lead
{{baseUrl}}/crm/leads/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/leads/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/leads/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/leads/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/leads/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/leads/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/leads/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/leads/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/leads/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/leads/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/leads/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/leads/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/leads/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/leads/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/leads/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/leads/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/leads/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/leads/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/leads/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/leads/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/leads/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/leads/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/leads/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/leads/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/leads/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/leads/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/leads/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/leads/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/leads/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/leads/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/leads/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/leads/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/leads/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/leads/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/leads/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get lead
{{baseUrl}}/crm/leads/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/leads/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/leads/:id" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/leads/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/leads/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/leads/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/leads/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/leads/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/leads/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/leads/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/leads/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/leads/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/leads/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/leads/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/leads/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/leads/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/leads/:id"]
                                                       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}}/crm/leads/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/leads/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/leads/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/leads/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/leads/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/leads/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/leads/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/leads/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/leads/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/leads/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/leads/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/leads/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/leads/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/leads/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/leads/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/leads/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/leads/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "company_id": "2",
    "company_name": "Spacex",
    "contact_id": "2",
    "created_at": "2020-09-30T07:43:32.000Z",
    "currency": "USD",
    "description": "A thinker",
    "fax": "+12129876543",
    "first_name": "Elon",
    "id": "12345",
    "language": "EN",
    "last_name": "Musk",
    "lead_source": "Cold Call",
    "monetary_amount": 75000,
    "name": "Elon Musk",
    "owner_id": "54321",
    "prefix": "Sir",
    "status": "New",
    "tags": [
      "New"
    ],
    "title": "CEO",
    "updated_at": "2020-09-30T07:43:32.000Z"
  },
  "operation": "one",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List leads
{{baseUrl}}/crm/leads
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/leads");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/leads" {:headers {:x-apideck-consumer-id ""
                                                               :x-apideck-app-id ""
                                                               :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/leads"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/leads"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/leads");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/leads"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/leads HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/leads")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/leads"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/leads")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/leads")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/leads');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/leads';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/leads")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/leads');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/leads',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/leads';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/leads"]
                                                       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}}/crm/leads" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/leads",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/leads', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/leads');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/leads');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/leads' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/leads' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/leads", headers=headers)

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

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

url = "{{baseUrl}}/crm/leads"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/leads"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/leads")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/leads') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/leads";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/leads \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/leads \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/leads
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/leads")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update lead
{{baseUrl}}/crm/leads/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/leads/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");

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

(client/patch "{{baseUrl}}/crm/leads/:id" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}
                                                           :content-type :json
                                                           :form-params {:addresses [{:city ""
                                                                                      :contact_name ""
                                                                                      :country ""
                                                                                      :county ""
                                                                                      :email ""
                                                                                      :fax ""
                                                                                      :id ""
                                                                                      :latitude ""
                                                                                      :line1 ""
                                                                                      :line2 ""
                                                                                      :line3 ""
                                                                                      :line4 ""
                                                                                      :longitude ""
                                                                                      :name ""
                                                                                      :phone_number ""
                                                                                      :postal_code ""
                                                                                      :row_version ""
                                                                                      :salutation ""
                                                                                      :state ""
                                                                                      :street_number ""
                                                                                      :string ""
                                                                                      :type ""
                                                                                      :website ""}]
                                                                         :company_id ""
                                                                         :company_name ""
                                                                         :contact_id ""
                                                                         :created_at ""
                                                                         :currency ""
                                                                         :custom_fields [{:description ""
                                                                                          :id ""
                                                                                          :name ""
                                                                                          :value ""}]
                                                                         :description ""
                                                                         :emails [{:email ""
                                                                                   :id ""
                                                                                   :type ""}]
                                                                         :fax ""
                                                                         :first_name ""
                                                                         :id ""
                                                                         :language ""
                                                                         :last_name ""
                                                                         :lead_source ""
                                                                         :monetary_amount ""
                                                                         :name ""
                                                                         :owner_id ""
                                                                         :phone_numbers [{:area_code ""
                                                                                          :country_code ""
                                                                                          :extension ""
                                                                                          :id ""
                                                                                          :number ""
                                                                                          :type ""}]
                                                                         :prefix ""
                                                                         :social_links [{:id ""
                                                                                         :type ""
                                                                                         :url ""}]
                                                                         :status ""
                                                                         :tags []
                                                                         :title ""
                                                                         :updated_at ""
                                                                         :websites [{:id ""
                                                                                     :type ""
                                                                                     :url ""}]}})
require "http/client"

url = "{{baseUrl}}/crm/leads/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\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}}/crm/leads/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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}}/crm/leads/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/leads/:id"

	payload := strings.NewReader("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/leads/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1409

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/leads/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/leads/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/leads/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/leads/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
  .asString();
const data = JSON.stringify({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_id: '',
  company_name: '',
  contact_id: '',
  created_at: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  language: '',
  last_name: '',
  lead_source: '',
  monetary_amount: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  title: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/leads/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_id: '',
    company_name: '',
    contact_id: '',
    created_at: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    language: '',
    last_name: '',
    lead_source: '',
    monetary_amount: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    title: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/leads/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_id":"","company_name":"","contact_id":"","created_at":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","language":"","last_name":"","lead_source":"","monetary_amount":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"title":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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}}/crm/leads/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "created_at": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "language": "",\n  "last_name": "",\n  "lead_source": "",\n  "monetary_amount": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "title": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\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  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/leads/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_id: '',
  company_name: '',
  contact_id: '',
  created_at: '',
  currency: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  description: '',
  emails: [{email: '', id: '', type: ''}],
  fax: '',
  first_name: '',
  id: '',
  language: '',
  last_name: '',
  lead_source: '',
  monetary_amount: '',
  name: '',
  owner_id: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  prefix: '',
  social_links: [{id: '', type: '', url: ''}],
  status: '',
  tags: [],
  title: '',
  updated_at: '',
  websites: [{id: '', type: '', url: ''}]
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_id: '',
    company_name: '',
    contact_id: '',
    created_at: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    language: '',
    last_name: '',
    lead_source: '',
    monetary_amount: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    title: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  },
  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}}/crm/leads/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_id: '',
  company_name: '',
  contact_id: '',
  created_at: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  description: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  fax: '',
  first_name: '',
  id: '',
  language: '',
  last_name: '',
  lead_source: '',
  monetary_amount: '',
  name: '',
  owner_id: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  prefix: '',
  social_links: [
    {
      id: '',
      type: '',
      url: ''
    }
  ],
  status: '',
  tags: [],
  title: '',
  updated_at: '',
  websites: [
    {
      id: '',
      type: '',
      url: ''
    }
  ]
});

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}}/crm/leads/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_id: '',
    company_name: '',
    contact_id: '',
    created_at: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    description: '',
    emails: [{email: '', id: '', type: ''}],
    fax: '',
    first_name: '',
    id: '',
    language: '',
    last_name: '',
    lead_source: '',
    monetary_amount: '',
    name: '',
    owner_id: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    prefix: '',
    social_links: [{id: '', type: '', url: ''}],
    status: '',
    tags: [],
    title: '',
    updated_at: '',
    websites: [{id: '', type: '', url: ''}]
  }
};

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

const url = '{{baseUrl}}/crm/leads/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_id":"","company_name":"","contact_id":"","created_at":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"description":"","emails":[{"email":"","id":"","type":""}],"fax":"","first_name":"","id":"","language":"","last_name":"","lead_source":"","monetary_amount":"","name":"","owner_id":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"prefix":"","social_links":[{"id":"","type":"","url":""}],"status":"","tags":[],"title":"","updated_at":"","websites":[{"id":"","type":"","url":""}]}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"company_id": @"",
                              @"company_name": @"",
                              @"contact_id": @"",
                              @"created_at": @"",
                              @"currency": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"description": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"fax": @"",
                              @"first_name": @"",
                              @"id": @"",
                              @"language": @"",
                              @"last_name": @"",
                              @"lead_source": @"",
                              @"monetary_amount": @"",
                              @"name": @"",
                              @"owner_id": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"prefix": @"",
                              @"social_links": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ],
                              @"status": @"",
                              @"tags": @[  ],
                              @"title": @"",
                              @"updated_at": @"",
                              @"websites": @[ @{ @"id": @"", @"type": @"", @"url": @"" } ] };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/leads/:id"]
                                                       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}}/crm/leads/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/leads/:id",
  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([
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'company_id' => '',
    'company_name' => '',
    'contact_id' => '',
    'created_at' => '',
    'currency' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'description' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'fax' => '',
    'first_name' => '',
    'id' => '',
    'language' => '',
    'last_name' => '',
    'lead_source' => '',
    'monetary_amount' => '',
    'name' => '',
    'owner_id' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'prefix' => '',
    'social_links' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ],
    'status' => '',
    'tags' => [
        
    ],
    'title' => '',
    'updated_at' => '',
    'websites' => [
        [
                'id' => '',
                'type' => '',
                'url' => ''
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/leads/:id', [
  'body' => '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/leads/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'created_at' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'language' => '',
  'last_name' => '',
  'lead_source' => '',
  'monetary_amount' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'title' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'created_at' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'description' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'fax' => '',
  'first_name' => '',
  'id' => '',
  'language' => '',
  'last_name' => '',
  'lead_source' => '',
  'monetary_amount' => '',
  'name' => '',
  'owner_id' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'prefix' => '',
  'social_links' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ],
  'status' => '',
  'tags' => [
    
  ],
  'title' => '',
  'updated_at' => '',
  'websites' => [
    [
        'id' => '',
        'type' => '',
        'url' => ''
    ]
  ]
]));
$request->setRequestUrl('{{baseUrl}}/crm/leads/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/leads/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/leads/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
import http.client

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

payload = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/leads/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/leads/:id"

payload = {
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "company_id": "",
    "company_name": "",
    "contact_id": "",
    "created_at": "",
    "currency": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "description": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "fax": "",
    "first_name": "",
    "id": "",
    "language": "",
    "last_name": "",
    "lead_source": "",
    "monetary_amount": "",
    "name": "",
    "owner_id": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "prefix": "",
    "social_links": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ],
    "status": "",
    "tags": [],
    "title": "",
    "updated_at": "",
    "websites": [
        {
            "id": "",
            "type": "",
            "url": ""
        }
    ]
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/leads/:id"

payload <- "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/leads/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\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.patch('/baseUrl/crm/leads/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"description\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"fax\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"lead_source\": \"\",\n  \"monetary_amount\": \"\",\n  \"name\": \"\",\n  \"owner_id\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"prefix\": \"\",\n  \"social_links\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"websites\": [\n    {\n      \"id\": \"\",\n      \"type\": \"\",\n      \"url\": \"\"\n    }\n  ]\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}}/crm/leads/:id";

    let payload = json!({
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "company_id": "",
        "company_name": "",
        "contact_id": "",
        "created_at": "",
        "currency": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "description": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "fax": "",
        "first_name": "",
        "id": "",
        "language": "",
        "last_name": "",
        "lead_source": "",
        "monetary_amount": "",
        "name": "",
        "owner_id": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "prefix": "",
        "social_links": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        ),
        "status": "",
        "tags": (),
        "title": "",
        "updated_at": "",
        "websites": (
            json!({
                "id": "",
                "type": "",
                "url": ""
            })
        )
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/leads/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}'
echo '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "description": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "prefix": "",
  "social_links": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    {
      "id": "",
      "type": "",
      "url": ""
    }
  ]
}' |  \
  http PATCH {{baseUrl}}/crm/leads/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "created_at": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "description": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "fax": "",\n  "first_name": "",\n  "id": "",\n  "language": "",\n  "last_name": "",\n  "lead_source": "",\n  "monetary_amount": "",\n  "name": "",\n  "owner_id": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "prefix": "",\n  "social_links": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ],\n  "status": "",\n  "tags": [],\n  "title": "",\n  "updated_at": "",\n  "websites": [\n    {\n      "id": "",\n      "type": "",\n      "url": ""\n    }\n  ]\n}' \
  --output-document \
  - {{baseUrl}}/crm/leads/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "created_at": "",
  "currency": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "description": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "fax": "",
  "first_name": "",
  "id": "",
  "language": "",
  "last_name": "",
  "lead_source": "",
  "monetary_amount": "",
  "name": "",
  "owner_id": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "prefix": "",
  "social_links": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ],
  "status": "",
  "tags": [],
  "title": "",
  "updated_at": "",
  "websites": [
    [
      "id": "",
      "type": "",
      "url": ""
    ]
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/leads/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create note
{{baseUrl}}/crm/notes
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/notes");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

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

(client/post "{{baseUrl}}/crm/notes" {:headers {:x-apideck-consumer-id ""
                                                                :x-apideck-app-id ""
                                                                :authorization "{{apiKey}}"}
                                                      :content-type :json
                                                      :form-params {:active false
                                                                    :company_id ""
                                                                    :contact_id ""
                                                                    :content ""
                                                                    :created_at ""
                                                                    :created_by ""
                                                                    :id ""
                                                                    :lead_id ""
                                                                    :opportunity_id ""
                                                                    :owner_id ""
                                                                    :title ""
                                                                    :updated_at ""
                                                                    :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/crm/notes"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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}}/crm/notes"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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}}/crm/notes");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/notes"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/notes HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 244

{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/notes")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/notes"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/notes")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/notes")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  company_id: '',
  contact_id: '',
  content: '',
  created_at: '',
  created_by: '',
  id: '',
  lead_id: '',
  opportunity_id: '',
  owner_id: '',
  title: '',
  updated_at: '',
  updated_by: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/notes');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    company_id: '',
    contact_id: '',
    content: '',
    created_at: '',
    created_by: '',
    id: '',
    lead_id: '',
    opportunity_id: '',
    owner_id: '',
    title: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/notes';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"company_id":"","contact_id":"","content":"","created_at":"","created_by":"","id":"","lead_id":"","opportunity_id":"","owner_id":"","title":"","updated_at":"","updated_by":""}'
};

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}}/crm/notes',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "company_id": "",\n  "contact_id": "",\n  "content": "",\n  "created_at": "",\n  "created_by": "",\n  "id": "",\n  "lead_id": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "title": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/notes")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  active: false,
  company_id: '',
  contact_id: '',
  content: '',
  created_at: '',
  created_by: '',
  id: '',
  lead_id: '',
  opportunity_id: '',
  owner_id: '',
  title: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    company_id: '',
    contact_id: '',
    content: '',
    created_at: '',
    created_by: '',
    id: '',
    lead_id: '',
    opportunity_id: '',
    owner_id: '',
    title: '',
    updated_at: '',
    updated_by: ''
  },
  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}}/crm/notes');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  company_id: '',
  contact_id: '',
  content: '',
  created_at: '',
  created_by: '',
  id: '',
  lead_id: '',
  opportunity_id: '',
  owner_id: '',
  title: '',
  updated_at: '',
  updated_by: ''
});

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}}/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    company_id: '',
    contact_id: '',
    content: '',
    created_at: '',
    created_by: '',
    id: '',
    lead_id: '',
    opportunity_id: '',
    owner_id: '',
    title: '',
    updated_at: '',
    updated_by: ''
  }
};

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

const url = '{{baseUrl}}/crm/notes';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"company_id":"","contact_id":"","content":"","created_at":"","created_by":"","id":"","lead_id":"","opportunity_id":"","owner_id":"","title":"","updated_at":"","updated_by":""}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"company_id": @"",
                              @"contact_id": @"",
                              @"content": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"id": @"",
                              @"lead_id": @"",
                              @"opportunity_id": @"",
                              @"owner_id": @"",
                              @"title": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/notes"]
                                                       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}}/crm/notes" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/notes",
  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([
    'active' => null,
    'company_id' => '',
    'contact_id' => '',
    'content' => '',
    'created_at' => '',
    'created_by' => '',
    'id' => '',
    'lead_id' => '',
    'opportunity_id' => '',
    'owner_id' => '',
    'title' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/notes', [
  'body' => '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/notes');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'company_id' => '',
  'contact_id' => '',
  'content' => '',
  'created_at' => '',
  'created_by' => '',
  'id' => '',
  'lead_id' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'title' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'company_id' => '',
  'contact_id' => '',
  'content' => '',
  'created_at' => '',
  'created_by' => '',
  'id' => '',
  'lead_id' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'title' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/notes');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/notes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/notes' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

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

payload = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/notes", payload, headers)

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

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

url = "{{baseUrl}}/crm/notes"

payload = {
    "active": False,
    "company_id": "",
    "contact_id": "",
    "content": "",
    "created_at": "",
    "created_by": "",
    "id": "",
    "lead_id": "",
    "opportunity_id": "",
    "owner_id": "",
    "title": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/notes"

payload <- "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/notes")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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/crm/notes') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/notes";

    let payload = json!({
        "active": false,
        "company_id": "",
        "contact_id": "",
        "content": "",
        "created_at": "",
        "created_by": "",
        "id": "",
        "lead_id": "",
        "opportunity_id": "",
        "owner_id": "",
        "title": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/notes \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http POST {{baseUrl}}/crm/notes \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "company_id": "",\n  "contact_id": "",\n  "content": "",\n  "created_at": "",\n  "created_by": "",\n  "id": "",\n  "lead_id": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "title": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/notes
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/notes")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "notes",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete note
{{baseUrl}}/crm/notes/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/notes/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/notes/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/notes/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/notes/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/notes/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/notes/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/notes/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/notes/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/notes/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/notes/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/notes/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/notes/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/notes/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/notes/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/notes/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/notes/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/notes/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/notes/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/notes/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/notes/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/notes/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/notes/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/notes/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/notes/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/notes/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/notes/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/notes/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/notes/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/notes/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/notes/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/notes/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/notes/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/notes/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/notes/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "notes",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get note
{{baseUrl}}/crm/notes/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/notes/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/notes/:id" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/notes/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/notes/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/notes/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/notes/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/notes/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/notes/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/notes/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/notes/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/notes/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/notes/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/notes/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/notes/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/notes/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/notes/:id"]
                                                       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}}/crm/notes/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/notes/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/notes/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/notes/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/notes/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/notes/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/notes/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/notes/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/notes/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/notes/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/notes/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/notes/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/notes/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/notes/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/notes/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/notes/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/notes/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "active": true,
    "company_id": "12345",
    "contact_id": "12345",
    "content": "Office hours are 9AM-6PM",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "id": "12345",
    "lead_id": "12345",
    "opportunity_id": "12345",
    "owner_id": "12345",
    "title": "Meeting Notes",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345"
  },
  "operation": "one",
  "resource": "notes",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List notes
{{baseUrl}}/crm/notes
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/notes");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/notes" {:headers {:x-apideck-consumer-id ""
                                                               :x-apideck-app-id ""
                                                               :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/notes"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/notes"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/notes");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/notes"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/notes HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/notes")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/notes"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/notes")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/notes")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/notes');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/notes';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/notes")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/notes');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/notes',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/notes';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/notes"]
                                                       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}}/crm/notes" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/notes",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/notes', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/notes');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/notes');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/notes' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/notes' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/notes", headers=headers)

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

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

url = "{{baseUrl}}/crm/notes"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/notes"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/notes")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/notes') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/notes";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/notes \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/notes \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/notes
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/notes")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "notes",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update note
{{baseUrl}}/crm/notes/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/notes/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");

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

(client/patch "{{baseUrl}}/crm/notes/:id" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}
                                                           :content-type :json
                                                           :form-params {:active false
                                                                         :company_id ""
                                                                         :contact_id ""
                                                                         :content ""
                                                                         :created_at ""
                                                                         :created_by ""
                                                                         :id ""
                                                                         :lead_id ""
                                                                         :opportunity_id ""
                                                                         :owner_id ""
                                                                         :title ""
                                                                         :updated_at ""
                                                                         :updated_by ""}})
require "http/client"

url = "{{baseUrl}}/crm/notes/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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}}/crm/notes/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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}}/crm/notes/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/notes/:id"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/notes/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 244

{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/notes/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/notes/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/notes/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/notes/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  company_id: '',
  contact_id: '',
  content: '',
  created_at: '',
  created_by: '',
  id: '',
  lead_id: '',
  opportunity_id: '',
  owner_id: '',
  title: '',
  updated_at: '',
  updated_by: ''
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/notes/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    company_id: '',
    contact_id: '',
    content: '',
    created_at: '',
    created_by: '',
    id: '',
    lead_id: '',
    opportunity_id: '',
    owner_id: '',
    title: '',
    updated_at: '',
    updated_by: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/notes/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"company_id":"","contact_id":"","content":"","created_at":"","created_by":"","id":"","lead_id":"","opportunity_id":"","owner_id":"","title":"","updated_at":"","updated_by":""}'
};

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}}/crm/notes/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "company_id": "",\n  "contact_id": "",\n  "content": "",\n  "created_at": "",\n  "created_by": "",\n  "id": "",\n  "lead_id": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "title": "",\n  "updated_at": "",\n  "updated_by": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/notes/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  active: false,
  company_id: '',
  contact_id: '',
  content: '',
  created_at: '',
  created_by: '',
  id: '',
  lead_id: '',
  opportunity_id: '',
  owner_id: '',
  title: '',
  updated_at: '',
  updated_by: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    company_id: '',
    contact_id: '',
    content: '',
    created_at: '',
    created_by: '',
    id: '',
    lead_id: '',
    opportunity_id: '',
    owner_id: '',
    title: '',
    updated_at: '',
    updated_by: ''
  },
  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}}/crm/notes/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  company_id: '',
  contact_id: '',
  content: '',
  created_at: '',
  created_by: '',
  id: '',
  lead_id: '',
  opportunity_id: '',
  owner_id: '',
  title: '',
  updated_at: '',
  updated_by: ''
});

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}}/crm/notes/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    company_id: '',
    contact_id: '',
    content: '',
    created_at: '',
    created_by: '',
    id: '',
    lead_id: '',
    opportunity_id: '',
    owner_id: '',
    title: '',
    updated_at: '',
    updated_by: ''
  }
};

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

const url = '{{baseUrl}}/crm/notes/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"company_id":"","contact_id":"","content":"","created_at":"","created_by":"","id":"","lead_id":"","opportunity_id":"","owner_id":"","title":"","updated_at":"","updated_by":""}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"company_id": @"",
                              @"contact_id": @"",
                              @"content": @"",
                              @"created_at": @"",
                              @"created_by": @"",
                              @"id": @"",
                              @"lead_id": @"",
                              @"opportunity_id": @"",
                              @"owner_id": @"",
                              @"title": @"",
                              @"updated_at": @"",
                              @"updated_by": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/notes/:id"]
                                                       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}}/crm/notes/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/notes/:id",
  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([
    'active' => null,
    'company_id' => '',
    'contact_id' => '',
    'content' => '',
    'created_at' => '',
    'created_by' => '',
    'id' => '',
    'lead_id' => '',
    'opportunity_id' => '',
    'owner_id' => '',
    'title' => '',
    'updated_at' => '',
    'updated_by' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/notes/:id', [
  'body' => '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/notes/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'company_id' => '',
  'contact_id' => '',
  'content' => '',
  'created_at' => '',
  'created_by' => '',
  'id' => '',
  'lead_id' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'title' => '',
  'updated_at' => '',
  'updated_by' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'company_id' => '',
  'contact_id' => '',
  'content' => '',
  'created_at' => '',
  'created_by' => '',
  'id' => '',
  'lead_id' => '',
  'opportunity_id' => '',
  'owner_id' => '',
  'title' => '',
  'updated_at' => '',
  'updated_by' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/notes/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/notes/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/notes/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}'
import http.client

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

payload = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/notes/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/notes/:id"

payload = {
    "active": False,
    "company_id": "",
    "contact_id": "",
    "content": "",
    "created_at": "",
    "created_by": "",
    "id": "",
    "lead_id": "",
    "opportunity_id": "",
    "owner_id": "",
    "title": "",
    "updated_at": "",
    "updated_by": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/notes/:id"

payload <- "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/notes/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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/crm/notes/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"company_id\": \"\",\n  \"contact_id\": \"\",\n  \"content\": \"\",\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"id\": \"\",\n  \"lead_id\": \"\",\n  \"opportunity_id\": \"\",\n  \"owner_id\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\"\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}}/crm/notes/:id";

    let payload = json!({
        "active": false,
        "company_id": "",
        "contact_id": "",
        "content": "",
        "created_at": "",
        "created_by": "",
        "id": "",
        "lead_id": "",
        "opportunity_id": "",
        "owner_id": "",
        "title": "",
        "updated_at": "",
        "updated_by": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/notes/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}'
echo '{
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
}' |  \
  http PATCH {{baseUrl}}/crm/notes/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "company_id": "",\n  "contact_id": "",\n  "content": "",\n  "created_at": "",\n  "created_by": "",\n  "id": "",\n  "lead_id": "",\n  "opportunity_id": "",\n  "owner_id": "",\n  "title": "",\n  "updated_at": "",\n  "updated_by": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/notes/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "company_id": "",
  "contact_id": "",
  "content": "",
  "created_at": "",
  "created_by": "",
  "id": "",
  "lead_id": "",
  "opportunity_id": "",
  "owner_id": "",
  "title": "",
  "updated_at": "",
  "updated_by": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/notes/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "notes",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create opportunity
{{baseUrl}}/crm/opportunities
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/opportunities");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}");

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

(client/post "{{baseUrl}}/crm/opportunities" {:headers {:x-apideck-consumer-id ""
                                                                        :x-apideck-app-id ""
                                                                        :authorization "{{apiKey}}"}
                                                              :content-type :json
                                                              :form-params {:close_date ""
                                                                            :company_id ""
                                                                            :company_name ""
                                                                            :contact_id ""
                                                                            :contact_ids []
                                                                            :created_at ""
                                                                            :created_by ""
                                                                            :currency ""
                                                                            :custom_fields [{:description ""
                                                                                             :id ""
                                                                                             :name ""
                                                                                             :value ""}]
                                                                            :date_last_contacted ""
                                                                            :date_lead_created ""
                                                                            :date_stage_changed ""
                                                                            :deleted false
                                                                            :description ""
                                                                            :expected_revenue ""
                                                                            :id ""
                                                                            :interaction_count ""
                                                                            :last_activity_at ""
                                                                            :lead_id ""
                                                                            :lead_source ""
                                                                            :loss_reason ""
                                                                            :loss_reason_id ""
                                                                            :monetary_amount ""
                                                                            :owner_id ""
                                                                            :pipeline_id ""
                                                                            :pipeline_stage_id ""
                                                                            :primary_contact_id ""
                                                                            :priority ""
                                                                            :source_id ""
                                                                            :stage_last_changed_at ""
                                                                            :status ""
                                                                            :status_id ""
                                                                            :tags []
                                                                            :title ""
                                                                            :type ""
                                                                            :updated_at ""
                                                                            :updated_by ""
                                                                            :win_probability ""
                                                                            :won_reason ""
                                                                            :won_reason_id ""}})
require "http/client"

url = "{{baseUrl}}/crm/opportunities"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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}}/crm/opportunities"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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}}/crm/opportunities");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/opportunities"

	payload := strings.NewReader("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/opportunities HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 950

{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/opportunities")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/opportunities"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/opportunities")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/opportunities")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  close_date: '',
  company_id: '',
  company_name: '',
  contact_id: '',
  contact_ids: [],
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  date_last_contacted: '',
  date_lead_created: '',
  date_stage_changed: '',
  deleted: false,
  description: '',
  expected_revenue: '',
  id: '',
  interaction_count: '',
  last_activity_at: '',
  lead_id: '',
  lead_source: '',
  loss_reason: '',
  loss_reason_id: '',
  monetary_amount: '',
  owner_id: '',
  pipeline_id: '',
  pipeline_stage_id: '',
  primary_contact_id: '',
  priority: '',
  source_id: '',
  stage_last_changed_at: '',
  status: '',
  status_id: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  win_probability: '',
  won_reason: '',
  won_reason_id: ''
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/opportunities');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    close_date: '',
    company_id: '',
    company_name: '',
    contact_id: '',
    contact_ids: [],
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    date_last_contacted: '',
    date_lead_created: '',
    date_stage_changed: '',
    deleted: false,
    description: '',
    expected_revenue: '',
    id: '',
    interaction_count: '',
    last_activity_at: '',
    lead_id: '',
    lead_source: '',
    loss_reason: '',
    loss_reason_id: '',
    monetary_amount: '',
    owner_id: '',
    pipeline_id: '',
    pipeline_stage_id: '',
    primary_contact_id: '',
    priority: '',
    source_id: '',
    stage_last_changed_at: '',
    status: '',
    status_id: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    win_probability: '',
    won_reason: '',
    won_reason_id: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/opportunities';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"close_date":"","company_id":"","company_name":"","contact_id":"","contact_ids":[],"created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"date_last_contacted":"","date_lead_created":"","date_stage_changed":"","deleted":false,"description":"","expected_revenue":"","id":"","interaction_count":"","last_activity_at":"","lead_id":"","lead_source":"","loss_reason":"","loss_reason_id":"","monetary_amount":"","owner_id":"","pipeline_id":"","pipeline_stage_id":"","primary_contact_id":"","priority":"","source_id":"","stage_last_changed_at":"","status":"","status_id":"","tags":[],"title":"","type":"","updated_at":"","updated_by":"","win_probability":"","won_reason":"","won_reason_id":""}'
};

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}}/crm/opportunities',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "close_date": "",\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "contact_ids": [],\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "date_last_contacted": "",\n  "date_lead_created": "",\n  "date_stage_changed": "",\n  "deleted": false,\n  "description": "",\n  "expected_revenue": "",\n  "id": "",\n  "interaction_count": "",\n  "last_activity_at": "",\n  "lead_id": "",\n  "lead_source": "",\n  "loss_reason": "",\n  "loss_reason_id": "",\n  "monetary_amount": "",\n  "owner_id": "",\n  "pipeline_id": "",\n  "pipeline_stage_id": "",\n  "primary_contact_id": "",\n  "priority": "",\n  "source_id": "",\n  "stage_last_changed_at": "",\n  "status": "",\n  "status_id": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "win_probability": "",\n  "won_reason": "",\n  "won_reason_id": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/opportunities")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  close_date: '',
  company_id: '',
  company_name: '',
  contact_id: '',
  contact_ids: [],
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  date_last_contacted: '',
  date_lead_created: '',
  date_stage_changed: '',
  deleted: false,
  description: '',
  expected_revenue: '',
  id: '',
  interaction_count: '',
  last_activity_at: '',
  lead_id: '',
  lead_source: '',
  loss_reason: '',
  loss_reason_id: '',
  monetary_amount: '',
  owner_id: '',
  pipeline_id: '',
  pipeline_stage_id: '',
  primary_contact_id: '',
  priority: '',
  source_id: '',
  stage_last_changed_at: '',
  status: '',
  status_id: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  win_probability: '',
  won_reason: '',
  won_reason_id: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    close_date: '',
    company_id: '',
    company_name: '',
    contact_id: '',
    contact_ids: [],
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    date_last_contacted: '',
    date_lead_created: '',
    date_stage_changed: '',
    deleted: false,
    description: '',
    expected_revenue: '',
    id: '',
    interaction_count: '',
    last_activity_at: '',
    lead_id: '',
    lead_source: '',
    loss_reason: '',
    loss_reason_id: '',
    monetary_amount: '',
    owner_id: '',
    pipeline_id: '',
    pipeline_stage_id: '',
    primary_contact_id: '',
    priority: '',
    source_id: '',
    stage_last_changed_at: '',
    status: '',
    status_id: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    win_probability: '',
    won_reason: '',
    won_reason_id: ''
  },
  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}}/crm/opportunities');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  close_date: '',
  company_id: '',
  company_name: '',
  contact_id: '',
  contact_ids: [],
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  date_last_contacted: '',
  date_lead_created: '',
  date_stage_changed: '',
  deleted: false,
  description: '',
  expected_revenue: '',
  id: '',
  interaction_count: '',
  last_activity_at: '',
  lead_id: '',
  lead_source: '',
  loss_reason: '',
  loss_reason_id: '',
  monetary_amount: '',
  owner_id: '',
  pipeline_id: '',
  pipeline_stage_id: '',
  primary_contact_id: '',
  priority: '',
  source_id: '',
  stage_last_changed_at: '',
  status: '',
  status_id: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  win_probability: '',
  won_reason: '',
  won_reason_id: ''
});

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}}/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    close_date: '',
    company_id: '',
    company_name: '',
    contact_id: '',
    contact_ids: [],
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    date_last_contacted: '',
    date_lead_created: '',
    date_stage_changed: '',
    deleted: false,
    description: '',
    expected_revenue: '',
    id: '',
    interaction_count: '',
    last_activity_at: '',
    lead_id: '',
    lead_source: '',
    loss_reason: '',
    loss_reason_id: '',
    monetary_amount: '',
    owner_id: '',
    pipeline_id: '',
    pipeline_stage_id: '',
    primary_contact_id: '',
    priority: '',
    source_id: '',
    stage_last_changed_at: '',
    status: '',
    status_id: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    win_probability: '',
    won_reason: '',
    won_reason_id: ''
  }
};

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

const url = '{{baseUrl}}/crm/opportunities';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"close_date":"","company_id":"","company_name":"","contact_id":"","contact_ids":[],"created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"date_last_contacted":"","date_lead_created":"","date_stage_changed":"","deleted":false,"description":"","expected_revenue":"","id":"","interaction_count":"","last_activity_at":"","lead_id":"","lead_source":"","loss_reason":"","loss_reason_id":"","monetary_amount":"","owner_id":"","pipeline_id":"","pipeline_stage_id":"","primary_contact_id":"","priority":"","source_id":"","stage_last_changed_at":"","status":"","status_id":"","tags":[],"title":"","type":"","updated_at":"","updated_by":"","win_probability":"","won_reason":"","won_reason_id":""}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"close_date": @"",
                              @"company_id": @"",
                              @"company_name": @"",
                              @"contact_id": @"",
                              @"contact_ids": @[  ],
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"date_last_contacted": @"",
                              @"date_lead_created": @"",
                              @"date_stage_changed": @"",
                              @"deleted": @NO,
                              @"description": @"",
                              @"expected_revenue": @"",
                              @"id": @"",
                              @"interaction_count": @"",
                              @"last_activity_at": @"",
                              @"lead_id": @"",
                              @"lead_source": @"",
                              @"loss_reason": @"",
                              @"loss_reason_id": @"",
                              @"monetary_amount": @"",
                              @"owner_id": @"",
                              @"pipeline_id": @"",
                              @"pipeline_stage_id": @"",
                              @"primary_contact_id": @"",
                              @"priority": @"",
                              @"source_id": @"",
                              @"stage_last_changed_at": @"",
                              @"status": @"",
                              @"status_id": @"",
                              @"tags": @[  ],
                              @"title": @"",
                              @"type": @"",
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"win_probability": @"",
                              @"won_reason": @"",
                              @"won_reason_id": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/opportunities"]
                                                       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}}/crm/opportunities" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/opportunities",
  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([
    'close_date' => '',
    'company_id' => '',
    'company_name' => '',
    'contact_id' => '',
    'contact_ids' => [
        
    ],
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'date_last_contacted' => '',
    'date_lead_created' => '',
    'date_stage_changed' => '',
    'deleted' => null,
    'description' => '',
    'expected_revenue' => '',
    'id' => '',
    'interaction_count' => '',
    'last_activity_at' => '',
    'lead_id' => '',
    'lead_source' => '',
    'loss_reason' => '',
    'loss_reason_id' => '',
    'monetary_amount' => '',
    'owner_id' => '',
    'pipeline_id' => '',
    'pipeline_stage_id' => '',
    'primary_contact_id' => '',
    'priority' => '',
    'source_id' => '',
    'stage_last_changed_at' => '',
    'status' => '',
    'status_id' => '',
    'tags' => [
        
    ],
    'title' => '',
    'type' => '',
    'updated_at' => '',
    'updated_by' => '',
    'win_probability' => '',
    'won_reason' => '',
    'won_reason_id' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/opportunities', [
  'body' => '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/opportunities');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'close_date' => '',
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'contact_ids' => [
    
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'date_last_contacted' => '',
  'date_lead_created' => '',
  'date_stage_changed' => '',
  'deleted' => null,
  'description' => '',
  'expected_revenue' => '',
  'id' => '',
  'interaction_count' => '',
  'last_activity_at' => '',
  'lead_id' => '',
  'lead_source' => '',
  'loss_reason' => '',
  'loss_reason_id' => '',
  'monetary_amount' => '',
  'owner_id' => '',
  'pipeline_id' => '',
  'pipeline_stage_id' => '',
  'primary_contact_id' => '',
  'priority' => '',
  'source_id' => '',
  'stage_last_changed_at' => '',
  'status' => '',
  'status_id' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'win_probability' => '',
  'won_reason' => '',
  'won_reason_id' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'close_date' => '',
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'contact_ids' => [
    
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'date_last_contacted' => '',
  'date_lead_created' => '',
  'date_stage_changed' => '',
  'deleted' => null,
  'description' => '',
  'expected_revenue' => '',
  'id' => '',
  'interaction_count' => '',
  'last_activity_at' => '',
  'lead_id' => '',
  'lead_source' => '',
  'loss_reason' => '',
  'loss_reason_id' => '',
  'monetary_amount' => '',
  'owner_id' => '',
  'pipeline_id' => '',
  'pipeline_stage_id' => '',
  'primary_contact_id' => '',
  'priority' => '',
  'source_id' => '',
  'stage_last_changed_at' => '',
  'status' => '',
  'status_id' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'win_probability' => '',
  'won_reason' => '',
  'won_reason_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/opportunities');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/opportunities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/opportunities' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}'
import http.client

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

payload = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/opportunities", payload, headers)

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

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

url = "{{baseUrl}}/crm/opportunities"

payload = {
    "close_date": "",
    "company_id": "",
    "company_name": "",
    "contact_id": "",
    "contact_ids": [],
    "created_at": "",
    "created_by": "",
    "currency": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "date_last_contacted": "",
    "date_lead_created": "",
    "date_stage_changed": "",
    "deleted": False,
    "description": "",
    "expected_revenue": "",
    "id": "",
    "interaction_count": "",
    "last_activity_at": "",
    "lead_id": "",
    "lead_source": "",
    "loss_reason": "",
    "loss_reason_id": "",
    "monetary_amount": "",
    "owner_id": "",
    "pipeline_id": "",
    "pipeline_stage_id": "",
    "primary_contact_id": "",
    "priority": "",
    "source_id": "",
    "stage_last_changed_at": "",
    "status": "",
    "status_id": "",
    "tags": [],
    "title": "",
    "type": "",
    "updated_at": "",
    "updated_by": "",
    "win_probability": "",
    "won_reason": "",
    "won_reason_id": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/opportunities"

payload <- "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/opportunities")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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/crm/opportunities') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/opportunities";

    let payload = json!({
        "close_date": "",
        "company_id": "",
        "company_name": "",
        "contact_id": "",
        "contact_ids": (),
        "created_at": "",
        "created_by": "",
        "currency": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "date_last_contacted": "",
        "date_lead_created": "",
        "date_stage_changed": "",
        "deleted": false,
        "description": "",
        "expected_revenue": "",
        "id": "",
        "interaction_count": "",
        "last_activity_at": "",
        "lead_id": "",
        "lead_source": "",
        "loss_reason": "",
        "loss_reason_id": "",
        "monetary_amount": "",
        "owner_id": "",
        "pipeline_id": "",
        "pipeline_stage_id": "",
        "primary_contact_id": "",
        "priority": "",
        "source_id": "",
        "stage_last_changed_at": "",
        "status": "",
        "status_id": "",
        "tags": (),
        "title": "",
        "type": "",
        "updated_at": "",
        "updated_by": "",
        "win_probability": "",
        "won_reason": "",
        "won_reason_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/opportunities \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}'
echo '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}' |  \
  http POST {{baseUrl}}/crm/opportunities \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "close_date": "",\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "contact_ids": [],\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "date_last_contacted": "",\n  "date_lead_created": "",\n  "date_stage_changed": "",\n  "deleted": false,\n  "description": "",\n  "expected_revenue": "",\n  "id": "",\n  "interaction_count": "",\n  "last_activity_at": "",\n  "lead_id": "",\n  "lead_source": "",\n  "loss_reason": "",\n  "loss_reason_id": "",\n  "monetary_amount": "",\n  "owner_id": "",\n  "pipeline_id": "",\n  "pipeline_stage_id": "",\n  "primary_contact_id": "",\n  "priority": "",\n  "source_id": "",\n  "stage_last_changed_at": "",\n  "status": "",\n  "status_id": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "win_probability": "",\n  "won_reason": "",\n  "won_reason_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/opportunities
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/opportunities")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "opportunities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete opportunity
{{baseUrl}}/crm/opportunities/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/opportunities/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/opportunities/:id" {:headers {:x-apideck-consumer-id ""
                                                                              :x-apideck-app-id ""
                                                                              :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/opportunities/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/opportunities/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/opportunities/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/opportunities/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/opportunities/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/opportunities/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/opportunities/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/opportunities/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/opportunities/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/opportunities/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/opportunities/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/opportunities/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/opportunities/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/opportunities/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/opportunities/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/opportunities/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/opportunities/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/opportunities/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/opportunities/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/opportunities/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/opportunities/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/opportunities/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/opportunities/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/opportunities/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/opportunities/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/opportunities/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/opportunities/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/opportunities/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/opportunities/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/opportunities/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/opportunities/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/opportunities/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get opportunity
{{baseUrl}}/crm/opportunities/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/opportunities/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/opportunities/:id" {:headers {:x-apideck-consumer-id ""
                                                                           :x-apideck-app-id ""
                                                                           :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/opportunities/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/opportunities/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/opportunities/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/opportunities/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/opportunities/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/opportunities/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/opportunities/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/opportunities/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/opportunities/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/opportunities/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/opportunities/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/opportunities/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/opportunities/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/opportunities/:id"]
                                                       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}}/crm/opportunities/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/opportunities/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/opportunities/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/opportunities/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/opportunities/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/opportunities/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/opportunities/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/opportunities/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/opportunities/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/opportunities/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/opportunities/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/opportunities/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/opportunities/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/opportunities/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/opportunities/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/opportunities/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/opportunities/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "close_date": "2020-10-30",
    "company_id": "12345",
    "company_name": "Copper",
    "contact_id": "12345",
    "created_at": "2020-09-30T07:43:32.000Z",
    "created_by": "12345",
    "currency": "USD",
    "date_last_contacted": "2020-09-30T00:00:00.000Z",
    "date_lead_created": "2020-09-30T00:00:00.000Z",
    "date_stage_changed": "2020-09-30T00:00:00.000Z",
    "deleted": false,
    "description": "Opportunities are created for People and Companies that are interested in buying your products or services. Create Opportunities for People and Companies to move them through one of your Pipelines.",
    "expected_revenue": 75000,
    "id": "12345",
    "interaction_count": 0,
    "last_activity_at": "2020-09-30T07:43:32.000Z",
    "lead_id": "12345",
    "lead_source": "Website",
    "loss_reason": "No budget",
    "loss_reason_id": "12345",
    "monetary_amount": 75000,
    "owner_id": "12345",
    "pipeline_id": "12345",
    "pipeline_stage_id": "12345",
    "primary_contact_id": "12345",
    "priority": "None",
    "source_id": "12345",
    "stage_last_changed_at": "2020-09-30T07:43:32.000Z",
    "status": "Open",
    "status_id": "12345",
    "tags": [
      "New"
    ],
    "title": "New Rocket",
    "type": "Existing Customer - Upgrade",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "updated_by": "12345",
    "win_probability": 40,
    "won_reason": "Best pitch",
    "won_reason_id": "12345"
  },
  "operation": "one",
  "resource": "opportunities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List opportunities
{{baseUrl}}/crm/opportunities
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/opportunities");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/opportunities" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/opportunities"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/opportunities"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/opportunities");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/opportunities"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/opportunities HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/opportunities")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/opportunities"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/opportunities")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/opportunities")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/opportunities');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/opportunities';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/opportunities")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/opportunities');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/opportunities',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/opportunities';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/opportunities"]
                                                       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}}/crm/opportunities" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/opportunities",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/opportunities', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/opportunities');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/opportunities');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/opportunities' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/opportunities' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/opportunities", headers=headers)

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

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

url = "{{baseUrl}}/crm/opportunities"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/opportunities"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/opportunities")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/opportunities') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/opportunities";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/opportunities \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/opportunities \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/opportunities
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/opportunities")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "opportunities",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update opportunity
{{baseUrl}}/crm/opportunities/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/opportunities/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}");

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

(client/patch "{{baseUrl}}/crm/opportunities/:id" {:headers {:x-apideck-consumer-id ""
                                                                             :x-apideck-app-id ""
                                                                             :authorization "{{apiKey}}"}
                                                                   :content-type :json
                                                                   :form-params {:close_date ""
                                                                                 :company_id ""
                                                                                 :company_name ""
                                                                                 :contact_id ""
                                                                                 :contact_ids []
                                                                                 :created_at ""
                                                                                 :created_by ""
                                                                                 :currency ""
                                                                                 :custom_fields [{:description ""
                                                                                                  :id ""
                                                                                                  :name ""
                                                                                                  :value ""}]
                                                                                 :date_last_contacted ""
                                                                                 :date_lead_created ""
                                                                                 :date_stage_changed ""
                                                                                 :deleted false
                                                                                 :description ""
                                                                                 :expected_revenue ""
                                                                                 :id ""
                                                                                 :interaction_count ""
                                                                                 :last_activity_at ""
                                                                                 :lead_id ""
                                                                                 :lead_source ""
                                                                                 :loss_reason ""
                                                                                 :loss_reason_id ""
                                                                                 :monetary_amount ""
                                                                                 :owner_id ""
                                                                                 :pipeline_id ""
                                                                                 :pipeline_stage_id ""
                                                                                 :primary_contact_id ""
                                                                                 :priority ""
                                                                                 :source_id ""
                                                                                 :stage_last_changed_at ""
                                                                                 :status ""
                                                                                 :status_id ""
                                                                                 :tags []
                                                                                 :title ""
                                                                                 :type ""
                                                                                 :updated_at ""
                                                                                 :updated_by ""
                                                                                 :win_probability ""
                                                                                 :won_reason ""
                                                                                 :won_reason_id ""}})
require "http/client"

url = "{{baseUrl}}/crm/opportunities/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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}}/crm/opportunities/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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}}/crm/opportunities/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/opportunities/:id"

	payload := strings.NewReader("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/opportunities/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 950

{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/opportunities/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/opportunities/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/opportunities/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/opportunities/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  close_date: '',
  company_id: '',
  company_name: '',
  contact_id: '',
  contact_ids: [],
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  date_last_contacted: '',
  date_lead_created: '',
  date_stage_changed: '',
  deleted: false,
  description: '',
  expected_revenue: '',
  id: '',
  interaction_count: '',
  last_activity_at: '',
  lead_id: '',
  lead_source: '',
  loss_reason: '',
  loss_reason_id: '',
  monetary_amount: '',
  owner_id: '',
  pipeline_id: '',
  pipeline_stage_id: '',
  primary_contact_id: '',
  priority: '',
  source_id: '',
  stage_last_changed_at: '',
  status: '',
  status_id: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  win_probability: '',
  won_reason: '',
  won_reason_id: ''
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/opportunities/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    close_date: '',
    company_id: '',
    company_name: '',
    contact_id: '',
    contact_ids: [],
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    date_last_contacted: '',
    date_lead_created: '',
    date_stage_changed: '',
    deleted: false,
    description: '',
    expected_revenue: '',
    id: '',
    interaction_count: '',
    last_activity_at: '',
    lead_id: '',
    lead_source: '',
    loss_reason: '',
    loss_reason_id: '',
    monetary_amount: '',
    owner_id: '',
    pipeline_id: '',
    pipeline_stage_id: '',
    primary_contact_id: '',
    priority: '',
    source_id: '',
    stage_last_changed_at: '',
    status: '',
    status_id: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    win_probability: '',
    won_reason: '',
    won_reason_id: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/opportunities/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"close_date":"","company_id":"","company_name":"","contact_id":"","contact_ids":[],"created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"date_last_contacted":"","date_lead_created":"","date_stage_changed":"","deleted":false,"description":"","expected_revenue":"","id":"","interaction_count":"","last_activity_at":"","lead_id":"","lead_source":"","loss_reason":"","loss_reason_id":"","monetary_amount":"","owner_id":"","pipeline_id":"","pipeline_stage_id":"","primary_contact_id":"","priority":"","source_id":"","stage_last_changed_at":"","status":"","status_id":"","tags":[],"title":"","type":"","updated_at":"","updated_by":"","win_probability":"","won_reason":"","won_reason_id":""}'
};

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}}/crm/opportunities/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "close_date": "",\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "contact_ids": [],\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "date_last_contacted": "",\n  "date_lead_created": "",\n  "date_stage_changed": "",\n  "deleted": false,\n  "description": "",\n  "expected_revenue": "",\n  "id": "",\n  "interaction_count": "",\n  "last_activity_at": "",\n  "lead_id": "",\n  "lead_source": "",\n  "loss_reason": "",\n  "loss_reason_id": "",\n  "monetary_amount": "",\n  "owner_id": "",\n  "pipeline_id": "",\n  "pipeline_stage_id": "",\n  "primary_contact_id": "",\n  "priority": "",\n  "source_id": "",\n  "stage_last_changed_at": "",\n  "status": "",\n  "status_id": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "win_probability": "",\n  "won_reason": "",\n  "won_reason_id": ""\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/opportunities/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  close_date: '',
  company_id: '',
  company_name: '',
  contact_id: '',
  contact_ids: [],
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [{description: '', id: '', name: '', value: ''}],
  date_last_contacted: '',
  date_lead_created: '',
  date_stage_changed: '',
  deleted: false,
  description: '',
  expected_revenue: '',
  id: '',
  interaction_count: '',
  last_activity_at: '',
  lead_id: '',
  lead_source: '',
  loss_reason: '',
  loss_reason_id: '',
  monetary_amount: '',
  owner_id: '',
  pipeline_id: '',
  pipeline_stage_id: '',
  primary_contact_id: '',
  priority: '',
  source_id: '',
  stage_last_changed_at: '',
  status: '',
  status_id: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  win_probability: '',
  won_reason: '',
  won_reason_id: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    close_date: '',
    company_id: '',
    company_name: '',
    contact_id: '',
    contact_ids: [],
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    date_last_contacted: '',
    date_lead_created: '',
    date_stage_changed: '',
    deleted: false,
    description: '',
    expected_revenue: '',
    id: '',
    interaction_count: '',
    last_activity_at: '',
    lead_id: '',
    lead_source: '',
    loss_reason: '',
    loss_reason_id: '',
    monetary_amount: '',
    owner_id: '',
    pipeline_id: '',
    pipeline_stage_id: '',
    primary_contact_id: '',
    priority: '',
    source_id: '',
    stage_last_changed_at: '',
    status: '',
    status_id: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    win_probability: '',
    won_reason: '',
    won_reason_id: ''
  },
  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}}/crm/opportunities/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  close_date: '',
  company_id: '',
  company_name: '',
  contact_id: '',
  contact_ids: [],
  created_at: '',
  created_by: '',
  currency: '',
  custom_fields: [
    {
      description: '',
      id: '',
      name: '',
      value: ''
    }
  ],
  date_last_contacted: '',
  date_lead_created: '',
  date_stage_changed: '',
  deleted: false,
  description: '',
  expected_revenue: '',
  id: '',
  interaction_count: '',
  last_activity_at: '',
  lead_id: '',
  lead_source: '',
  loss_reason: '',
  loss_reason_id: '',
  monetary_amount: '',
  owner_id: '',
  pipeline_id: '',
  pipeline_stage_id: '',
  primary_contact_id: '',
  priority: '',
  source_id: '',
  stage_last_changed_at: '',
  status: '',
  status_id: '',
  tags: [],
  title: '',
  type: '',
  updated_at: '',
  updated_by: '',
  win_probability: '',
  won_reason: '',
  won_reason_id: ''
});

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}}/crm/opportunities/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    close_date: '',
    company_id: '',
    company_name: '',
    contact_id: '',
    contact_ids: [],
    created_at: '',
    created_by: '',
    currency: '',
    custom_fields: [{description: '', id: '', name: '', value: ''}],
    date_last_contacted: '',
    date_lead_created: '',
    date_stage_changed: '',
    deleted: false,
    description: '',
    expected_revenue: '',
    id: '',
    interaction_count: '',
    last_activity_at: '',
    lead_id: '',
    lead_source: '',
    loss_reason: '',
    loss_reason_id: '',
    monetary_amount: '',
    owner_id: '',
    pipeline_id: '',
    pipeline_stage_id: '',
    primary_contact_id: '',
    priority: '',
    source_id: '',
    stage_last_changed_at: '',
    status: '',
    status_id: '',
    tags: [],
    title: '',
    type: '',
    updated_at: '',
    updated_by: '',
    win_probability: '',
    won_reason: '',
    won_reason_id: ''
  }
};

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

const url = '{{baseUrl}}/crm/opportunities/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"close_date":"","company_id":"","company_name":"","contact_id":"","contact_ids":[],"created_at":"","created_by":"","currency":"","custom_fields":[{"description":"","id":"","name":"","value":""}],"date_last_contacted":"","date_lead_created":"","date_stage_changed":"","deleted":false,"description":"","expected_revenue":"","id":"","interaction_count":"","last_activity_at":"","lead_id":"","lead_source":"","loss_reason":"","loss_reason_id":"","monetary_amount":"","owner_id":"","pipeline_id":"","pipeline_stage_id":"","primary_contact_id":"","priority":"","source_id":"","stage_last_changed_at":"","status":"","status_id":"","tags":[],"title":"","type":"","updated_at":"","updated_by":"","win_probability":"","won_reason":"","won_reason_id":""}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"close_date": @"",
                              @"company_id": @"",
                              @"company_name": @"",
                              @"contact_id": @"",
                              @"contact_ids": @[  ],
                              @"created_at": @"",
                              @"created_by": @"",
                              @"currency": @"",
                              @"custom_fields": @[ @{ @"description": @"", @"id": @"", @"name": @"", @"value": @"" } ],
                              @"date_last_contacted": @"",
                              @"date_lead_created": @"",
                              @"date_stage_changed": @"",
                              @"deleted": @NO,
                              @"description": @"",
                              @"expected_revenue": @"",
                              @"id": @"",
                              @"interaction_count": @"",
                              @"last_activity_at": @"",
                              @"lead_id": @"",
                              @"lead_source": @"",
                              @"loss_reason": @"",
                              @"loss_reason_id": @"",
                              @"monetary_amount": @"",
                              @"owner_id": @"",
                              @"pipeline_id": @"",
                              @"pipeline_stage_id": @"",
                              @"primary_contact_id": @"",
                              @"priority": @"",
                              @"source_id": @"",
                              @"stage_last_changed_at": @"",
                              @"status": @"",
                              @"status_id": @"",
                              @"tags": @[  ],
                              @"title": @"",
                              @"type": @"",
                              @"updated_at": @"",
                              @"updated_by": @"",
                              @"win_probability": @"",
                              @"won_reason": @"",
                              @"won_reason_id": @"" };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/opportunities/:id"]
                                                       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}}/crm/opportunities/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/opportunities/:id",
  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([
    'close_date' => '',
    'company_id' => '',
    'company_name' => '',
    'contact_id' => '',
    'contact_ids' => [
        
    ],
    'created_at' => '',
    'created_by' => '',
    'currency' => '',
    'custom_fields' => [
        [
                'description' => '',
                'id' => '',
                'name' => '',
                'value' => ''
        ]
    ],
    'date_last_contacted' => '',
    'date_lead_created' => '',
    'date_stage_changed' => '',
    'deleted' => null,
    'description' => '',
    'expected_revenue' => '',
    'id' => '',
    'interaction_count' => '',
    'last_activity_at' => '',
    'lead_id' => '',
    'lead_source' => '',
    'loss_reason' => '',
    'loss_reason_id' => '',
    'monetary_amount' => '',
    'owner_id' => '',
    'pipeline_id' => '',
    'pipeline_stage_id' => '',
    'primary_contact_id' => '',
    'priority' => '',
    'source_id' => '',
    'stage_last_changed_at' => '',
    'status' => '',
    'status_id' => '',
    'tags' => [
        
    ],
    'title' => '',
    'type' => '',
    'updated_at' => '',
    'updated_by' => '',
    'win_probability' => '',
    'won_reason' => '',
    'won_reason_id' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/opportunities/:id', [
  'body' => '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/opportunities/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'close_date' => '',
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'contact_ids' => [
    
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'date_last_contacted' => '',
  'date_lead_created' => '',
  'date_stage_changed' => '',
  'deleted' => null,
  'description' => '',
  'expected_revenue' => '',
  'id' => '',
  'interaction_count' => '',
  'last_activity_at' => '',
  'lead_id' => '',
  'lead_source' => '',
  'loss_reason' => '',
  'loss_reason_id' => '',
  'monetary_amount' => '',
  'owner_id' => '',
  'pipeline_id' => '',
  'pipeline_stage_id' => '',
  'primary_contact_id' => '',
  'priority' => '',
  'source_id' => '',
  'stage_last_changed_at' => '',
  'status' => '',
  'status_id' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'win_probability' => '',
  'won_reason' => '',
  'won_reason_id' => ''
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'close_date' => '',
  'company_id' => '',
  'company_name' => '',
  'contact_id' => '',
  'contact_ids' => [
    
  ],
  'created_at' => '',
  'created_by' => '',
  'currency' => '',
  'custom_fields' => [
    [
        'description' => '',
        'id' => '',
        'name' => '',
        'value' => ''
    ]
  ],
  'date_last_contacted' => '',
  'date_lead_created' => '',
  'date_stage_changed' => '',
  'deleted' => null,
  'description' => '',
  'expected_revenue' => '',
  'id' => '',
  'interaction_count' => '',
  'last_activity_at' => '',
  'lead_id' => '',
  'lead_source' => '',
  'loss_reason' => '',
  'loss_reason_id' => '',
  'monetary_amount' => '',
  'owner_id' => '',
  'pipeline_id' => '',
  'pipeline_stage_id' => '',
  'primary_contact_id' => '',
  'priority' => '',
  'source_id' => '',
  'stage_last_changed_at' => '',
  'status' => '',
  'status_id' => '',
  'tags' => [
    
  ],
  'title' => '',
  'type' => '',
  'updated_at' => '',
  'updated_by' => '',
  'win_probability' => '',
  'won_reason' => '',
  'won_reason_id' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/opportunities/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/opportunities/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/opportunities/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}'
import http.client

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

payload = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/opportunities/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/opportunities/:id"

payload = {
    "close_date": "",
    "company_id": "",
    "company_name": "",
    "contact_id": "",
    "contact_ids": [],
    "created_at": "",
    "created_by": "",
    "currency": "",
    "custom_fields": [
        {
            "description": "",
            "id": "",
            "name": "",
            "value": ""
        }
    ],
    "date_last_contacted": "",
    "date_lead_created": "",
    "date_stage_changed": "",
    "deleted": False,
    "description": "",
    "expected_revenue": "",
    "id": "",
    "interaction_count": "",
    "last_activity_at": "",
    "lead_id": "",
    "lead_source": "",
    "loss_reason": "",
    "loss_reason_id": "",
    "monetary_amount": "",
    "owner_id": "",
    "pipeline_id": "",
    "pipeline_stage_id": "",
    "primary_contact_id": "",
    "priority": "",
    "source_id": "",
    "stage_last_changed_at": "",
    "status": "",
    "status_id": "",
    "tags": [],
    "title": "",
    "type": "",
    "updated_at": "",
    "updated_by": "",
    "win_probability": "",
    "won_reason": "",
    "won_reason_id": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/opportunities/:id"

payload <- "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/opportunities/:id")

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

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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/crm/opportunities/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"close_date\": \"\",\n  \"company_id\": \"\",\n  \"company_name\": \"\",\n  \"contact_id\": \"\",\n  \"contact_ids\": [],\n  \"created_at\": \"\",\n  \"created_by\": \"\",\n  \"currency\": \"\",\n  \"custom_fields\": [\n    {\n      \"description\": \"\",\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\"\n    }\n  ],\n  \"date_last_contacted\": \"\",\n  \"date_lead_created\": \"\",\n  \"date_stage_changed\": \"\",\n  \"deleted\": false,\n  \"description\": \"\",\n  \"expected_revenue\": \"\",\n  \"id\": \"\",\n  \"interaction_count\": \"\",\n  \"last_activity_at\": \"\",\n  \"lead_id\": \"\",\n  \"lead_source\": \"\",\n  \"loss_reason\": \"\",\n  \"loss_reason_id\": \"\",\n  \"monetary_amount\": \"\",\n  \"owner_id\": \"\",\n  \"pipeline_id\": \"\",\n  \"pipeline_stage_id\": \"\",\n  \"primary_contact_id\": \"\",\n  \"priority\": \"\",\n  \"source_id\": \"\",\n  \"stage_last_changed_at\": \"\",\n  \"status\": \"\",\n  \"status_id\": \"\",\n  \"tags\": [],\n  \"title\": \"\",\n  \"type\": \"\",\n  \"updated_at\": \"\",\n  \"updated_by\": \"\",\n  \"win_probability\": \"\",\n  \"won_reason\": \"\",\n  \"won_reason_id\": \"\"\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}}/crm/opportunities/:id";

    let payload = json!({
        "close_date": "",
        "company_id": "",
        "company_name": "",
        "contact_id": "",
        "contact_ids": (),
        "created_at": "",
        "created_by": "",
        "currency": "",
        "custom_fields": (
            json!({
                "description": "",
                "id": "",
                "name": "",
                "value": ""
            })
        ),
        "date_last_contacted": "",
        "date_lead_created": "",
        "date_stage_changed": "",
        "deleted": false,
        "description": "",
        "expected_revenue": "",
        "id": "",
        "interaction_count": "",
        "last_activity_at": "",
        "lead_id": "",
        "lead_source": "",
        "loss_reason": "",
        "loss_reason_id": "",
        "monetary_amount": "",
        "owner_id": "",
        "pipeline_id": "",
        "pipeline_stage_id": "",
        "primary_contact_id": "",
        "priority": "",
        "source_id": "",
        "stage_last_changed_at": "",
        "status": "",
        "status_id": "",
        "tags": (),
        "title": "",
        "type": "",
        "updated_at": "",
        "updated_by": "",
        "win_probability": "",
        "won_reason": "",
        "won_reason_id": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/opportunities/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}'
echo '{
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    {
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    }
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
}' |  \
  http PATCH {{baseUrl}}/crm/opportunities/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "close_date": "",\n  "company_id": "",\n  "company_name": "",\n  "contact_id": "",\n  "contact_ids": [],\n  "created_at": "",\n  "created_by": "",\n  "currency": "",\n  "custom_fields": [\n    {\n      "description": "",\n      "id": "",\n      "name": "",\n      "value": ""\n    }\n  ],\n  "date_last_contacted": "",\n  "date_lead_created": "",\n  "date_stage_changed": "",\n  "deleted": false,\n  "description": "",\n  "expected_revenue": "",\n  "id": "",\n  "interaction_count": "",\n  "last_activity_at": "",\n  "lead_id": "",\n  "lead_source": "",\n  "loss_reason": "",\n  "loss_reason_id": "",\n  "monetary_amount": "",\n  "owner_id": "",\n  "pipeline_id": "",\n  "pipeline_stage_id": "",\n  "primary_contact_id": "",\n  "priority": "",\n  "source_id": "",\n  "stage_last_changed_at": "",\n  "status": "",\n  "status_id": "",\n  "tags": [],\n  "title": "",\n  "type": "",\n  "updated_at": "",\n  "updated_by": "",\n  "win_probability": "",\n  "won_reason": "",\n  "won_reason_id": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/opportunities/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "close_date": "",
  "company_id": "",
  "company_name": "",
  "contact_id": "",
  "contact_ids": [],
  "created_at": "",
  "created_by": "",
  "currency": "",
  "custom_fields": [
    [
      "description": "",
      "id": "",
      "name": "",
      "value": ""
    ]
  ],
  "date_last_contacted": "",
  "date_lead_created": "",
  "date_stage_changed": "",
  "deleted": false,
  "description": "",
  "expected_revenue": "",
  "id": "",
  "interaction_count": "",
  "last_activity_at": "",
  "lead_id": "",
  "lead_source": "",
  "loss_reason": "",
  "loss_reason_id": "",
  "monetary_amount": "",
  "owner_id": "",
  "pipeline_id": "",
  "pipeline_stage_id": "",
  "primary_contact_id": "",
  "priority": "",
  "source_id": "",
  "stage_last_changed_at": "",
  "status": "",
  "status_id": "",
  "tags": [],
  "title": "",
  "type": "",
  "updated_at": "",
  "updated_by": "",
  "win_probability": "",
  "won_reason": "",
  "won_reason_id": ""
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/opportunities/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create pipeline
{{baseUrl}}/crm/pipelines
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/pipelines");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}");

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

(client/post "{{baseUrl}}/crm/pipelines" {:headers {:x-apideck-consumer-id ""
                                                                    :x-apideck-app-id ""
                                                                    :authorization "{{apiKey}}"}
                                                          :content-type :json
                                                          :form-params {:active false
                                                                        :archived false
                                                                        :created_at ""
                                                                        :currency ""
                                                                        :display_order 0
                                                                        :id ""
                                                                        :name ""
                                                                        :stages [{:display_order 0
                                                                                  :id ""
                                                                                  :name ""
                                                                                  :value ""
                                                                                  :win_probability 0}]
                                                                        :updated_at ""
                                                                        :win_probability_enabled false}})
require "http/client"

url = "{{baseUrl}}/crm/pipelines"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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}}/crm/pipelines"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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}}/crm/pipelines");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/pipelines"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/pipelines HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 321

{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/pipelines")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/pipelines"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/pipelines")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/pipelines")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  archived: false,
  created_at: '',
  currency: '',
  display_order: 0,
  id: '',
  name: '',
  stages: [
    {
      display_order: 0,
      id: '',
      name: '',
      value: '',
      win_probability: 0
    }
  ],
  updated_at: '',
  win_probability_enabled: false
});

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

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

xhr.open('POST', '{{baseUrl}}/crm/pipelines');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    archived: false,
    created_at: '',
    currency: '',
    display_order: 0,
    id: '',
    name: '',
    stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
    updated_at: '',
    win_probability_enabled: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/pipelines';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"archived":false,"created_at":"","currency":"","display_order":0,"id":"","name":"","stages":[{"display_order":0,"id":"","name":"","value":"","win_probability":0}],"updated_at":"","win_probability_enabled":false}'
};

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}}/crm/pipelines',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "archived": false,\n  "created_at": "",\n  "currency": "",\n  "display_order": 0,\n  "id": "",\n  "name": "",\n  "stages": [\n    {\n      "display_order": 0,\n      "id": "",\n      "name": "",\n      "value": "",\n      "win_probability": 0\n    }\n  ],\n  "updated_at": "",\n  "win_probability_enabled": false\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/pipelines")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  active: false,
  archived: false,
  created_at: '',
  currency: '',
  display_order: 0,
  id: '',
  name: '',
  stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
  updated_at: '',
  win_probability_enabled: false
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    archived: false,
    created_at: '',
    currency: '',
    display_order: 0,
    id: '',
    name: '',
    stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
    updated_at: '',
    win_probability_enabled: false
  },
  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}}/crm/pipelines');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  archived: false,
  created_at: '',
  currency: '',
  display_order: 0,
  id: '',
  name: '',
  stages: [
    {
      display_order: 0,
      id: '',
      name: '',
      value: '',
      win_probability: 0
    }
  ],
  updated_at: '',
  win_probability_enabled: false
});

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}}/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    archived: false,
    created_at: '',
    currency: '',
    display_order: 0,
    id: '',
    name: '',
    stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
    updated_at: '',
    win_probability_enabled: false
  }
};

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

const url = '{{baseUrl}}/crm/pipelines';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"archived":false,"created_at":"","currency":"","display_order":0,"id":"","name":"","stages":[{"display_order":0,"id":"","name":"","value":"","win_probability":0}],"updated_at":"","win_probability_enabled":false}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"archived": @NO,
                              @"created_at": @"",
                              @"currency": @"",
                              @"display_order": @0,
                              @"id": @"",
                              @"name": @"",
                              @"stages": @[ @{ @"display_order": @0, @"id": @"", @"name": @"", @"value": @"", @"win_probability": @0 } ],
                              @"updated_at": @"",
                              @"win_probability_enabled": @NO };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/pipelines"]
                                                       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}}/crm/pipelines" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/pipelines",
  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([
    'active' => null,
    'archived' => null,
    'created_at' => '',
    'currency' => '',
    'display_order' => 0,
    'id' => '',
    'name' => '',
    'stages' => [
        [
                'display_order' => 0,
                'id' => '',
                'name' => '',
                'value' => '',
                'win_probability' => 0
        ]
    ],
    'updated_at' => '',
    'win_probability_enabled' => null
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/pipelines', [
  'body' => '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/pipelines');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'archived' => null,
  'created_at' => '',
  'currency' => '',
  'display_order' => 0,
  'id' => '',
  'name' => '',
  'stages' => [
    [
        'display_order' => 0,
        'id' => '',
        'name' => '',
        'value' => '',
        'win_probability' => 0
    ]
  ],
  'updated_at' => '',
  'win_probability_enabled' => null
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'archived' => null,
  'created_at' => '',
  'currency' => '',
  'display_order' => 0,
  'id' => '',
  'name' => '',
  'stages' => [
    [
        'display_order' => 0,
        'id' => '',
        'name' => '',
        'value' => '',
        'win_probability' => 0
    ]
  ],
  'updated_at' => '',
  'win_probability_enabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/crm/pipelines');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/pipelines' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/pipelines' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}'
import http.client

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

payload = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/pipelines", payload, headers)

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

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

url = "{{baseUrl}}/crm/pipelines"

payload = {
    "active": False,
    "archived": False,
    "created_at": "",
    "currency": "",
    "display_order": 0,
    "id": "",
    "name": "",
    "stages": [
        {
            "display_order": 0,
            "id": "",
            "name": "",
            "value": "",
            "win_probability": 0
        }
    ],
    "updated_at": "",
    "win_probability_enabled": False
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/pipelines"

payload <- "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

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

url = URI("{{baseUrl}}/crm/pipelines")

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

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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/crm/pipelines') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}"
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/pipelines";

    let payload = json!({
        "active": false,
        "archived": false,
        "created_at": "",
        "currency": "",
        "display_order": 0,
        "id": "",
        "name": "",
        "stages": (
            json!({
                "display_order": 0,
                "id": "",
                "name": "",
                "value": "",
                "win_probability": 0
            })
        ),
        "updated_at": "",
        "win_probability_enabled": false
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/pipelines \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}'
echo '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}' |  \
  http POST {{baseUrl}}/crm/pipelines \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "archived": false,\n  "created_at": "",\n  "currency": "",\n  "display_order": 0,\n  "id": "",\n  "name": "",\n  "stages": [\n    {\n      "display_order": 0,\n      "id": "",\n      "name": "",\n      "value": "",\n      "win_probability": 0\n    }\n  ],\n  "updated_at": "",\n  "win_probability_enabled": false\n}' \
  --output-document \
  - {{baseUrl}}/crm/pipelines
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    [
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    ]
  ],
  "updated_at": "",
  "win_probability_enabled": false
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/pipelines")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "pipelines",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete pipeline
{{baseUrl}}/crm/pipelines/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/pipelines/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/delete "{{baseUrl}}/crm/pipelines/:id" {:headers {:x-apideck-consumer-id ""
                                                                          :x-apideck-app-id ""
                                                                          :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/pipelines/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/pipelines/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/pipelines/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/pipelines/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
DELETE /baseUrl/crm/pipelines/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/pipelines/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/pipelines/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/pipelines/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/pipelines/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/pipelines/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/pipelines/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/pipelines/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

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

const req = unirest('DELETE', '{{baseUrl}}/crm/pipelines/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/pipelines/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/pipelines/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/pipelines/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/pipelines/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/pipelines/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/pipelines/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/pipelines/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/pipelines/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/pipelines/:id' -Method DELETE -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/pipelines/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/pipelines/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

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

url <- "{{baseUrl}}/crm/pipelines/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/pipelines/:id")

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

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.delete('/baseUrl/crm/pipelines/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

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

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/pipelines/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

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

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

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/pipelines/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/pipelines/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/pipelines/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/pipelines/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get pipeline
{{baseUrl}}/crm/pipelines/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/pipelines/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/pipelines/:id" {:headers {:x-apideck-consumer-id ""
                                                                       :x-apideck-app-id ""
                                                                       :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/pipelines/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/pipelines/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/pipelines/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/pipelines/:id"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/pipelines/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/pipelines/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/pipelines/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/pipelines/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/pipelines/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/pipelines/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/pipelines/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/pipelines/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/pipelines/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/pipelines/:id"]
                                                       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}}/crm/pipelines/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/pipelines/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/pipelines/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/pipelines/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/pipelines/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/pipelines/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/pipelines/:id' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/pipelines/:id", headers=headers)

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

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

url = "{{baseUrl}}/crm/pipelines/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/pipelines/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/pipelines/:id")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/pipelines/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/pipelines/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/pipelines/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/pipelines/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/pipelines/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/pipelines/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "active": false,
    "archived": false,
    "created_at": "2020-09-30T07:43:32.000Z",
    "currency": "USD",
    "display_order": 1,
    "id": "default",
    "name": "Sales Pipeline",
    "updated_at": "2020-09-30T07:43:32.000Z",
    "win_probability_enabled": true
  },
  "operation": "one",
  "resource": "pipelines",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List pipelines
{{baseUrl}}/crm/pipelines
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/pipelines");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

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

(client/get "{{baseUrl}}/crm/pipelines" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/pipelines"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/pipelines"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/pipelines");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/pipelines"

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

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

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

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

}
GET /baseUrl/crm/pipelines HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/pipelines")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/pipelines"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/pipelines")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/pipelines")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/pipelines');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

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

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/pipelines';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

val request = Request.Builder()
  .url("{{baseUrl}}/crm/pipelines")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

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

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/pipelines');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/pipelines',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

const url = '{{baseUrl}}/crm/pipelines';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/pipelines"]
                                                       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}}/crm/pipelines" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/pipelines",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/pipelines', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/pipelines');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/pipelines');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/pipelines' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/pipelines' -Method GET -Headers $headers
import http.client

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

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/pipelines", headers=headers)

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

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

url = "{{baseUrl}}/crm/pipelines"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

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

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

url <- "{{baseUrl}}/crm/pipelines"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

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

url = URI("{{baseUrl}}/crm/pipelines")

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

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

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

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

response = conn.get('/baseUrl/crm/pipelines') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/pipelines";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/pipelines \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/pipelines \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/pipelines
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/pipelines")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "pipelines",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update pipeline
{{baseUrl}}/crm/pipelines/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/pipelines/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}");

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

(client/patch "{{baseUrl}}/crm/pipelines/:id" {:headers {:x-apideck-consumer-id ""
                                                                         :x-apideck-app-id ""
                                                                         :authorization "{{apiKey}}"}
                                                               :content-type :json
                                                               :form-params {:active false
                                                                             :archived false
                                                                             :created_at ""
                                                                             :currency ""
                                                                             :display_order 0
                                                                             :id ""
                                                                             :name ""
                                                                             :stages [{:display_order 0
                                                                                       :id ""
                                                                                       :name ""
                                                                                       :value ""
                                                                                       :win_probability 0}]
                                                                             :updated_at ""
                                                                             :win_probability_enabled false}})
require "http/client"

url = "{{baseUrl}}/crm/pipelines/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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}}/crm/pipelines/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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}}/crm/pipelines/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

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

func main() {

	url := "{{baseUrl}}/crm/pipelines/:id"

	payload := strings.NewReader("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")

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

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/pipelines/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 321

{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/pipelines/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/pipelines/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/pipelines/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/pipelines/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")
  .asString();
const data = JSON.stringify({
  active: false,
  archived: false,
  created_at: '',
  currency: '',
  display_order: 0,
  id: '',
  name: '',
  stages: [
    {
      display_order: 0,
      id: '',
      name: '',
      value: '',
      win_probability: 0
    }
  ],
  updated_at: '',
  win_probability_enabled: false
});

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

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

xhr.open('PATCH', '{{baseUrl}}/crm/pipelines/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

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

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    archived: false,
    created_at: '',
    currency: '',
    display_order: 0,
    id: '',
    name: '',
    stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
    updated_at: '',
    win_probability_enabled: false
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/pipelines/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"archived":false,"created_at":"","currency":"","display_order":0,"id":"","name":"","stages":[{"display_order":0,"id":"","name":"","value":"","win_probability":0}],"updated_at":"","win_probability_enabled":false}'
};

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}}/crm/pipelines/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "active": false,\n  "archived": false,\n  "created_at": "",\n  "currency": "",\n  "display_order": 0,\n  "id": "",\n  "name": "",\n  "stages": [\n    {\n      "display_order": 0,\n      "id": "",\n      "name": "",\n      "value": "",\n      "win_probability": 0\n    }\n  ],\n  "updated_at": "",\n  "win_probability_enabled": false\n}'
};

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

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/pipelines/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  active: false,
  archived: false,
  created_at: '',
  currency: '',
  display_order: 0,
  id: '',
  name: '',
  stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
  updated_at: '',
  win_probability_enabled: false
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    active: false,
    archived: false,
    created_at: '',
    currency: '',
    display_order: 0,
    id: '',
    name: '',
    stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
    updated_at: '',
    win_probability_enabled: false
  },
  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}}/crm/pipelines/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  active: false,
  archived: false,
  created_at: '',
  currency: '',
  display_order: 0,
  id: '',
  name: '',
  stages: [
    {
      display_order: 0,
      id: '',
      name: '',
      value: '',
      win_probability: 0
    }
  ],
  updated_at: '',
  win_probability_enabled: false
});

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}}/crm/pipelines/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    active: false,
    archived: false,
    created_at: '',
    currency: '',
    display_order: 0,
    id: '',
    name: '',
    stages: [{display_order: 0, id: '', name: '', value: '', win_probability: 0}],
    updated_at: '',
    win_probability_enabled: false
  }
};

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

const url = '{{baseUrl}}/crm/pipelines/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"active":false,"archived":false,"created_at":"","currency":"","display_order":0,"id":"","name":"","stages":[{"display_order":0,"id":"","name":"","value":"","win_probability":0}],"updated_at":"","win_probability_enabled":false}'
};

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

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"active": @NO,
                              @"archived": @NO,
                              @"created_at": @"",
                              @"currency": @"",
                              @"display_order": @0,
                              @"id": @"",
                              @"name": @"",
                              @"stages": @[ @{ @"display_order": @0, @"id": @"", @"name": @"", @"value": @"", @"win_probability": @0 } ],
                              @"updated_at": @"",
                              @"win_probability_enabled": @NO };

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

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/pipelines/:id"]
                                                       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}}/crm/pipelines/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/pipelines/:id",
  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([
    'active' => null,
    'archived' => null,
    'created_at' => '',
    'currency' => '',
    'display_order' => 0,
    'id' => '',
    'name' => '',
    'stages' => [
        [
                'display_order' => 0,
                'id' => '',
                'name' => '',
                'value' => '',
                'win_probability' => 0
        ]
    ],
    'updated_at' => '',
    'win_probability_enabled' => null
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

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

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/pipelines/:id', [
  'body' => '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/pipelines/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'active' => null,
  'archived' => null,
  'created_at' => '',
  'currency' => '',
  'display_order' => 0,
  'id' => '',
  'name' => '',
  'stages' => [
    [
        'display_order' => 0,
        'id' => '',
        'name' => '',
        'value' => '',
        'win_probability' => 0
    ]
  ],
  'updated_at' => '',
  'win_probability_enabled' => null
]));

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

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'active' => null,
  'archived' => null,
  'created_at' => '',
  'currency' => '',
  'display_order' => 0,
  'id' => '',
  'name' => '',
  'stages' => [
    [
        'display_order' => 0,
        'id' => '',
        'name' => '',
        'value' => '',
        'win_probability' => 0
    ]
  ],
  'updated_at' => '',
  'win_probability_enabled' => null
]));
$request->setRequestUrl('{{baseUrl}}/crm/pipelines/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

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

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/pipelines/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/pipelines/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}'
import http.client

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

payload = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/pipelines/:id", payload, headers)

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

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

url = "{{baseUrl}}/crm/pipelines/:id"

payload = {
    "active": False,
    "archived": False,
    "created_at": "",
    "currency": "",
    "display_order": 0,
    "id": "",
    "name": "",
    "stages": [
        {
            "display_order": 0,
            "id": "",
            "name": "",
            "value": "",
            "win_probability": 0
        }
    ],
    "updated_at": "",
    "win_probability_enabled": False
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

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

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

url <- "{{baseUrl}}/crm/pipelines/:id"

payload <- "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/crm/pipelines/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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/crm/pipelines/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"active\": false,\n  \"archived\": false,\n  \"created_at\": \"\",\n  \"currency\": \"\",\n  \"display_order\": 0,\n  \"id\": \"\",\n  \"name\": \"\",\n  \"stages\": [\n    {\n      \"display_order\": 0,\n      \"id\": \"\",\n      \"name\": \"\",\n      \"value\": \"\",\n      \"win_probability\": 0\n    }\n  ],\n  \"updated_at\": \"\",\n  \"win_probability_enabled\": false\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}}/crm/pipelines/:id";

    let payload = json!({
        "active": false,
        "archived": false,
        "created_at": "",
        "currency": "",
        "display_order": 0,
        "id": "",
        "name": "",
        "stages": (
            json!({
                "display_order": 0,
                "id": "",
                "name": "",
                "value": "",
                "win_probability": 0
            })
        ),
        "updated_at": "",
        "win_probability_enabled": false
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/pipelines/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}'
echo '{
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    {
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    }
  ],
  "updated_at": "",
  "win_probability_enabled": false
}' |  \
  http PATCH {{baseUrl}}/crm/pipelines/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "active": false,\n  "archived": false,\n  "created_at": "",\n  "currency": "",\n  "display_order": 0,\n  "id": "",\n  "name": "",\n  "stages": [\n    {\n      "display_order": 0,\n      "id": "",\n      "name": "",\n      "value": "",\n      "win_probability": 0\n    }\n  ],\n  "updated_at": "",\n  "win_probability_enabled": false\n}' \
  --output-document \
  - {{baseUrl}}/crm/pipelines/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "active": false,
  "archived": false,
  "created_at": "",
  "currency": "",
  "display_order": 0,
  "id": "",
  "name": "",
  "stages": [
    [
      "display_order": 0,
      "id": "",
      "name": "",
      "value": "",
      "win_probability": 0
    ]
  ],
  "updated_at": "",
  "win_probability_enabled": false
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/pipelines/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "pipelines",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
POST Create user
{{baseUrl}}/crm/users
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
BODY json

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/users");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/post "{{baseUrl}}/crm/users" {:headers {:x-apideck-consumer-id ""
                                                                :x-apideck-app-id ""
                                                                :authorization "{{apiKey}}"}
                                                      :content-type :json
                                                      :form-params {:addresses [{:city ""
                                                                                 :contact_name ""
                                                                                 :country ""
                                                                                 :county ""
                                                                                 :email ""
                                                                                 :fax ""
                                                                                 :id ""
                                                                                 :latitude ""
                                                                                 :line1 ""
                                                                                 :line2 ""
                                                                                 :line3 ""
                                                                                 :line4 ""
                                                                                 :longitude ""
                                                                                 :name ""
                                                                                 :phone_number ""
                                                                                 :postal_code ""
                                                                                 :row_version ""
                                                                                 :salutation ""
                                                                                 :state ""
                                                                                 :street_number ""
                                                                                 :string ""
                                                                                 :type ""
                                                                                 :website ""}]
                                                                    :company_name ""
                                                                    :created_at ""
                                                                    :department ""
                                                                    :description ""
                                                                    :division ""
                                                                    :emails [{:email ""
                                                                              :id ""
                                                                              :type ""}]
                                                                    :employee_number ""
                                                                    :first_name ""
                                                                    :id ""
                                                                    :image ""
                                                                    :language ""
                                                                    :last_name ""
                                                                    :parent_id ""
                                                                    :password ""
                                                                    :phone_numbers [{:area_code ""
                                                                                     :country_code ""
                                                                                     :extension ""
                                                                                     :id ""
                                                                                     :number ""
                                                                                     :type ""}]
                                                                    :status ""
                                                                    :title ""
                                                                    :updated_at ""
                                                                    :username ""}})
require "http/client"

url = "{{baseUrl}}/crm/users"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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}}/crm/users"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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}}/crm/users");
var request = new RestRequest("", Method.Post);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/crm/users"

	payload := strings.NewReader("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/users HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1078

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("POST", "{{baseUrl}}/crm/users")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/users"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/users")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.post("{{baseUrl}}/crm/users")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_name: '',
  created_at: '',
  department: '',
  description: '',
  division: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  employee_number: '',
  first_name: '',
  id: '',
  image: '',
  language: '',
  last_name: '',
  parent_id: '',
  password: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  status: '',
  title: '',
  updated_at: '',
  username: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('POST', '{{baseUrl}}/crm/users');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_name: '',
    created_at: '',
    department: '',
    description: '',
    division: '',
    emails: [{email: '', id: '', type: ''}],
    employee_number: '',
    first_name: '',
    id: '',
    image: '',
    language: '',
    last_name: '',
    parent_id: '',
    password: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    status: '',
    title: '',
    updated_at: '',
    username: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/users';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_name":"","created_at":"","department":"","description":"","division":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","first_name":"","id":"","image":"","language":"","last_name":"","parent_id":"","password":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","title":"","updated_at":"","username":""}'
};

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}}/crm/users',
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_name": "",\n  "created_at": "",\n  "department": "",\n  "description": "",\n  "division": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "employee_number": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_name": "",\n  "parent_id": "",\n  "password": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "title": "",\n  "updated_at": "",\n  "username": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/users")
  .post(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_name: '',
  created_at: '',
  department: '',
  description: '',
  division: '',
  emails: [{email: '', id: '', type: ''}],
  employee_number: '',
  first_name: '',
  id: '',
  image: '',
  language: '',
  last_name: '',
  parent_id: '',
  password: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  status: '',
  title: '',
  updated_at: '',
  username: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'POST',
  url: '{{baseUrl}}/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_name: '',
    created_at: '',
    department: '',
    description: '',
    division: '',
    emails: [{email: '', id: '', type: ''}],
    employee_number: '',
    first_name: '',
    id: '',
    image: '',
    language: '',
    last_name: '',
    parent_id: '',
    password: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    status: '',
    title: '',
    updated_at: '',
    username: ''
  },
  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}}/crm/users');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_name: '',
  created_at: '',
  department: '',
  description: '',
  division: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  employee_number: '',
  first_name: '',
  id: '',
  image: '',
  language: '',
  last_name: '',
  parent_id: '',
  password: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  status: '',
  title: '',
  updated_at: '',
  username: ''
});

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}}/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_name: '',
    created_at: '',
    department: '',
    description: '',
    division: '',
    emails: [{email: '', id: '', type: ''}],
    employee_number: '',
    first_name: '',
    id: '',
    image: '',
    language: '',
    last_name: '',
    parent_id: '',
    password: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    status: '',
    title: '',
    updated_at: '',
    username: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/crm/users';
const options = {
  method: 'POST',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_name":"","created_at":"","department":"","description":"","division":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","first_name":"","id":"","image":"","language":"","last_name":"","parent_id":"","password":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","title":"","updated_at":"","username":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"company_name": @"",
                              @"created_at": @"",
                              @"department": @"",
                              @"description": @"",
                              @"division": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"employee_number": @"",
                              @"first_name": @"",
                              @"id": @"",
                              @"image": @"",
                              @"language": @"",
                              @"last_name": @"",
                              @"parent_id": @"",
                              @"password": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"status": @"",
                              @"title": @"",
                              @"updated_at": @"",
                              @"username": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/users"]
                                                       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}}/crm/users" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}" in

Client.call ~headers ~body `POST uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/users",
  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([
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'company_name' => '',
    'created_at' => '',
    'department' => '',
    'description' => '',
    'division' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'employee_number' => '',
    'first_name' => '',
    'id' => '',
    'image' => '',
    'language' => '',
    'last_name' => '',
    'parent_id' => '',
    'password' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'status' => '',
    'title' => '',
    'updated_at' => '',
    'username' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('POST', '{{baseUrl}}/crm/users', [
  'body' => '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/users');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_name' => '',
  'created_at' => '',
  'department' => '',
  'description' => '',
  'division' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'employee_number' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_name' => '',
  'parent_id' => '',
  'password' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'title' => '',
  'updated_at' => '',
  'username' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_name' => '',
  'created_at' => '',
  'department' => '',
  'description' => '',
  'division' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'employee_number' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_name' => '',
  'parent_id' => '',
  'password' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'title' => '',
  'updated_at' => '',
  'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/users');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/users' -Method POST -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("POST", "/baseUrl/crm/users", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/crm/users"

payload = {
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "company_name": "",
    "created_at": "",
    "department": "",
    "description": "",
    "division": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "employee_number": "",
    "first_name": "",
    "id": "",
    "image": "",
    "language": "",
    "last_name": "",
    "parent_id": "",
    "password": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "status": "",
    "title": "",
    "updated_at": "",
    "username": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/crm/users"

payload <- "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}"

encode <- "json"

response <- VERB("POST", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/crm/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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/crm/users') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}"
end

puts response.status
puts response.body
use serde_json::json;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/users";

    let payload = json!({
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "company_name": "",
        "created_at": "",
        "department": "",
        "description": "",
        "division": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "employee_number": "",
        "first_name": "",
        "id": "",
        "image": "",
        "language": "",
        "last_name": "",
        "parent_id": "",
        "password": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "status": "",
        "title": "",
        "updated_at": "",
        "username": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/users \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}'
echo '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}' |  \
  http POST {{baseUrl}}/crm/users \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method POST \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_name": "",\n  "created_at": "",\n  "department": "",\n  "description": "",\n  "division": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "employee_number": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_name": "",\n  "parent_id": "",\n  "password": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "title": "",\n  "updated_at": "",\n  "username": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/users
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/users")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "add",
  "resource": "users",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
DELETE Delete user
{{baseUrl}}/crm/users/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "DELETE");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/users/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/delete "{{baseUrl}}/crm/users/:id" {:headers {:x-apideck-consumer-id ""
                                                                      :x-apideck-app-id ""
                                                                      :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/users/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
}

response = HTTP::Client.delete url, headers: headers
puts response.body
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Delete,
    RequestUri = new Uri("{{baseUrl}}/crm/users/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/users/:id");
var request = new RestRequest("", Method.Delete);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/crm/users/:id"

	req, _ := http.NewRequest("DELETE", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
DELETE /baseUrl/crm/users/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("DELETE", "{{baseUrl}}/crm/users/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/users/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .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}}/crm/users/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.delete("{{baseUrl}}/crm/users/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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('DELETE', '{{baseUrl}}/crm/users/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'DELETE',
  url: '{{baseUrl}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/users/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users/:id',
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/crm/users/:id")
  .delete(null)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'DELETE',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
const unirest = require('unirest');

const req = unirest('DELETE', '{{baseUrl}}/crm/users/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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: 'DELETE',
  url: '{{baseUrl}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/crm/users/:id';
const options = {
  method: 'DELETE',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/users/:id"]
                                                       cachePolicy:NSURLRequestUseProtocolCachePolicy
                                                   timeoutInterval:10.0];
[request setHTTPMethod:@"DELETE"];
[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}}/crm/users/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `DELETE uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/users/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('DELETE', '{{baseUrl}}/crm/users/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/users/:id');
$request->setMethod(HTTP_METH_DELETE);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/users/:id');
$request->setRequestMethod('DELETE');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/users/:id' -Method DELETE -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/users/:id' -Method DELETE -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("DELETE", "/baseUrl/crm/users/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/crm/users/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.delete(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/crm/users/:id"

response <- VERB("DELETE", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/crm/users/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.delete('/baseUrl/crm/users/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use std::str::FromStr;
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/users/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());

    let client = reqwest::Client::new();
    let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url)
        .headers(headers)
        .send()
        .await;

    let results = response.unwrap()
        .json::()
        .await
        .unwrap();

    dbg!(results);
}
curl --request DELETE \
  --url {{baseUrl}}/crm/users/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http DELETE {{baseUrl}}/crm/users/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method DELETE \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/users/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/users/:id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "DELETE"
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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "delete",
  "resource": "users",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET Get user
{{baseUrl}}/crm/users/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/users/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/crm/users/:id" {:headers {:x-apideck-consumer-id ""
                                                                   :x-apideck-app-id ""
                                                                   :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/users/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/users/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/users/:id");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/crm/users/:id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/crm/users/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/users/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/users/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/users/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/users/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/users/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/users/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users/:id',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/crm/users/:id")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/crm/users/:id';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/users/:id"]
                                                       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}}/crm/users/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/users/:id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/users/:id', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/users/:id');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/users/:id');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/users/:id' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/users/:id' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/users/:id", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/crm/users/:id"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/crm/users/:id"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/crm/users/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/crm/users/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/users/:id";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/users/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/users/:id \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/users/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/users/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "company_name": "SpaceX",
    "created_at": "2017-08-12T20:43:21.291Z",
    "department": "R&D",
    "description": "A description",
    "division": "Europe",
    "employee_number": "123456-AB",
    "first_name": "Elon",
    "id": "12345",
    "image": "https://logo.clearbit.com/spacex.com?s=128",
    "language": "EN",
    "last_name": "Musk",
    "parent_id": "54321",
    "password": "supersecretpassword",
    "status": "active",
    "title": "CEO",
    "updated_at": "2017-08-12T20:43:21.291Z",
    "username": "masterofcoin"
  },
  "operation": "one",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
GET List users
{{baseUrl}}/crm/users
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "GET");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/users");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/get "{{baseUrl}}/crm/users" {:headers {:x-apideck-consumer-id ""
                                                               :x-apideck-app-id ""
                                                               :authorization "{{apiKey}}"}})
require "http/client"

url = "{{baseUrl}}/crm/users"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{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}}/crm/users"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
var client = new RestClient("{{baseUrl}}/crm/users");
var request = new RestRequest("", Method.Get);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
var response = client.Execute(request);
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/crm/users"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
GET /baseUrl/crm/users HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Host: example.com

AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("GET", "{{baseUrl}}/crm/users")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/users"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{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}}/crm/users")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.get("{{baseUrl}}/crm/users")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{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}}/crm/users');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'GET',
  url: '{{baseUrl}}/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/users';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users',
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val request = Request.Builder()
  .url("{{baseUrl}}/crm/users")
  .get()
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .build()

val response = client.newCall(request).execute()
const http = require('https');

const options = {
  method: 'GET',
  hostname: 'example.com',
  port: null,
  path: '/baseUrl/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{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}}/crm/users');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{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}}/crm/users',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/crm/users';
const options = {
  method: 'GET',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}'
  }
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}" };

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/users"]
                                                       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}}/crm/users" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
] in

Client.call ~headers `GET uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/users",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('GET', '{{baseUrl}}/crm/users', [
  'headers' => [
    'authorization' => '{{apiKey}}',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/users');
$request->setMethod(HTTP_METH_GET);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
setRequestUrl('{{baseUrl}}/crm/users');
$request->setRequestMethod('GET');
$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/users' -Method GET -Headers $headers
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/users' -Method GET -Headers $headers
import http.client

conn = http.client.HTTPSConnection("example.com")

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}"
}

conn.request("GET", "/baseUrl/crm/users", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/crm/users"

headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}"
}

response = requests.get(url, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/crm/users"

response <- VERB("GET", url, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/octet-stream"))

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/crm/users")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'

response = http.request(request)
puts response.read_body
require 'faraday'

conn = Faraday.new(
  url: 'https://example.com',
)

response = conn.get('/baseUrl/crm/users') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
end

puts response.status
puts response.body
use reqwest;

#[tokio::main]
pub async fn main() {
    let url = "{{baseUrl}}/crm/users";

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{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}}/crm/users \
  --header 'authorization: {{apiKey}}' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: '
http GET {{baseUrl}}/crm/users \
  authorization:'{{apiKey}}' \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method GET \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --output-document \
  - {{baseUrl}}/crm/users
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/users")! 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
application/json
RESPONSE BODY json

{
  "links": {
    "current": "https://unify.apideck.com/crm/companies",
    "next": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjM",
    "previous": "https://unify.apideck.com/crm/companies?cursor=em9oby1jcm06OnBhZ2U6OjE%3D"
  },
  "meta": {
    "items_on_page": 50
  },
  "operation": "all",
  "resource": "users",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}
PATCH Update user
{{baseUrl}}/crm/users/:id
HEADERS

x-apideck-consumer-id
x-apideck-app-id
Authorization
{{apiKey}}
QUERY PARAMS

id
BODY json

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}
Examples
REQUEST

CURL *hnd = curl_easy_init();

curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "PATCH");
curl_easy_setopt(hnd, CURLOPT_URL, "{{baseUrl}}/crm/users/:id");

struct curl_slist *headers = NULL;
headers = curl_slist_append(headers, "x-apideck-consumer-id: ");
headers = curl_slist_append(headers, "x-apideck-app-id: ");
headers = curl_slist_append(headers, "authorization: {{apiKey}}");
headers = curl_slist_append(headers, "content-type: application/json");
curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);

curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}");

CURLcode ret = curl_easy_perform(hnd);
(require '[clj-http.client :as client])

(client/patch "{{baseUrl}}/crm/users/:id" {:headers {:x-apideck-consumer-id ""
                                                                     :x-apideck-app-id ""
                                                                     :authorization "{{apiKey}}"}
                                                           :content-type :json
                                                           :form-params {:addresses [{:city ""
                                                                                      :contact_name ""
                                                                                      :country ""
                                                                                      :county ""
                                                                                      :email ""
                                                                                      :fax ""
                                                                                      :id ""
                                                                                      :latitude ""
                                                                                      :line1 ""
                                                                                      :line2 ""
                                                                                      :line3 ""
                                                                                      :line4 ""
                                                                                      :longitude ""
                                                                                      :name ""
                                                                                      :phone_number ""
                                                                                      :postal_code ""
                                                                                      :row_version ""
                                                                                      :salutation ""
                                                                                      :state ""
                                                                                      :street_number ""
                                                                                      :string ""
                                                                                      :type ""
                                                                                      :website ""}]
                                                                         :company_name ""
                                                                         :created_at ""
                                                                         :department ""
                                                                         :description ""
                                                                         :division ""
                                                                         :emails [{:email ""
                                                                                   :id ""
                                                                                   :type ""}]
                                                                         :employee_number ""
                                                                         :first_name ""
                                                                         :id ""
                                                                         :image ""
                                                                         :language ""
                                                                         :last_name ""
                                                                         :parent_id ""
                                                                         :password ""
                                                                         :phone_numbers [{:area_code ""
                                                                                          :country_code ""
                                                                                          :extension ""
                                                                                          :id ""
                                                                                          :number ""
                                                                                          :type ""}]
                                                                         :status ""
                                                                         :title ""
                                                                         :updated_at ""
                                                                         :username ""}})
require "http/client"

url = "{{baseUrl}}/crm/users/:id"
headers = HTTP::Headers{
  "x-apideck-consumer-id" => ""
  "x-apideck-app-id" => ""
  "authorization" => "{{apiKey}}"
  "content-type" => "application/json"
}
reqBody = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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}}/crm/users/:id"),
    Headers =
    {
        { "x-apideck-consumer-id", "" },
        { "x-apideck-app-id", "" },
        { "authorization", "{{apiKey}}" },
    },
    Content = new StringContent("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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}}/crm/users/:id");
var request = new RestRequest("", Method.Patch);
request.AddHeader("x-apideck-consumer-id", "");
request.AddHeader("x-apideck-app-id", "");
request.AddHeader("authorization", "{{apiKey}}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}", ParameterType.RequestBody);
var response = client.Execute(request);
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "{{baseUrl}}/crm/users/:id"

	payload := strings.NewReader("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("x-apideck-consumer-id", "")
	req.Header.Add("x-apideck-app-id", "")
	req.Header.Add("authorization", "{{apiKey}}")
	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/crm/users/:id HTTP/1.1
X-Apideck-Consumer-Id: 
X-Apideck-App-Id: 
Authorization: {{apiKey}}
Content-Type: application/json
Host: example.com
Content-Length: 1078

{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}
AsyncHttpClient client = new DefaultAsyncHttpClient();
client.prepare("PATCH", "{{baseUrl}}/crm/users/:id")
  .setHeader("x-apideck-consumer-id", "")
  .setHeader("x-apideck-app-id", "")
  .setHeader("authorization", "{{apiKey}}")
  .setHeader("content-type", "application/json")
  .setBody("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")
  .execute()
  .toCompletableFuture()
  .thenAccept(System.out::println)
  .join();

client.close();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("{{baseUrl}}/crm/users/:id"))
    .header("x-apideck-consumer-id", "")
    .header("x-apideck-app-id", "")
    .header("authorization", "{{apiKey}}")
    .header("content-type", "application/json")
    .method("PATCH", HttpRequest.BodyPublishers.ofString("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}");
Request request = new Request.Builder()
  .url("{{baseUrl}}/crm/users/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .addHeader("content-type", "application/json")
  .build();

Response response = client.newCall(request).execute();
HttpResponse response = Unirest.patch("{{baseUrl}}/crm/users/:id")
  .header("x-apideck-consumer-id", "")
  .header("x-apideck-app-id", "")
  .header("authorization", "{{apiKey}}")
  .header("content-type", "application/json")
  .body("{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")
  .asString();
const data = JSON.stringify({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_name: '',
  created_at: '',
  department: '',
  description: '',
  division: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  employee_number: '',
  first_name: '',
  id: '',
  image: '',
  language: '',
  last_name: '',
  parent_id: '',
  password: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  status: '',
  title: '',
  updated_at: '',
  username: ''
});

const xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener('readystatechange', function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open('PATCH', '{{baseUrl}}/crm/users/:id');
xhr.setRequestHeader('x-apideck-consumer-id', '');
xhr.setRequestHeader('x-apideck-app-id', '');
xhr.setRequestHeader('authorization', '{{apiKey}}');
xhr.setRequestHeader('content-type', 'application/json');

xhr.send(data);
import axios from 'axios';

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_name: '',
    created_at: '',
    department: '',
    description: '',
    division: '',
    emails: [{email: '', id: '', type: ''}],
    employee_number: '',
    first_name: '',
    id: '',
    image: '',
    language: '',
    last_name: '',
    parent_id: '',
    password: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    status: '',
    title: '',
    updated_at: '',
    username: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const url = '{{baseUrl}}/crm/users/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_name":"","created_at":"","department":"","description":"","division":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","first_name":"","id":"","image":"","language":"","last_name":"","parent_id":"","password":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","title":"","updated_at":"","username":""}'
};

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}}/crm/users/:id',
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  processData: false,
  data: '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_name": "",\n  "created_at": "",\n  "department": "",\n  "description": "",\n  "division": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "employee_number": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_name": "",\n  "parent_id": "",\n  "password": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "title": "",\n  "updated_at": "",\n  "username": ""\n}'
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
val client = OkHttpClient()

val mediaType = MediaType.parse("application/json")
val body = RequestBody.create(mediaType, "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}")
val request = Request.Builder()
  .url("{{baseUrl}}/crm/users/:id")
  .patch(body)
  .addHeader("x-apideck-consumer-id", "")
  .addHeader("x-apideck-app-id", "")
  .addHeader("authorization", "{{apiKey}}")
  .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/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    '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({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_name: '',
  created_at: '',
  department: '',
  description: '',
  division: '',
  emails: [{email: '', id: '', type: ''}],
  employee_number: '',
  first_name: '',
  id: '',
  image: '',
  language: '',
  last_name: '',
  parent_id: '',
  password: '',
  phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
  status: '',
  title: '',
  updated_at: '',
  username: ''
}));
req.end();
const request = require('request');

const options = {
  method: 'PATCH',
  url: '{{baseUrl}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_name: '',
    created_at: '',
    department: '',
    description: '',
    division: '',
    emails: [{email: '', id: '', type: ''}],
    employee_number: '',
    first_name: '',
    id: '',
    image: '',
    language: '',
    last_name: '',
    parent_id: '',
    password: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    status: '',
    title: '',
    updated_at: '',
    username: ''
  },
  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}}/crm/users/:id');

req.headers({
  'x-apideck-consumer-id': '',
  'x-apideck-app-id': '',
  authorization: '{{apiKey}}',
  'content-type': 'application/json'
});

req.type('json');
req.send({
  addresses: [
    {
      city: '',
      contact_name: '',
      country: '',
      county: '',
      email: '',
      fax: '',
      id: '',
      latitude: '',
      line1: '',
      line2: '',
      line3: '',
      line4: '',
      longitude: '',
      name: '',
      phone_number: '',
      postal_code: '',
      row_version: '',
      salutation: '',
      state: '',
      street_number: '',
      string: '',
      type: '',
      website: ''
    }
  ],
  company_name: '',
  created_at: '',
  department: '',
  description: '',
  division: '',
  emails: [
    {
      email: '',
      id: '',
      type: ''
    }
  ],
  employee_number: '',
  first_name: '',
  id: '',
  image: '',
  language: '',
  last_name: '',
  parent_id: '',
  password: '',
  phone_numbers: [
    {
      area_code: '',
      country_code: '',
      extension: '',
      id: '',
      number: '',
      type: ''
    }
  ],
  status: '',
  title: '',
  updated_at: '',
  username: ''
});

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}}/crm/users/:id',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  data: {
    addresses: [
      {
        city: '',
        contact_name: '',
        country: '',
        county: '',
        email: '',
        fax: '',
        id: '',
        latitude: '',
        line1: '',
        line2: '',
        line3: '',
        line4: '',
        longitude: '',
        name: '',
        phone_number: '',
        postal_code: '',
        row_version: '',
        salutation: '',
        state: '',
        street_number: '',
        string: '',
        type: '',
        website: ''
      }
    ],
    company_name: '',
    created_at: '',
    department: '',
    description: '',
    division: '',
    emails: [{email: '', id: '', type: ''}],
    employee_number: '',
    first_name: '',
    id: '',
    image: '',
    language: '',
    last_name: '',
    parent_id: '',
    password: '',
    phone_numbers: [{area_code: '', country_code: '', extension: '', id: '', number: '', type: ''}],
    status: '',
    title: '',
    updated_at: '',
    username: ''
  }
};

try {
  const { data } = await axios.request(options);
  console.log(data);
} catch (error) {
  console.error(error);
}
const fetch = require('node-fetch');

const url = '{{baseUrl}}/crm/users/:id';
const options = {
  method: 'PATCH',
  headers: {
    'x-apideck-consumer-id': '',
    'x-apideck-app-id': '',
    authorization: '{{apiKey}}',
    'content-type': 'application/json'
  },
  body: '{"addresses":[{"city":"","contact_name":"","country":"","county":"","email":"","fax":"","id":"","latitude":"","line1":"","line2":"","line3":"","line4":"","longitude":"","name":"","phone_number":"","postal_code":"","row_version":"","salutation":"","state":"","street_number":"","string":"","type":"","website":""}],"company_name":"","created_at":"","department":"","description":"","division":"","emails":[{"email":"","id":"","type":""}],"employee_number":"","first_name":"","id":"","image":"","language":"","last_name":"","parent_id":"","password":"","phone_numbers":[{"area_code":"","country_code":"","extension":"","id":"","number":"","type":""}],"status":"","title":"","updated_at":"","username":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
#import 

NSDictionary *headers = @{ @"x-apideck-consumer-id": @"",
                           @"x-apideck-app-id": @"",
                           @"authorization": @"{{apiKey}}",
                           @"content-type": @"application/json" };
NSDictionary *parameters = @{ @"addresses": @[ @{ @"city": @"", @"contact_name": @"", @"country": @"", @"county": @"", @"email": @"", @"fax": @"", @"id": @"", @"latitude": @"", @"line1": @"", @"line2": @"", @"line3": @"", @"line4": @"", @"longitude": @"", @"name": @"", @"phone_number": @"", @"postal_code": @"", @"row_version": @"", @"salutation": @"", @"state": @"", @"street_number": @"", @"string": @"", @"type": @"", @"website": @"" } ],
                              @"company_name": @"",
                              @"created_at": @"",
                              @"department": @"",
                              @"description": @"",
                              @"division": @"",
                              @"emails": @[ @{ @"email": @"", @"id": @"", @"type": @"" } ],
                              @"employee_number": @"",
                              @"first_name": @"",
                              @"id": @"",
                              @"image": @"",
                              @"language": @"",
                              @"last_name": @"",
                              @"parent_id": @"",
                              @"password": @"",
                              @"phone_numbers": @[ @{ @"area_code": @"", @"country_code": @"", @"extension": @"", @"id": @"", @"number": @"", @"type": @"" } ],
                              @"status": @"",
                              @"title": @"",
                              @"updated_at": @"",
                              @"username": @"" };

NSData *postData = [NSJSONSerialization dataWithJSONObject:parameters options:0 error:nil];

NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:@"{{baseUrl}}/crm/users/:id"]
                                                       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}}/crm/users/:id" in
let headers = Header.add_list (Header.init ()) [
  ("x-apideck-consumer-id", "");
  ("x-apideck-app-id", "");
  ("authorization", "{{apiKey}}");
  ("content-type", "application/json");
] in
let body = Cohttp_lwt_body.of_string "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}" in

Client.call ~headers ~body `PATCH uri
>>= fun (res, body_stream) ->
  (* Do stuff with the result *)
 "{{baseUrl}}/crm/users/:id",
  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([
    'addresses' => [
        [
                'city' => '',
                'contact_name' => '',
                'country' => '',
                'county' => '',
                'email' => '',
                'fax' => '',
                'id' => '',
                'latitude' => '',
                'line1' => '',
                'line2' => '',
                'line3' => '',
                'line4' => '',
                'longitude' => '',
                'name' => '',
                'phone_number' => '',
                'postal_code' => '',
                'row_version' => '',
                'salutation' => '',
                'state' => '',
                'street_number' => '',
                'string' => '',
                'type' => '',
                'website' => ''
        ]
    ],
    'company_name' => '',
    'created_at' => '',
    'department' => '',
    'description' => '',
    'division' => '',
    'emails' => [
        [
                'email' => '',
                'id' => '',
                'type' => ''
        ]
    ],
    'employee_number' => '',
    'first_name' => '',
    'id' => '',
    'image' => '',
    'language' => '',
    'last_name' => '',
    'parent_id' => '',
    'password' => '',
    'phone_numbers' => [
        [
                'area_code' => '',
                'country_code' => '',
                'extension' => '',
                'id' => '',
                'number' => '',
                'type' => ''
        ]
    ],
    'status' => '',
    'title' => '',
    'updated_at' => '',
    'username' => ''
  ]),
  CURLOPT_HTTPHEADER => [
    "authorization: {{apiKey}}",
    "content-type: application/json",
    "x-apideck-app-id: ",
    "x-apideck-consumer-id: "
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
request('PATCH', '{{baseUrl}}/crm/users/:id', [
  'body' => '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}',
  'headers' => [
    'authorization' => '{{apiKey}}',
    'content-type' => 'application/json',
    'x-apideck-app-id' => '',
    'x-apideck-consumer-id' => '',
  ],
]);

echo $response->getBody();
setUrl('{{baseUrl}}/crm/users/:id');
$request->setMethod(HttpRequest::HTTP_METH_PATCH);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$request->setContentType('application/json');
$request->setBody(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_name' => '',
  'created_at' => '',
  'department' => '',
  'description' => '',
  'division' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'employee_number' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_name' => '',
  'parent_id' => '',
  'password' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'title' => '',
  'updated_at' => '',
  'username' => ''
]));

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}
append(json_encode([
  'addresses' => [
    [
        'city' => '',
        'contact_name' => '',
        'country' => '',
        'county' => '',
        'email' => '',
        'fax' => '',
        'id' => '',
        'latitude' => '',
        'line1' => '',
        'line2' => '',
        'line3' => '',
        'line4' => '',
        'longitude' => '',
        'name' => '',
        'phone_number' => '',
        'postal_code' => '',
        'row_version' => '',
        'salutation' => '',
        'state' => '',
        'street_number' => '',
        'string' => '',
        'type' => '',
        'website' => ''
    ]
  ],
  'company_name' => '',
  'created_at' => '',
  'department' => '',
  'description' => '',
  'division' => '',
  'emails' => [
    [
        'email' => '',
        'id' => '',
        'type' => ''
    ]
  ],
  'employee_number' => '',
  'first_name' => '',
  'id' => '',
  'image' => '',
  'language' => '',
  'last_name' => '',
  'parent_id' => '',
  'password' => '',
  'phone_numbers' => [
    [
        'area_code' => '',
        'country_code' => '',
        'extension' => '',
        'id' => '',
        'number' => '',
        'type' => ''
    ]
  ],
  'status' => '',
  'title' => '',
  'updated_at' => '',
  'username' => ''
]));
$request->setRequestUrl('{{baseUrl}}/crm/users/:id');
$request->setRequestMethod('PATCH');
$request->setBody($body);

$request->setHeaders([
  'x-apideck-consumer-id' => '',
  'x-apideck-app-id' => '',
  'authorization' => '{{apiKey}}',
  'content-type' => 'application/json'
]);

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-WebRequest -Uri '{{baseUrl}}/crm/users/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}'
$headers=@{}
$headers.Add("x-apideck-consumer-id", "")
$headers.Add("x-apideck-app-id", "")
$headers.Add("authorization", "{{apiKey}}")
$headers.Add("content-type", "application/json")
$response = Invoke-RestMethod -Uri '{{baseUrl}}/crm/users/:id' -Method PATCH -Headers $headers -ContentType 'application/json' -Body '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}'
import http.client

conn = http.client.HTTPSConnection("example.com")

payload = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}"

headers = {
    'x-apideck-consumer-id': "",
    'x-apideck-app-id': "",
    'authorization': "{{apiKey}}",
    'content-type': "application/json"
}

conn.request("PATCH", "/baseUrl/crm/users/:id", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
import requests

url = "{{baseUrl}}/crm/users/:id"

payload = {
    "addresses": [
        {
            "city": "",
            "contact_name": "",
            "country": "",
            "county": "",
            "email": "",
            "fax": "",
            "id": "",
            "latitude": "",
            "line1": "",
            "line2": "",
            "line3": "",
            "line4": "",
            "longitude": "",
            "name": "",
            "phone_number": "",
            "postal_code": "",
            "row_version": "",
            "salutation": "",
            "state": "",
            "street_number": "",
            "string": "",
            "type": "",
            "website": ""
        }
    ],
    "company_name": "",
    "created_at": "",
    "department": "",
    "description": "",
    "division": "",
    "emails": [
        {
            "email": "",
            "id": "",
            "type": ""
        }
    ],
    "employee_number": "",
    "first_name": "",
    "id": "",
    "image": "",
    "language": "",
    "last_name": "",
    "parent_id": "",
    "password": "",
    "phone_numbers": [
        {
            "area_code": "",
            "country_code": "",
            "extension": "",
            "id": "",
            "number": "",
            "type": ""
        }
    ],
    "status": "",
    "title": "",
    "updated_at": "",
    "username": ""
}
headers = {
    "x-apideck-consumer-id": "",
    "x-apideck-app-id": "",
    "authorization": "{{apiKey}}",
    "content-type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.json())
library(httr)

url <- "{{baseUrl}}/crm/users/:id"

payload <- "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\n}"

encode <- "json"

response <- VERB("PATCH", url, body = payload, add_headers('x-apideck-consumer-id' = '', 'x-apideck-app-id' = '', 'authorization' = '{{apiKey}}'), content_type("application/json"), encode = encode)

content(response, "text")
require 'uri'
require 'net/http'

url = URI("{{baseUrl}}/crm/users/:id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["x-apideck-consumer-id"] = ''
request["x-apideck-app-id"] = ''
request["authorization"] = '{{apiKey}}'
request["content-type"] = 'application/json'
request.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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/crm/users/:id') do |req|
  req.headers['x-apideck-consumer-id'] = ''
  req.headers['x-apideck-app-id'] = ''
  req.headers['authorization'] = '{{apiKey}}'
  req.body = "{\n  \"addresses\": [\n    {\n      \"city\": \"\",\n      \"contact_name\": \"\",\n      \"country\": \"\",\n      \"county\": \"\",\n      \"email\": \"\",\n      \"fax\": \"\",\n      \"id\": \"\",\n      \"latitude\": \"\",\n      \"line1\": \"\",\n      \"line2\": \"\",\n      \"line3\": \"\",\n      \"line4\": \"\",\n      \"longitude\": \"\",\n      \"name\": \"\",\n      \"phone_number\": \"\",\n      \"postal_code\": \"\",\n      \"row_version\": \"\",\n      \"salutation\": \"\",\n      \"state\": \"\",\n      \"street_number\": \"\",\n      \"string\": \"\",\n      \"type\": \"\",\n      \"website\": \"\"\n    }\n  ],\n  \"company_name\": \"\",\n  \"created_at\": \"\",\n  \"department\": \"\",\n  \"description\": \"\",\n  \"division\": \"\",\n  \"emails\": [\n    {\n      \"email\": \"\",\n      \"id\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"employee_number\": \"\",\n  \"first_name\": \"\",\n  \"id\": \"\",\n  \"image\": \"\",\n  \"language\": \"\",\n  \"last_name\": \"\",\n  \"parent_id\": \"\",\n  \"password\": \"\",\n  \"phone_numbers\": [\n    {\n      \"area_code\": \"\",\n      \"country_code\": \"\",\n      \"extension\": \"\",\n      \"id\": \"\",\n      \"number\": \"\",\n      \"type\": \"\"\n    }\n  ],\n  \"status\": \"\",\n  \"title\": \"\",\n  \"updated_at\": \"\",\n  \"username\": \"\"\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}}/crm/users/:id";

    let payload = json!({
        "addresses": (
            json!({
                "city": "",
                "contact_name": "",
                "country": "",
                "county": "",
                "email": "",
                "fax": "",
                "id": "",
                "latitude": "",
                "line1": "",
                "line2": "",
                "line3": "",
                "line4": "",
                "longitude": "",
                "name": "",
                "phone_number": "",
                "postal_code": "",
                "row_version": "",
                "salutation": "",
                "state": "",
                "street_number": "",
                "string": "",
                "type": "",
                "website": ""
            })
        ),
        "company_name": "",
        "created_at": "",
        "department": "",
        "description": "",
        "division": "",
        "emails": (
            json!({
                "email": "",
                "id": "",
                "type": ""
            })
        ),
        "employee_number": "",
        "first_name": "",
        "id": "",
        "image": "",
        "language": "",
        "last_name": "",
        "parent_id": "",
        "password": "",
        "phone_numbers": (
            json!({
                "area_code": "",
                "country_code": "",
                "extension": "",
                "id": "",
                "number": "",
                "type": ""
            })
        ),
        "status": "",
        "title": "",
        "updated_at": "",
        "username": ""
    });

    let mut headers = reqwest::header::HeaderMap::new();
    headers.insert("x-apideck-consumer-id", "".parse().unwrap());
    headers.insert("x-apideck-app-id", "".parse().unwrap());
    headers.insert("authorization", "{{apiKey}}".parse().unwrap());
    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}}/crm/users/:id \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --header 'x-apideck-app-id: ' \
  --header 'x-apideck-consumer-id: ' \
  --data '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}'
echo '{
  "addresses": [
    {
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    }
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    {
      "email": "",
      "id": "",
      "type": ""
    }
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    {
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    }
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
}' |  \
  http PATCH {{baseUrl}}/crm/users/:id \
  authorization:'{{apiKey}}' \
  content-type:application/json \
  x-apideck-app-id:'' \
  x-apideck-consumer-id:''
wget --quiet \
  --method PATCH \
  --header 'x-apideck-consumer-id: ' \
  --header 'x-apideck-app-id: ' \
  --header 'authorization: {{apiKey}}' \
  --header 'content-type: application/json' \
  --body-data '{\n  "addresses": [\n    {\n      "city": "",\n      "contact_name": "",\n      "country": "",\n      "county": "",\n      "email": "",\n      "fax": "",\n      "id": "",\n      "latitude": "",\n      "line1": "",\n      "line2": "",\n      "line3": "",\n      "line4": "",\n      "longitude": "",\n      "name": "",\n      "phone_number": "",\n      "postal_code": "",\n      "row_version": "",\n      "salutation": "",\n      "state": "",\n      "street_number": "",\n      "string": "",\n      "type": "",\n      "website": ""\n    }\n  ],\n  "company_name": "",\n  "created_at": "",\n  "department": "",\n  "description": "",\n  "division": "",\n  "emails": [\n    {\n      "email": "",\n      "id": "",\n      "type": ""\n    }\n  ],\n  "employee_number": "",\n  "first_name": "",\n  "id": "",\n  "image": "",\n  "language": "",\n  "last_name": "",\n  "parent_id": "",\n  "password": "",\n  "phone_numbers": [\n    {\n      "area_code": "",\n      "country_code": "",\n      "extension": "",\n      "id": "",\n      "number": "",\n      "type": ""\n    }\n  ],\n  "status": "",\n  "title": "",\n  "updated_at": "",\n  "username": ""\n}' \
  --output-document \
  - {{baseUrl}}/crm/users/:id
import Foundation

let headers = [
  "x-apideck-consumer-id": "",
  "x-apideck-app-id": "",
  "authorization": "{{apiKey}}",
  "content-type": "application/json"
]
let parameters = [
  "addresses": [
    [
      "city": "",
      "contact_name": "",
      "country": "",
      "county": "",
      "email": "",
      "fax": "",
      "id": "",
      "latitude": "",
      "line1": "",
      "line2": "",
      "line3": "",
      "line4": "",
      "longitude": "",
      "name": "",
      "phone_number": "",
      "postal_code": "",
      "row_version": "",
      "salutation": "",
      "state": "",
      "street_number": "",
      "string": "",
      "type": "",
      "website": ""
    ]
  ],
  "company_name": "",
  "created_at": "",
  "department": "",
  "description": "",
  "division": "",
  "emails": [
    [
      "email": "",
      "id": "",
      "type": ""
    ]
  ],
  "employee_number": "",
  "first_name": "",
  "id": "",
  "image": "",
  "language": "",
  "last_name": "",
  "parent_id": "",
  "password": "",
  "phone_numbers": [
    [
      "area_code": "",
      "country_code": "",
      "extension": "",
      "id": "",
      "number": "",
      "type": ""
    ]
  ],
  "status": "",
  "title": "",
  "updated_at": "",
  "username": ""
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "{{baseUrl}}/crm/users/:id")! 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
application/json
RESPONSE BODY json

{
  "data": {
    "id": "12345"
  },
  "operation": "update",
  "resource": "companies",
  "service": "zoho-crm",
  "status": "OK",
  "status_code": 200
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#requestvalidationerror",
  "status_code": 400,
  "type_name": "RequestValidationError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Failed to generate valid JWT Session. Verify applicationId is correct",
  "error": "Unauthorized",
  "message": "Unauthorized Request",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 401,
  "type_name": "UnauthorizedError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "You have reached your limit of 2000",
  "error": "Payment Required",
  "message": "Request Limit Reached",
  "ref": "https://developers.apideck.com/errors#requestlimiterror",
  "status_code": 402,
  "type_name": "RequestLimitError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Not Found",
  "message": "Unknown Widget",
  "ref": "https://developers.apideck.com/errors#entitynotfounderror",
  "status_code": 404,
  "type_name": "EntityNotFoundError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "detail": "Unprocessable request, please verify your request headers and body.",
  "error": "Unprocessable Entity",
  "message": "Invalid State",
  "ref": "https://developers.apideck.com/errors#invalidstateerror",
  "status_code": 422,
  "type_name": "InvalidStateError"
}
RESPONSE HEADERS

Content-Type
application/json
RESPONSE BODY json

{
  "error": "Bad Request",
  "message": "Invalid Params",
  "ref": "https://developers.apideck.com/errors#unauthorizederror",
  "status_code": 400,
  "type_name": "RequestHeadersValidationError"
}