Single Send API - ERROR "Could not find email"

I’m having some issues with the single send api:

This is the resonse error message:

<Response [400]>

{'status': 'error', 'message': 'Could not find email -- portalId: 7222820, emailId: 168327023110', 'correlationId': 'a792e01a-ed3e-4dac-a06d-616618bdfa4b', 'sendResult': 'MISSING_CONTENT'}

It looks like the email_id is wrong. I copied it from the URL of the template email:

I set up a very basic template and am trying to send it to myself. Here is the python code:

import requests

auth_token = ******

email_id = 168327023110

url = 'https://api.hubapi.com/marketing/v4/email/single-send'

data = {

 "emailId": email_id,

 "message": {"to": "redacted@redacted.com", }

}

headers = {'Authorization': f'Bearer {auth_token}',

 'Content-Type': 'application/json'}

response = requests.post(url, json=data, headers=headers)

template:

I also tried the CURL example with my email ID and am getting the same response.

Hello!

It is possible that your error is because you are providing the template ID and not an email ID.

Try creating a new email using this template and once designed, save it as a one-time email (in the actions within the editor).

If you need any additional screenshots or help, don’t hesitate to contact me.
Also you can contact me here.
Regards

This is indeed the correct answer.

Thnk you. That was the main issue. There is also an action to convert the email to single-send which was also needed.