{
  "info": {
    "_postman_id": "e6c5e09a-ce7c-4957-9130-4aacc99828b5",
    "name": "Custify API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "_exporter_id": "2991053"
  },
  "item": [
    {
      "name": "Batch",
      "item": [
        {
          "name": "Send batch requests",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"jobs\": [\n        {\n            \"type\": \"people\",\n            \"payload\": {\n                \"name\": \"John Doe\",\n                \"user_id\": \"batch_1\",\n                \"email\": \"john.doe@outlook.com\"\n            }\n        },\n        {\n            \"type\": \"company\",\n            \"payload\": {\n                \"name\": \"John's Company\",\n                \"company_id\": \"batch_company_1\",\n                \"website\": \"www.johnscompany.com\"\n            }\n        },\n        {\n            \"type\": \"event\",\n            \"payload\": {\n                \"name\": \"event_from_batch\",\n                \"created_at\": \"2022-01-17T13:00:00.000Z\",\n                \"user_id\": \"batch_1\"\n            }\n        }\n    ],\n    \"synchronous\": true,\n    \"returnJobId\": false\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/batch",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "batch"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get batch jobId status",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{ApiUrl}}/batch/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "batch",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": null,
                  "description": "ID of the job"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Calculated metric",
      "item": [
        {
          "name": "List calculated metrics",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/calendar/meeting?order=desc&sort=created_at&itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "calendar",
                "meeting"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "desc"
                },
                {
                  "key": "sort",
                  "value": "created_at"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Companies",
      "item": [
        {
          "name": "Create or update company",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"company_id\":\"test_company_123\",\n    \"name\": \"Test Company\",\n    \"custom_attributes\": {\n        \"pays_monthly\": false\n    }\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/company",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "company"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete company",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/company/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "company",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify Company ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "View company",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/company/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "company",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify Company ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List companies",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/company/all?itemsPerPage=20&page=1&sorting[field]=updated_at&sorting[direction]=desc",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "company",
                "all"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                },
                {
                  "key": "sorting[field]",
                  "value": "updated_at",
                  "description": "Sorting field"
                },
                {
                  "key": "sorting[direction]",
                  "value": "desc",
                  "description": "Sorting direction"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List company people",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/company/people/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "company",
                "people",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify Company ID"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Custom Data",
      "item": [
        {
          "name": "Add custom data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"data_type\":\"test_data\",\n    \"data_id\":\"test_2\",\n    \"data\": {\n        \"number\": 123,\n        \"string\": \"testing\",\n        \"boolean\": true,\n        \"date\": \"2020-10-12T16:01:23Z\"\n    }\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/custom_data/:entityModel/:entity",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "custom_data",
                ":entityModel",
                ":entity"
              ],
              "variable": [
                {
                  "key": "entityModel",
                  "value": "companies",
                  "description": "companies or people, depending on the entity type"
                },
                {
                  "key": "entity",
                  "value": "",
                  "description": "Custify ID for the company or person"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Listing custom data",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"data_type\":\"test_data\",\n    \"data_id\":\"test_2\",\n    \"data\": {\n        \"number\": 123,\n        \"string\": \"testing\",\n        \"boolean\": true,\n        \"date\": \"2020-10-12T16:01:23Z\"\n    }\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/custom_data/:entityModel/:entity",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "custom_data",
                ":entityModel",
                ":entity"
              ],
              "variable": [
                {
                  "key": "entityModel",
                  "value": "companies",
                  "description": "companies or people, depending on the entity type"
                },
                {
                  "key": "entity",
                  "value": "",
                  "description": "Custify ID for the company or person"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Events",
      "item": [
        {
          "name": "Insert events",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"test_event\",\n    \"created_at\": \"2020-11-02T11:11:11.000Z\",\n    \"user_id\":\"test_123\",\n    \"metadata\": {\n        \"attribute_1\": \"value_1\"\n    }\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/event",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "event"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "File",
      "item": [
        {
          "name": "File upload",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "multipart/form-data",
                "type": "text"
              }
            ],
            "body": {
              "mode": "formdata",
              "formdata": [
                {
                  "key": "companyId",
                  "value": "",
                  "description": "Custify company internal ID",
                  "type": "text"
                },
                {
                  "key": "file",
                  "description": "File upload",
                  "type": "file",
                  "src": []
                },
                {
                  "key": "peopleId",
                  "value": "",
                  "description": "Custify people internal ID",
                  "type": "text",
                  "disabled": true
                }
              ]
            },
            "url": {
              "raw": "{{ApiUrl}}/file",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "file"
              ]
            }
          },
          "response": []
        },
        {
          "name": "File unlink",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"fileId\": \"634fdd123d845b866653e373\",\n    \"companyId\": \"6193c2a16ede8eb349d6766a\"\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/file/unlink",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "file",
                "unlink"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Get entity files listing",
          "request": {
            "method": "GET",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{ApiUrl}}/file?companyId=&page=1&items_per_page=20",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "file"
              ],
              "query": [
                {
                  "key": "companyId",
                  "value": "",
                  "description": "Custify internal ID of the company"
                },
                {
                  "key": "peopleId",
                  "value": "",
                  "description": "Custify internal ID of the people",
                  "disabled": true
                },
                {
                  "key": "searchKey",
                  "value": "",
                  "description": "Filter results by file name",
                  "disabled": true
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Page number"
                },
                {
                  "key": "items_per_page",
                  "value": "20",
                  "description": "Items per page"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Financial",
      "item": [
        {
          "name": "Deals",
          "item": [
            {
              "name": "Create/update financial deal",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"externalId\": \"deal01\",\n    \"company_id\": \"12345678\",\n    \"name\": \"Deal with Microsoft\",\n    \"status\": \"pending\",\n    \"value\": 10000,\n    \"addedAt\": \"2022-08-03T10:00:00.000Z\"\n}"
                },
                "url": {
                  "raw": "{{ApiUrl}}/financial/deal",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "deal"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List financial deals",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{ApiUrl}}/financial/deal",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "deal"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Delete financial deal",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{ApiUrl}}/financial/deal?externalId=deal01",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "deal"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "deal01"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Invoices",
          "item": [
            {
              "name": "Create/update financial invoice",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"externalId\": \"invoice01\",\n    \"company_id\": \"12345678\",\n    \"status\": \"unpaid\",\n    \"total\": 499,\n    \"invoicedAt\": \"2022-08-03T10:00:00.000Z\"\n}"
                },
                "url": {
                  "raw": "{{ApiUrl}}/financial/invoice",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "invoice"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List financial invoices",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{ApiUrl}}/financial/invoice",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "invoice"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Delete financial invoice",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{ApiUrl}}/financial/invoice?externalId=deal01",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "invoice"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "deal01"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        },
        {
          "name": "Subscriptions",
          "item": [
            {
              "name": "Create/update financial subscription",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n    \"externalId\": \"subscription01\",\n    \"company_id\": \"12345678\",\n    \"mrr\": 499,\n    \"startedAt\": \"2022-08-03T10:00:00.000Z\"\n}"
                },
                "url": {
                  "raw": "{{ApiUrl}}/financial/subscription",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "subscription"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "List financial subscriptions",
              "request": {
                "method": "GET",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{ApiUrl}}/financial/subscription",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "subscription"
                  ]
                }
              },
              "response": []
            },
            {
              "name": "Delete financial subscription",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json",
                    "type": "text"
                  }
                ],
                "url": {
                  "raw": "{{ApiUrl}}/financial/subscription?externalId=deal01",
                  "host": [
                    "{{ApiUrl}}"
                  ],
                  "path": [
                    "financial",
                    "subscription"
                  ],
                  "query": [
                    {
                      "key": "externalId",
                      "value": "deal01"
                    }
                  ]
                }
              },
              "response": []
            }
          ]
        }
      ]
    },
    {
      "name": "Health score",
      "item": [
        {
          "name": "List health scores",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/health_score?order=desc&sort=created_at&itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "health_score"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "desc"
                },
                {
                  "key": "sort",
                  "value": "created_at"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Meetings",
      "item": [
        {
          "name": "List meetings",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/calendar/meeting?order=desc&sort=created_at&itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "calendar",
                "meeting"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "desc"
                },
                {
                  "key": "sort",
                  "value": "created_at"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create or update meeting",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"title\": \"Product Demo\",\n    \"startAt\": \"2024-03-15T10:00:00.000Z\",\n    \"endAt\": \"2024-03-15T11:00:00.000Z\",\n    \"user_id\": \"user123\",\n    \"company_id\": \"company456\",\n    \"attendees\": [\n        {\n            \"email\": \"john@example.com\",\n            \"name\": \"John Doe\"\n        }\n    ],\n    \"description\": \"Demo of new features\",\n    \"location\": \"Zoom\"\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/calendar/meeting",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "calendar",
                "meeting"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete meeting by ID",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/calendar/meeting/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "calendar",
                "meeting",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "5ea93252e0263c08145d6948",
                  "description": "Meeting internal ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete meeting by externalId",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/calendar/meeting?externalId=google-calendar-event-123",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "calendar",
                "meeting"
              ],
              "query": [
                {
                  "key": "externalId",
                  "value": "google-calendar-event-123",
                  "description": "External system identifier"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Notes",
      "item": [
        {
          "name": "Create note",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"text\": \"This is a test note\",\n    \"entity\": \"5fa122c503daf62d6de9175c\",\n    \"entityModel\": \"Company\",\n    \"sticky\": true,\n    \"files\": [\n        \"634feb4d3d845b866653ea82\"\n    ]\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/note",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "note"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update note",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"text\": \"This is a test note - updated!\",\n    \"entity\": \"5fa122c503daf62d6de9175c\",\n    \"entityModel\": \"Company\",\n    \"sticky\": true\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/note/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "note",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify Note ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List notes",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/note?itemsPerPage=20&page=1&sorting[field]=updated_at&sorting[direction]=desc",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "note"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                },
                {
                  "key": "sorting[field]",
                  "value": "updated_at",
                  "description": "Sorting field"
                },
                {
                  "key": "sorting[direction]",
                  "value": "desc",
                  "description": "Sorting direction"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "NPS score",
      "item": [
        {
          "name": "Assign NPS score",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"score\": 9,\n    \"comment\": \"Almost perfect\",\n    \"submittedAt\": \"2021-04-10T12:00:00.000Z\"\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/nps_score/:entity",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "nps_score",
                ":entity"
              ],
              "variable": [
                {
                  "key": "entity",
                  "value": "",
                  "description": "Custify ID for the people"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "People",
      "item": [
        {
          "name": "Create or update people",
          "protocolProfileBehavior": {
            "disabledSystemHeaders": {
              "content-type": true
            }
          },
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"user_id\":\"test_12345\",\n    \"name\": \"John Doe\",\n    \"email\": \"john.doe@example.com\",\n    \"signed_up_at\": \"2020-11-01T12:00:00.000Z\",\n    \"custom_attributes\":{\n        \"sms_received\":12,\n        \"is_paying\": true,\n        \"channel\":\"social\",\n        \"last_interaction\":\"2020-11-02T12:00:00.000Z\"\n    }\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/people",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "people"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete people",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/people/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "people",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify People ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "View people",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/people/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "people",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify People ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List people",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/people/all?itemsPerPage=20&page=1&sorting[field]=updated_at&sorting[direction]=desc",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "people",
                "all"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page of items"
                },
                {
                  "key": "sorting[field]",
                  "value": "updated_at",
                  "description": "The field to sort by"
                },
                {
                  "key": "sorting[direction]",
                  "value": "desc",
                  "description": "Sorting direction"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Add/remove tag from people",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"ids\":[\n        \"5fa122c503daf62d6de9175c\"\n    ],\n    \"type\":\"add\",\n    \"tag\": \"5fa123e703daf62d6de9175d\"\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/people/tag",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "people",
                "tag"
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Person-Company Relationships",
      "item": [
        {
          "name": "List a person's company relationships",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/person_company_relationship/people/:personId",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "person_company_relationship",
                "people",
                ":personId"
              ],
              "variable": [
                {
                  "key": "personId",
                  "value": "",
                  "description": "Custify Person (Customer) ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List a company's people relationships",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/person_company_relationship/company/:companyId?page=1&itemsPerPage=20&sort=role&order=asc",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "person_company_relationship",
                "company",
                ":companyId"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "sort",
                  "value": "role",
                  "description": "Sort field: created_at, updated_at, role or linked_at"
                },
                {
                  "key": "order",
                  "value": "asc",
                  "description": "Sort direction: asc or desc"
                }
              ],
              "variable": [
                {
                  "key": "companyId",
                  "value": "",
                  "description": "Custify Company ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create or update a relationship",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"role\": \"Billing Contact\",\n    \"linked_at\": \"2024-01-15\",\n    \"custom_attributes\": {\n        \"seat_count\": 5\n    }\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/person_company_relationship/people/:personId/:companyId",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "person_company_relationship",
                "people",
                ":personId",
                ":companyId"
              ],
              "variable": [
                {
                  "key": "personId",
                  "value": "",
                  "description": "Custify Person (Customer) ID"
                },
                {
                  "key": "companyId",
                  "value": "",
                  "description": "Custify Company ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete a relationship",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/person_company_relationship/people/:personId/:companyId",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "person_company_relationship",
                "people",
                ":personId",
                ":companyId"
              ],
              "variable": [
                {
                  "key": "personId",
                  "value": "",
                  "description": "Custify Person (Customer) ID"
                },
                {
                  "key": "companyId",
                  "value": "",
                  "description": "Custify Company ID"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Segments",
      "item": [
        {
          "name": "List segments",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/segment?order=desc&sort=created_at&itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "segment"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "desc"
                },
                {
                  "key": "sort",
                  "value": "created_at"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Lifecycles",
      "item": [
        {
          "name": "List lifecycles",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/lifecycle?order=asc&sort=position&itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "lifecycle"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "asc",
                  "description": "Sort order (asc or desc)"
                },
                {
                  "key": "sort",
                  "value": "position",
                  "description": "Field to sort by"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Playbooks",
      "item": [
        {
          "name": "List playbooks",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/playbook?order=asc&sort=position&itemsPerPage=20&page=1&type=companies&includeCounts=true&nonScheduled=false",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "playbook"
              ],
              "query": [
                {
                  "key": "order",
                  "value": "asc",
                  "description": "Sort order (asc or desc)"
                },
                {
                  "key": "sort",
                  "value": "position",
                  "description": "Field to sort by"
                },
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                },
                {
                  "key": "type",
                  "value": "companies",
                  "description": "Type of playbook (companies or people)"
                },
                {
                  "key": "includeCounts",
                  "value": "true",
                  "description": "Include company counts in response"
                },
                {
                  "key": "nonScheduled",
                  "value": "false",
                  "description": "Filter out scheduled playbooks"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Tags",
      "item": [
        {
          "name": "Create tag",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\":\"Test tag 1\",\n    \"description\": \"This is a test tag\",\n    \"category\": \"people\"\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/tag",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "tag"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update tag",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\":\"Test tag 1 - updated\",\n    \"description\": \"This is a test tag\"\n}"
            },
            "url": {
              "raw": "{{ApiUrl}}/tag/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "tag",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify Tag ID"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List tags",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/tag?itemsPerPage=20&page=1&sorting[field]=updated_at&sorting[direction]=desc",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "tag"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                },
                {
                  "key": "sorting[field]",
                  "value": "updated_at",
                  "description": "Sorting field"
                },
                {
                  "key": "sorting[direction]",
                  "value": "desc",
                  "description": "Sorting direction"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete tag",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/tag/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "tag",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": "",
                  "description": "Custify Tag ID"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Tickets",
      "item": [
        {
          "name": "List all tickets",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/ticket?itemsPerPage=20&page=1&sort=openedAt&order=desc&filters=[{\"field\":\"ticketStatus\",\"values\":[\"open\"]}]&searchTerm=",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "ticket"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page (max 200)"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page number"
                },
                {
                  "key": "sort",
                  "value": "openedAt",
                  "description": "Field to sort by (e.g., openedAt, lastModifiedAt, priority)"
                },
                {
                  "key": "order",
                  "value": "desc",
                  "description": "Sort order: asc or desc"
                },
                {
                  "key": "filters",
                  "value": "[{\"field\":\"ticketStatus\",\"values\":[\"open\"]}]",
                  "description": "URL-encoded JSON array of filter objects"
                },
                {
                  "key": "searchTerm",
                  "value": "",
                  "description": "Search term to filter tickets by title, description, etc.",
                  "disabled": true
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List tickets for entity",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/ticket/:entity?itemsPerPage=20&page=1&sort=openedAt&order=desc&filters=[{\"field\":\"priority\",\"values\":[\"high\"]}]&searchTerm=",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "ticket",
                ":entity"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page (max 200)"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page number"
                },
                {
                  "key": "sort",
                  "value": "openedAt",
                  "description": "Field to sort by (e.g., openedAt, lastModifiedAt, priority)"
                },
                {
                  "key": "order",
                  "value": "desc",
                  "description": "Sort order: asc or desc"
                },
                {
                  "key": "filters",
                  "value": "[{\"field\":\"priority\",\"values\":[\"high\"]}]",
                  "description": "URL-encoded JSON array of filter objects"
                },
                {
                  "key": "searchTerm",
                  "value": "",
                  "description": "Search term to filter tickets by title, description, etc.",
                  "disabled": true
                }
              ],
              "variable": [
                {
                  "key": "entity",
                  "value": "5ea93252e0263c08145d6944",
                  "description": "Custify internal ID of company or person"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create a new ticket",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"externalId\": \"ab\",\n    \"title\": \"First ticket\",\n    \"description\": \"Description of the ticket\",\n    \"ticketStatus\": \"open\",\n    \"priority\": \"high\",\n    \"openedAt\": \"2021-12-25T15:00:00.000Z\",\n    \"lastModifiedAt\": \"2021-12-25T15:00:00.000Z\",\n    \"assignedToName\": \"John\",\n    \"people\": \"15\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/ticket",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "ticket"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update a ticket",
          "request": {
            "method": "PUT",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"ticketStatus\": \"closed\",\n    \"priority\": \"high\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/ticket/:ticketExternalId",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "ticket",
                ":ticketExternalId"
              ],
              "variable": [
                {
                  "key": "ticketExternalId",
                  "value": null,
                  "description": "External ID of the ticket"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete a ticket",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/ticket/:ticketExternalId",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "ticket",
                ":ticketExternalId"
              ],
              "variable": [
                {
                  "key": "ticketExternalId",
                  "value": null,
                  "description": "External ID of the ticket"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Add a new reply",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"type\": \"note\",\n    \"from\": \"Maria\",\n    \"body\": \"Reply to a ticket\",\n    \"submittedAt\": \"2022-01-07T07:00:00.000Z\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/ticket/:ticketExternalId/reply",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "ticket",
                ":ticketExternalId",
                "reply"
              ],
              "variable": [
                {
                  "key": "ticketExternalId",
                  "value": null,
                  "description": "External ID of the ticket"
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Time tracking",
      "item": [
        {
          "name": "List time tracks",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/time_track?itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "time_track"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Create a new time track",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Time track\",\n    \"startDate\": \"2024-09-10T22:01:01.000Z\",\n    \"duration\": 1800,\n    \"company\": \"5e99af63e3bce8ee27bd3ef0\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/time_track?user=:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "time_track"
              ],
              "query": [
                {
                  "key": "user",
                  "value": ":id"
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update a time track",
          "request": {
            "method": "PUT",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Time track\",\n    \"startDate\": \"2024-09-10T22:01:01.000Z\",\n    \"duration\": 1800,\n    \"company\": \"5e99af63e3bce8ee27bd3ef0\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/time_track/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "time_track",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "Delete a time track",
          "request": {
            "method": "DELETE",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/time_track/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "time_track",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          },
          "response": []
        }
      ]
    },
    {
      "name": "Tasks",
      "item": [
        {
          "name": "Create a new task",
          "request": {
            "method": "POST",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"name\": \"Contact the CEO\",\n    \"company\": \"6193c2a16ede8eb349d6766a\",\n    \"people\": \"61e03716ee8a3870e37ff821\",\n    \"description\": \"Description of the task\",\n    \"assignedTo\": \"60bf133b2ebfe03e6a190837\",\n    \"priority\": \"medium\",\n    \"dueDate\": \"2022-04-10T00:00:00+03:00\",\n    \"status\": \"open\",\n    \"files\": [\n        \"634feb4d3d845b866653ea82\"\n    ],\n    \"tags\": [\n        \"5d11d5687113bc33f07573f0\"\n    ],\n    \"checklist\": [\n        {\n            \"name\": \"Item 1\",\n            \"completed\": false,\n            \"dueDate\": \"2022-04-10T00:00:00+03:00\",\n            \"assignedTo\": \"60bf133b2ebfe03e6a190837\"\n        },\n        {\n            \"name\": \"Item 2 from checklist\",\n            \"completed\": false,\n            \"dueDate\": \"2022-04-11T00:00:00+03:00\",\n            \"assignedTo\": \"60bf133b2ebfe03e6a190837\"\n        }\n    ],\n    \"collaborators\": [\n        \"60bf133b2ebfe03e6a190837\"\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/task",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "task"
              ]
            }
          },
          "response": []
        },
        {
          "name": "Update an existing task",
          "request": {
            "method": "PUT",
            "header": [],
            "body": {
              "mode": "raw",
              "raw": "{\n    \"status\": \"done\",\n    \"files\": [\n        \"634feb4d3d845b866653ea82\"\n    ],\n    \"checklist\": [\n        {\n            \"name\": \"Item 1\",\n            \"completed\": true\n        },\n        {\n            \"name\": \"Item 2 from checklist\",\n            \"completed\": true\n        }\n    ],\n    \"collaborators\": [\n        \"jon@snow.com\"\n    ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{ApiUrl}}/task/:id",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "task",
                ":id"
              ],
              "variable": [
                {
                  "key": "id",
                  "value": ""
                }
              ]
            }
          },
          "response": []
        },
        {
          "name": "List tasks",
          "request": {
            "method": "GET",
            "header": [],
            "url": {
              "raw": "{{ApiUrl}}/task?itemsPerPage=20&page=1",
              "host": [
                "{{ApiUrl}}"
              ],
              "path": [
                "task"
              ],
              "query": [
                {
                  "key": "itemsPerPage",
                  "value": "20",
                  "description": "Number of items per page"
                },
                {
                  "key": "page",
                  "value": "1",
                  "description": "Current page"
                }
              ]
            }
          },
          "response": []
        }
      ]
    }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{ApiKey}}",
        "type": "string"
      }
    ]
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    },
    {
      "listen": "test",
      "script": {
        "type": "text/javascript",
        "exec": [
          ""
        ]
      }
    }
  ]
}
