REST API: Create Contact: Company Name and Tags

Hi @Anton_Loukine, you’re correct that there is not a dedicated service for companies like there is for contacts in XML-RPC, but you can use DataService to access any of the supported tables.

Here’s an example request that will add a company:

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
  <methodName>DataService.add</methodName>
  <params>
    <param>
      <value>
        <string>{{privateKey}}</string>
      </value>
    </param>
    <param>
      <value>
        <string>Company</string>
      </value>
    </param>
    <param>
      <value>
        <struct>
          <member>
            <name>Company</name>
            <value>My Test Company</value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodCall>

Here is an example request for deleting a company:

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
  <methodName>DataService.delete</methodName>
  <params>
    <param>
      <value>
        <string>{{privateKey}}</string>
      </value>
    </param>
    <param>
      <value>
        <string>Company</string>
      </value>
    </param>
    <param>
      <value>
        <string>3514</string>
      </value>
    </param>
  </params>
</methodCall>

Hope this helps!