Discussion

Ask a Question
Back to All

Custom Date Fields with API

I saw in the documentation how to create a new entity using the API with XML. Is the format the same for JSON, and if so can dates be added in the same way?
For example, if I wanted to create an entity in the project with id 1 and with a custom date field called FinalLiveDate, would the following work? If not what do I need to change?

POST /api/v1/UserStories?resultFormat=json&resultInclude=[Id,Name,Project] HTTP/1.1
Content-Type: application/json

{Name:"New Userstory",
Project:{Id:378},
CustomFields:{
Field:{
Name:"FinalLiveDate",
Value:"3/31/2017"
}
}
}