Change which emails you receive
const url = 'https://api.hyperresearch.ai/v1/account/email-preferences';const options = { method: 'PATCH', headers: {cookie: 'hr_session=<hr_session>', 'Content-Type': 'application/json'}, body: '{"runs":true,"product":true,"onboarding":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.hyperresearch.ai/v1/account/email-preferences \ --header 'Content-Type: application/json' \ --cookie hr_session=<hr_session> \ --data '{ "runs": true, "product": true, "onboarding": true }'Sets any of the switches. An omitted field is left as it stands. Legal notices are not settable: sending legal is ignored rather than refused, because a client that asks to stop receiving them has misunderstood rather than misbehaved.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "runs": true, "product": true, "onboarding": true}Responses
Section titled “ Responses ”Your email preferences, after the change
object
Emails about your own runs: the report is ready, the run stopped and was refunded, the run is waiting on a question. On by default.
Account housekeeping: a card was added, a payment was declined. On by default.
Tips for a new account: a welcome when you sign up and, if no run has started, one reminder a day later. Separate from product, so turning these off never stops a payment-failed email. On by default.
Always true. Notice of a material change to the Terms, of the service being discontinued, or of a security incident is sent whatever these switches say — it is an obligation under the agreement, not a subscription. There is no field to turn it off and no column behind one.
Examplegenerated
{ "runs": true, "product": true, "onboarding": true, "legal_notices_always": true}Headers
Section titled “Headers”Example
"reads";q=60;w=60The quota policy this request was counted against (draft-ietf-httpapi-ratelimit-headers): "<bucket>";q=<requests>;w=<window seconds>, e.g. "reads";q=60;w=60. Buckets: reads 60/min, status 600/min, creates 10/min, writes 20/min per credential; public 300/min per network on keyless routes.
Example
"reads";r=57;t=41Remaining quota in the current window: "<bucket>";r=<remaining>;t=<seconds until reset>, e.g. "reads";r=57;t=41.
Requests allowed per window in this bucket (legacy form of RateLimit-Policy).
Requests left in this window (legacy form of RateLimit).
Unix time (seconds) when the window resets.
Which bucket counted the request: reads, status, creates, writes or public.
Invalid request
object
object
Example
{ "error": { "type": "invalid_request", "code": "missing_api_key", "request_id": "req_01J9ZQ7V6H0000000000000000" }}Authentication failed
object
object
Example
{ "error": { "type": "invalid_request", "code": "missing_api_key", "request_id": "req_01J9ZQ7V6H0000000000000000" }}Insufficient scope or plan
object
object
Example
{ "error": { "type": "invalid_request", "code": "missing_api_key", "request_id": "req_01J9ZQ7V6H0000000000000000" }}Not found
object
object
Example
{ "error": { "type": "invalid_request", "code": "missing_api_key", "request_id": "req_01J9ZQ7V6H0000000000000000" }}Rate limited or over quota
object
object
Example
{ "error": { "type": "invalid_request", "code": "missing_api_key", "request_id": "req_01J9ZQ7V6H0000000000000000" }}Headers
Section titled “Headers”Seconds to wait before retrying. Always present on a 429.
Example
"reads";q=60;w=60The quota policy this request was counted against (draft-ietf-httpapi-ratelimit-headers): "<bucket>";q=<requests>;w=<window seconds>, e.g. "reads";q=60;w=60. Buckets: reads 60/min, status 600/min, creates 10/min, writes 20/min per credential; public 300/min per network on keyless routes.
Example
"reads";r=57;t=41Remaining quota in the current window: "<bucket>";r=<remaining>;t=<seconds until reset>, e.g. "reads";r=57;t=41.
Requests allowed per window in this bucket (legacy form of RateLimit-Policy).
Requests left in this window (legacy form of RateLimit).
Unix time (seconds) when the window resets.
Which bucket counted the request: reads, status, creates, writes or public.
Internal error
object
object
Example
{ "error": { "type": "invalid_request", "code": "missing_api_key", "request_id": "req_01J9ZQ7V6H0000000000000000" }}