Change when a tip is posted to the acting user's inbox
const url = 'http://localhost:11044/api/v1/hints/schedule';const options = { method: 'PUT', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"frequency":"NEVER","hour":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:11044/api/v1/hints/schedule \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "frequency": "NEVER", "hour": 1 }'Takes effect at once: the job is rescheduled before this returns. NEVER removes it.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The whole schedule, replacing the one stored in the signed-in user’s world. frequency is NEVER, DAILY, WEEKDAYS (Monday to Friday) or WEEKLY (Mondays), default WEEKDAYS; NEVER removes the job. hour is the hour, 0-23 in the user’s own zone, a tip is posted at, default 9. A field left out takes its default, not the stored value; the record of tips already posted is kept
When a tip is posted to the acting user’s inbox, as a frequency preset and an hour; the body of PUT /hints/schedule
object
How often a tip is posted; NEVER turns tips off. Defaults to WEEKDAYS when absent
Hour of day, 0-23, in the user’s own time zone. Defaults to 9 when absent; outside 0-23 is a 400
Responses
Section titled “Responses”The schedule now in force
The acting user’s tip schedule and the cron expression it runs on; answered by GET and PUT /hints/schedule
object
Spring six-field cron expression the schedule runs on (second minute hour day month day-of-week), read in the user’s own time zone; null when frequency is NEVER
How often a tip is posted to the inbox; NEVER means tips are off
Hour of day (0-23) the tip is posted, in the user’s own time zone
Unknown frequency, or an hour outside 0-23
Not authenticated

