Skip to main content
Solved

Unable to send mail using template API

  • December 14, 2020
  • 2 replies
  • 1316 views

Forum|alt.badge.img+2

{

    "status": 401,

    "message": "Your account must be verified to perform this request. Please email success@klaviyo.com to verify your account."

}
I have getting the above response when using this API https://a.klaviyo.com/api/v1/email-template/SDSfDm/send.
I have already got the account verified mail from Klaviyo but still the same response message from the API.
 

this is my request

curl --location --request POST 'https://a.klaviyo.com/api/v1/email-template/SDSfDm/send' \

--header 'Content-Type: application/x-www-form-urlencoded' \

--data-urlencode 'api_key=pk_****************************' \

--data-urlencode 'from_email=myMail@gmail.com' \

--data-urlencode 'from_name=Test' \

--data-urlencode 'subject=Your Weekly Summary' \

--data-urlencode 'to=[{ "email" : "example@mailinator.com", "name" : "Test" }]' \

--data-urlencode 'context={ "organization": {"name":"xxxxx","full_address":"xxxxx" } }'

Does anyone have any Idea on this:sweat: ??

Best answer by retention

@Mridul Raj - Are these transactional emails you want to send via the API?  In the past, when we wanted to send emails directly via the API, we had to get approval from Klaviyo for the exact templates first since the recipients may not have opted in for “marketing.”  I think you have a “Verified Account” but not verified to send transactional emails for specific email templates.  

As you can imagine, this method to send emails can be highly abused to use Klaviyo as a “dumb pipe” for spam emails since you can put any email address in there at runtime - so I imagine they want to make sure the templates you send are above board.  

Klaviyo has some basic documentation here:
Ability to Send Transactional Emails with Klaviyo

 

View original
Did this topic or the replies in the thread help you find an answer to your question?

2 replies

retention
Partner - Platinum
Forum|alt.badge.img+62
  • 2025 Champion
  • 944 replies
  • Answer
  • December 15, 2020

@Mridul Raj - Are these transactional emails you want to send via the API?  In the past, when we wanted to send emails directly via the API, we had to get approval from Klaviyo for the exact templates first since the recipients may not have opted in for “marketing.”  I think you have a “Verified Account” but not verified to send transactional emails for specific email templates.  

As you can imagine, this method to send emails can be highly abused to use Klaviyo as a “dumb pipe” for spam emails since you can put any email address in there at runtime - so I imagine they want to make sure the templates you send are above board.  

Klaviyo has some basic documentation here:
Ability to Send Transactional Emails with Klaviyo

 


cassy.lee
Forum|alt.badge.img+9
  • Klaviyo Alum
  • 271 replies
  • December 18, 2020

@Mridul Raj just echoing what @retention mentioned here - curious to know what the use case is? The API endpoint is meant for testing, rather than for sending emails because there is a hard cap on how many sends one accounts gets to use it for. 

There are more details in this Klaviyo API doc, but specifically, if you’re looking to render templates and send emails, the API is intended to test templates only, and is rate limited to the following thresholds:

  • 100 / hour
  • 1,000 / day