Insightly CRM API can’t add a new TAG

If you are one of the unlucky ones in need of working with Insightly API, you have probably noticed there’s no way to create a TAG under Contact endpoint.

If you follow the documentation, you probably do a CURL request similar to this:


        $username = 'xxxxx'; // api key
        $ch = curl_init('https://api.insightly.com/v3.0/Contacts/');

        curl_setopt($ch, CURLOPT_HTTPHEADER, [
            'Content-Type: application/json',
            'Authorization: Basic '. base64_encode($username)
        ]);

        $dataString = json_encode(array(
            'FIRST_NAME' => 'First',
            'LAST_NAME' => 'Last',
            'EMAIL_ADDRESS' => 'test@test.sk',
            "TAGS" => array(
                array("TAG_NAME" => "TEST")
            )
        ));

        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $dataString);
        curl_setopt($ch , CURLOPT_HEADER, 1);
        curl_setopt($ch , CURLOPT_TIMEOUT, 30);
        curl_setopt($ch , CURLOPT_RETURNTRANSFER, TRUE);
        $return = curl_exec($ch );

        $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE);
        $header = substr($return, 0, $header_size);
        $body = substr($return, $header_size);

And all you get in return is 400 Bad Request!
Even if you try to update existing Contact using https://api.insightly.com/v3.0/Contacts/{ID}/Tags endoing you won’t have any more luck.

The solution is simple – go back to 2.3 endpoints – the exact same post data works on 2.3!

Insightly has done a really poor job on their API ..

Bottom line – change https://api.insightly.com/v3.0/Contacts/ to https://api.insight.ly/v2.3/Contacts/

Write a Comment

Comment

Webmentions

  • vente kamagra

    nejlevnější náhrada kamagra

    nákup kamagra online z kanady

  • ordering xifaxan generic online cheapest

    online order xifaxan buy dublin

    xifaxan pay by cod

  • cheapest buy itraconazole canada over the counter

    buy cheap itraconazole generic from canadian pharmacy

    how to order itraconazole toronto canada

  • best prices on generic gabapentin

    generic gabapentin canada pharmacys

    get gabapentin australia purchase

  • buy fildena generic alternative

    get fildena canada purchase

    get fildena usa online pharmacy

  • discount dutasteride buy online australia

    how to buy dutasteride generic new zealand

    ordering dutasteride no prescription overnight delivery

  • cheap flexeril cyclobenzaprine generic ireland

    cheap flexeril cyclobenzaprine canada

    ordering flexeril cyclobenzaprine usa drugstore

  • cheapest buy enclomiphene generic brand

    buy enclomiphene in United Kingdom

    where can i find the cheapest price for enclomiphene

  • kamagra sans ordonnance ni adhésion

    kamagra comprar peru

    où puis-je trouver le prix le moins cher pour kamagra

  • buy cheap avodart uk pharmacy

    cheap avodart price discount

    Cheap avodart no perscription

  • purchase staxyn generic is it legal

    buy cheap staxyn purchase tablets

    buy staxyn cost uk

  • cheap rifaximin generic europe

    cheapest buy rifaximin generic name

    discount rifaximin purchase tablets

  • get androxal singapore where to buy

    androxal australia legal import

    cheapest buy androxal generic when will be available