IntroductionWorking with recordsActivity reportsMCP server for AI AgentsWebhook notificationsWebhook managementExamplesBatching RequestsIncoming call screen pop

Examples

XML, JSON, Form Encoded

Every kind of item can be created, updated or destroyed with three supported Content-Type formats: XML, JSON and Form-Encoded. The following example of creating web site activity for a contact demonstrates each format.

XML

<?xml version="1.0" encoding="utf-8"?>
<request>
  <parent>{parentId}</parent>
    <data>
        <caption>website created from api</caption>
        <url>http://test.site.com</url>
    </data>
</request>

JSON

{"parent":"{parentId}","data":{"caption":"website created from api","url":"http:\/\/test.site.com"}}

Form-encoded (provided by html form)

parent={parentId}&data%5Bcaption%5D=website+created+from+api&data%5Burl%5D=http%3A%2F%2Ftest.site.com