# Is it possible to set the aggday with the API?

**URL:** <https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994>\
**Category:** Tech\
**Created:** [June 16, 2018, 8:37pm UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994 "2018-06-16T20:37:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluetulip](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bluetulip](https://forum.beeminder.com/u/bluetulip)\
**Post date:** [June 16, 2018, 8:37pm UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994/1 "2018-06-16T20:37:36Z")

</div>

I’m wondering if it would be possible to set the aggday with the API, either for existing or new goals.

I’ll admit that I’d use it to cheat and change custom settings without that high a premium plan, but I also want to use it to set it appropriately for an integration that hopefully I’m going to get around to finishing eventually.

---

<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:** [June 25, 2018, 9:59pm UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994/2 "2018-06-25T21:59:16Z")

</div>

Should be possible!

---

<div class="post-metadata">

**Author:** ![bluetulip](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bluetulip](https://forum.beeminder.com/u/bluetulip)\
**Post date:** [June 26, 2018, 12:45am UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994/3 "2018-06-26T00:45:59Z")

</div>

Thanks. By “should” do you mean “desirable” or “expected”?

If you mean expected:[This](http://api.beeminder.com/#putgoal) seems to be the update goal endpoint and it worked for setting title (which is listed there) but not if I did aggday (which isn’t). Is there something different I should be doing?

If you mean “desirable”: I wouldn’t ask you to put any work into making it possible until I actually write that integration.

---

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/philip/32/1505_2.png) [@philip](https://forum.beeminder.com/u/philip)\
**Post date:** [June 27, 2018, 4:47pm UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994/4 "2018-06-27T16:47:28Z")

</div>

I’d say expected, though with a degree of accident rather than intention for anything that’s not documented at [api.beeminder.com](http://api.beeminder.com)

A lot is exposed through the API that isn’t strictly desirable and that maybe shouldn’t be available to everyone given the different premium subscriptions. But it would take some effort to restrict what you can do, and we haven’t yet done that. Not least because it’s your own goals you’re hacking and your custom stuff may help us understand missing features, etc.

PS: the easiest form of restriction would be to not even give out an API `auth_token` unless you’re Bee Plus or higher, i.e. eligible to customise goal in the web interface.

---

<div class="post-metadata">

**Author:** ![bee](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.beeminder.com/bee/32/41_2.png) [@bee](https://forum.beeminder.com/u/bee)\
**Post date:** [June 28, 2018, 1:13am UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994/5 "2018-06-28T01:13:25Z")

</div>

Yes, “should” above means undocumented but I’d expect it to work on update (but not create). I did just do a sanity check and found that it does indeed set aggday if you pass in aggday to the goal update endpoint.

Aggday is weird arcane stuff with surprising results, so should definitely be used with care. That’s a thing that’s behind the paywall as much to protect users from it as anything. But I guess we assume that people who are willing and able to interface with the API are maybe more ready/capable of dealing with the consequences. That’s the theory anyway.

---

<div class="post-metadata">

**Author:** ![bluetulip](https://avatars.discourse-cdn.com/v4/letter/b/94ad74/32.png) [@bluetulip](https://forum.beeminder.com/u/bluetulip)\
**Post date:** [October 6, 2018, 2:36pm UTC](https://forum.beeminder.com/t/is-it-possible-to-set-the-aggday-with-the-api/3994/6 "2018-10-06T14:36:15Z")

</div>

Thanks, knowing that it would work on update but not create was key. I’m finally writing this into an integration, and it’s working. I create a goal with `goal_type` `custom` and then I immediately update it to set the custom settings I need.
