# Marketing events APi

**URL:** <https://community.hubspot.com/t/marketing-events-api/87783>\
**Category:** APIs & Integrations\
**Tags:** developer-tools, timeline-and-extensions-apis\
**Created:** [August 18, 2023, 7:14am UTC](https://community.hubspot.com/t/marketing-events-api/87783 "2023-08-18T07:14:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elty/32/58580_2.png) [@Elty](https://community.hubspot.com/u/Elty)\
**Post date:** [August 18, 2023, 7:14am UTC](https://community.hubspot.com/t/marketing-events-api/87783/1 "2023-08-18T07:14:55Z")

</div>

I can create an event through the api, but when i want a user to set it’s attendance i always get the following error.

`{ "status": "error", "message": "externalAccountId is required", "correlationId": "9d197a12-ced1-450d-ac68-96bdeb1a0c40"}`

Anybody an idea how to fix this or can make it work?

But in my call i give a externalId with it? The externalId is the same name as the marketingEvent name just to make it unique.

`curl --location 'https://api.hubapi.com/marketing/v3/marketing-events/attendance/632552/attend/email-create' \--header 'Content-Type: application/json' \--header 'Authorization: Bearer <TOKEN>' \--data-raw '{ "inputs": [{ "interactionDateTime": 0, "email": "john@doe.com", }]}'`

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [August 18, 2023, 12:32pm UTC](https://community.hubspot.com/t/marketing-events-api/87783/2 "2023-08-18T12:32:28Z")

</div>

Hi @Elty

Use updated curl. And also put the value in required variables like {externalEventId} and {externalAccountId}

curl --request POST \  
--url ‘[https://api.hubapi.com/marketing/v3/marketing-events/attendance/{externalEventID}/attend/email-create?externalAccountId={externalAccountId}](https://api.hubapi.com/marketing/v3/marketing-events/attendance/%7BexternalEventID%7D/attend/email-create?externalAccountId=%7BexternalAccountId%7D)’ \  
--header ‘authorization: Bearer YOUR\_ACCESS\_TOKEN’ \  
--header ‘content-type: application/json’ \  
--data ‘{  
“inputs”: [  
{  
“interactionDateTime”: 0,  
“email”: “[mayank.sharma@growthnatives.com](mailto:mayank.sharma@growthnatives.com)”  
}  
]  
}’

Hope this will helps you out. Please mark it as **Solution Accepted & Upvote** to help other Community member.  
Thanks!

---

<div class="post-metadata">

**Author:** ![Elty](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/elty/32/58580_2.png) [@Elty](https://community.hubspot.com/u/Elty)\
**Post date:** [August 18, 2023, 3:04pm UTC](https://community.hubspot.com/t/marketing-events-api/87783/3 "2023-08-18T15:04:47Z")

</div>

yeah that was the problem indeed! you are a hero! thanks 😄
