Why doesn’t the Calendar API allow insertion, update, or deletion of Calendar objects where eventType!=PUBLISHING_TASK?
All of the objects listed under the “Schedule” dropdown have dedicated APIs. If you create any of these objects and schedule them to be posted/sent out at a future date they will display automatically on the Calendar.
What do you mean by “Schedule dropdown”? Is that a section of the API docs? I looked [here] (http://developers.hubspot.com/docs/overview) but couldn’t see anything. If you mean that all the Calendar objects have a dedicated APIs elsewhere, why are we able to insert/update/delete tasks?
In the top right hand corner of the Calendar tool in-app there is a dropdown that allows you to create a number of objects other than tasks. I had assumed these were the objects that you were referring to. If that’s the case, they all have dedicated endpoints which you can use.
If you are talking about creating different task types, you should use the
category param to select one of BLOG_POST, EMAIL, LANDING_PAGE, CUSTOM.
For the purposes of my app, all I have access to are the API endpoints listed in the docs. So what I’m using to create events related to the Calendar API are just the resources (i.e. URLs) referred to in the picture below.
What I’m trying to figure out is why we can create an event where
eventType is PUBLISHING_TASK, but we can’t create an event where
eventType is SOCIAL or CONTENT. We can list events where
eventType is SOCIAL or CONTENT, but we can’t insert/update or delete these types of events. In short, why is there an endpoint to “Create Task”, but no endpoint to “Create Content” or “Create Social”?
Thanks for the info!
The eventType content refers to blog posts, emails, and landing pages, and the eventType social refers to social media posts. Each of these items have dedicated APIs.
If you for instance schedule a blog post, it will show up on the Calendar on the date scheduled, but the actual creation and scheduling of the blog post is not related to the Calendar API it is related to the COS Blog API.
That makes sense. Thanks!
@seb_fairchild I’ve created a content event scheduled (landing page publishing) for July 30, and I can see it when I look at the Calendar using the HubSpot UI. But when I make the following query:
I get nothing back. The end date is for yeah 46901 so it should be returned. Am I using the endpoint incorrectly?
It seems like setting the timestamp out that far is failing silently. In my own tests if I set the timestamp out to the end of the month using a value like
1469764800000 for instance I get a response, but if I use the
endDate you are using in your request I don’t get a response.
Try setting the timestamp out to the end of 2016 instead.
That fix worked for me, thanks.
The timestamp I mentioned before works for the List events endpoint – it’s actually the
endDate suggested by the API docs for all three of the Calendar endpoints. It’s strange that it would work for one of these endpoints but not the others.