Emails with filters on to address, from address, cc address, and attachments

Hello!


I'm trying to get emails along with their filter on to, from, cc, and attachments using curl PHP
But it shows as shown in the image attached.

Please help to figure it out.

Many thanks for considering my request.

  • Hi  , 

    To fetch emails you'll have to hit the Emails endpoint like for another module. 

    If you want to get all the fields from a specific email record this code should do it: 

    //  cURL options
    curl_setopt_array($curl, array(
    CURLOPT_URL => "https://INSTANCE_URL/rest/v11_24/Emails/EMAIL_ID",
    CURLOPT_RETURNTRANSFER => true, // Return the response as a string
    CURLOPT_ENCODING => "", // Handle all encodings
    CURLOPT_MAXREDIRS => 10, // Maximum number of redirects
    CURLOPT_TIMEOUT => 30, // Timeout for the request
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, // HTTP version
    CURLOPT_CUSTOMREQUEST => "GET", // Request method
    CURLOPT_HTTPHEADER => array(
    "OAuth-Token: REPLACE_WITH_OAuth-Token", // Replace with your actual OAuth token
    "Accept: application/json" // Set the expected response format
    ),
    ));
    
    
    // Execute the request
    $response = curl_exec($curl);

    Can you clarify if this is what you are looking for? 

    Cheers, 

    André