# Error creating datapoints

**URL:** <https://forum.beeminder.com/t/error-creating-datapoints/7776>\
**Category:** Tech\
**Created:** [February 5, 2021, 2:44pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776 "2021-02-05T14:44:22Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![louispotok](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@louispotok](https://forum.beeminder.com/u/louispotok)\
**Post date:** [February 5, 2021, 2:44pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776/1 "2021-02-05T14:44:22Z")

</div>

Hi, this feels like I must be missing something obvious but I can’t figure it out.

I’m trying to create [multiple datapoints](https://api.beeminder.com/#postdatas) through the Beeminder API, using the python requests library.

```auto
datapoint = {"value": 100, "comment": "test", "daystamp": "20210203"}
payload = {"auth_token": XXXX, "datapoints":[datapoint]}
resp = requests.post(URL, json=payload)

```

This gives a 422 with the response: `'{"errors":{"value":["can\'t be blank","is not a number"]}}'`.

However using the same data to create a single datapoint works just fine.

```auto
resp2=requests.post(URL, json={"auth_token": XXXX, **datapoint})

```

Any thoughts on what I might be doing wrong?

---

<div class="post-metadata">

**Author:** ![adamwolf](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/adamwolf/32/484_2.png) [@adamwolf](https://forum.beeminder.com/u/adamwolf)\
**Post date:** [February 5, 2021, 3:34pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776/2 "2021-02-05T15:34:18Z")

</div>

What’s the actual network traffic look like? Usually, this sort of issue clears up once you see the actual HTTP calls.

---

<div class="post-metadata">

**Author:** ![krugerk](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/krugerk/32/5161_2.png) [@krugerk](https://forum.beeminder.com/u/krugerk)\
**Post date:** [February 5, 2021, 4:54pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776/3 "2021-02-05T16:54:29Z")

</div>

The documentation would seem to imply timestamp is required when submitting multiple datapoints at once using create\_all.json where it is optional when submitting just one using datapoints.json.

In fact, value seems to be the only required property when creating just one and all of timestamp, value, and comment are required on create\_all.

---

<div class="post-metadata">

**Author:** ![louispotok](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@louispotok](https://forum.beeminder.com/u/louispotok)\
**Post date:** [February 5, 2021, 6:01pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776/4 "2021-02-05T18:01:46Z")

</div>

Sorry, this was my mistake – was using the same url in both calls (datapoints.json rather than datapoints/create\_all.json). And looks like the documentation is incorrect, I can create multiple datapoints with daystamp only just fine.

Thanks for your help!

---

<div class="post-metadata">

**Author:** ![krugerk](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/krugerk/32/5161_2.png) [@krugerk](https://forum.beeminder.com/u/krugerk)\
**Post date:** [February 6, 2021, 12:20pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776/5 "2021-02-06T12:20:50Z")

</div>

> [@louispotok](#):
>
> And looks like the documentation is incorrect, I can create multiple datapoints with daystamp only just fine.

Thanks for the feedback. Ticket created:

> <https://github.com/beeminder/apidocs/issues/32>
>
> See \[forum comment\](https://forum.beeminder.com/t/error-creating-datapoints/7776…/4)
> 
> A user noted, while troubleshooting creating one datapoint vs creating many, that what the api/backend accepted and what the api doc describes do not match.
> 
> Bring them in sync.

---

<div class="post-metadata">

**Author:** ![dreev](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/dreev/32/4311_2.png) [@dreev](https://forum.beeminder.com/u/dreev)\
**Post date:** [August 25, 2021, 9:50pm UTC](https://forum.beeminder.com/t/error-creating-datapoints/7776/6 "2021-08-25T21:50:46Z")

</div>

Fixed! [http://beeminder.com/changelog#3851](http://beeminder.com/changelog#3851)
