Crie sua conta grátis e teste por 7 dias ( não precisa adicionar cartão de crédito )

Atualizar Contato

Atualizar Contato

Atualizar Contato
PHP
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://painel.robomensageiro.com.br/api/contact/update',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "id": "24294",
    "name": "Teste Atualizando Nome",
    "number": "5511978097649",
    "email": "email@email.com",
    "carteiraId": "", // null ou vazio para não utilizar
    "extraInfo": [
        {
            "name": "Código",
            "value": "43242er32"
        },
        {
            "name": "Valor do Lead",
            "value": "100,00"
        },
        {
            "name": "CEP",
            "value": "01310200"
        }
    ]
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer tokenmeu'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Retorno com sucesso:

JSON
{
    "id": 24294,
    "name": "Teste Atualizando Nome",
    "number": "5511978097649",
    "email": "email@email.com",
    "companyId": 1,
    "acceptAudioMessage": true,
    "active": true,
    "profilePicUrl": "",
    "extraInfo": [
        {
            "id": 21,
            "name": "Código",
            "value": "43242er32",
            "contactId": 24294,
            "createdAt": "2023-12-10T20:03:51.633Z",
            "updatedAt": "2023-12-10T20:03:51.633Z"
        },
        {
            "id": 20,
            "name": "CEP",
            "value": "01310200",
            "contactId": 24294,
            "createdAt": "2023-12-10T20:03:51.633Z",
            "updatedAt": "2023-12-10T20:03:51.633Z"
        },
        {
            "id": 22,
            "name": "Valor do Lead",
            "value": "100,00",
            "contactId": 24294,
            "createdAt": "2023-12-10T20:03:51.633Z",
            "updatedAt": "2023-12-10T20:03:51.633Z"
        }
    ]
}
Atendimento por WhatsAppAtendimento
WhatsApp