0
        const apiEndpoint = 'https://app.heysender.com/api/domains';
        const apiKey = '************';
        const apiSecret = '****************';
        const authString = `${apiKey}:${apiSecret}`;
        const base64AuthString = base64url.encode(authString);
        const authorizationHeader = `Basic ${base64AuthString}`; 
        const domain1 = {
            url: domain,
            dkim_key: privateKeyPem,
        };
        const headers = {
            'Content-Type': 'application/json',
            Authorization: authorizationHeader,
        };
        const response = await axios.post(apiEndpoint, domain1, { headers });
        const responseData = response.data;
        const domainUrl = responseData.url;
        console.log(response, "doaminUrl");

i got this in result status code 200 but in heysender documentation its status code 201.

  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Jul 10 '23 at 03:38

0 Answers0