{"openapi":"3.1.0","info":{"title":"Okidoki Analytics API","version":"1","summary":"Cookieless web analytics. Every answer has a sentence to repeat and the data.","description":"Everything a person can do in Okidoki, an agent or a script can do here. Every answer is `{ \"message\", \"data\" }`; every error is `{ \"error\": { \"code\", \"message\", \"status\", \"request_id\", \"docs\" } }`. Version 1 only grows: fields and endpoints are added, never removed or renamed. See https://docs.okidoki.sh/api.","contact":{"name":"Okidoki","email":"hello@okidoki.sh","url":"https://okidoki.sh"},"termsOfService":"https://okidoki.sh/terms"},"externalDocs":{"description":"API docs","url":"https://docs.okidoki.sh/api"},"servers":[{"url":"https://okidoki.sh/api/v1","description":"EU (Stockholm)"}],"security":[{"apiKey":[]}],"tags":[{"name":"Meta"},{"name":"Start"},{"name":"Sites"},{"name":"Reports"},{"name":"Your data"},{"name":"Goals and funnels"},{"name":"Campaigns and ads"},{"name":"Share links"},{"name":"Webhooks and events"},{"name":"Plus"},{"name":"Integrations"},{"name":"Account"},{"name":"Keys and team"},{"name":"Sign-in (web app)"}],"paths":{"/":{"get":{"operationId":"get_root","summary":"Lists every endpoint, report, period and filter","description":"No key needed.","tags":["Meta"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/openapi.json":{"get":{"operationId":"get_openapijson","summary":"This OpenAPI description","description":"No key needed.","tags":["Meta"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/start":{"post":{"operationId":"post_start","summary":"Creates an account, a site and a key in one call, for agents","description":"No key needed.","tags":["Start"],"security":[],"x-okidoki-key":"none","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"The person's email.","format":"email"},"site":{"type":"string","description":"The site address, like mysite.com."},"timezone":{"type":"string","description":"IANA time zone, like Europe/Stockholm."}},"required":["email"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/claim":{"post":{"operationId":"post_auth_claim","summary":"Reads a claim link","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/claim/options":{"post":{"operationId":"post_auth_claim_options","summary":"Passkey options to claim an account","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/claim/verify":{"post":{"operationId":"post_auth_claim_verify","summary":"Claims an account with a new passkey","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/guest":{"post":{"operationId":"post_auth_guest","summary":"Starts a guest account, saved later","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/guest/link":{"post":{"operationId":"post_auth_guest_link","summary":"Saves a guest account with a sign-in link","description":"Only a person signed in with a passkey in the web app.","tags":["Sign-in (web app)"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/guest/handoff":{"post":{"operationId":"post_auth_guest_handoff","summary":"Lets an existing account take over a guest account","description":"Only a person signed in with a passkey in the web app.","tags":["Sign-in (web app)"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/guest/merge":{"post":{"operationId":"post_auth_guest_merge","summary":"Moves a guest account’s sites into this account","description":"Only a person signed in with a passkey in the web app.","tags":["Sign-in (web app)"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/register/options":{"post":{"operationId":"post_auth_register_options","summary":"Passkey options to sign up","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/register/verify":{"post":{"operationId":"post_auth_register_verify","summary":"Signs up with a passkey","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/login/options":{"post":{"operationId":"post_auth_login_options","summary":"Passkey options to sign in","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/login/verify":{"post":{"operationId":"post_auth_login_verify","summary":"Signs in with a passkey","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/link/send":{"post":{"operationId":"post_auth_link_send","summary":"Sends a sign-in link by email","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/link":{"post":{"operationId":"post_auth_link","summary":"Reads a sign-in link","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/link/verify":{"post":{"operationId":"post_auth_link_verify","summary":"Signs in with a link","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/code/verify":{"post":{"operationId":"post_auth_code_verify","summary":"Signs in with the six-digit code from the sign-in email","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/logout":{"post":{"operationId":"post_auth_logout","summary":"Signs out","description":"Only a person signed in with a passkey in the web app.","tags":["Sign-in (web app)"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me":{"get":{"operationId":"get_me","summary":"The account, its plan and what the key may do","description":"Any API key.","tags":["Account"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_me","summary":"Changes account settings","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"weekly_email":{"type":"boolean","description":"The Monday email."},"emails":{"type":"object","description":"Email kinds on or off, like {\"alerts\": false}."},"language":{"type":"string","description":"Language of emails and the app, like sv."},"currency":{"type":"string","description":"Currency for revenue, like SEK."},"waiting_for_site":{"type":"boolean","description":"No website yet: email at most twice to ask whether it is ready. Send alone."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_me","summary":"Deletes the account and everything in it","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/passkeys":{"get":{"operationId":"get_me_passkeys","summary":"Passkeys on the account","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/passkeys/{passkey}":{"delete":{"operationId":"delete_me_passkeys_passkey","summary":"Removes a passkey","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"name":"passkey","in":"path","required":true,"schema":{"type":"string"},"description":"The passkey id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/dpa":{"get":{"operationId":"get_me_dpa","summary":"The signed copy of the DPA, if any","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_me_dpa","summary":"Signs the DPA for your company","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company":{"type":"string","description":"Company name."},"org_number":{"type":"string","description":"Organisation or registration number, optional."},"address":{"type":"string","description":"Company address."},"signer_name":{"type":"string","description":"Name of the person signing."},"signer_title":{"type":"string","description":"Their title."},"accept":{"type":"boolean","description":"true: you accept the DPA on behalf of the company."}},"required":["company","address","signer_name","signer_title","accept"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/support":{"get":{"operationId":"get_me_support","summary":"Whether Okidoki support may look at the account, and their visits","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_me_support","summary":"Lets Okidoki support look at the account, read-only, for a while","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"hours":{"type":"number","description":"24 or 72."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_me_support","summary":"Ends Okidoki support's access at once","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/changes":{"get":{"operationId":"get_changes","summary":"The change log: who changed goals, share links, settings, the team, keys and connections, newest first. Free: the last 30 days","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"name":"site","in":"query","schema":{"type":"string","example":"mysite.com"},"description":"Only this site. Leave out for every site."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/changes/{change}/undo":{"post":{"operationId":"post_changes_change_undo","summary":"Undoes one change from the change log (can_undo): what was added is removed, what was removed comes back, what was changed is written back. For 30 days, the newest change to a thing first","description":"A key for the whole account that may read and change.","tags":["Webhooks and events"],"x-okidoki-key":"account","parameters":[{"name":"change","in":"path","required":true,"schema":{"type":"string"},"description":"The change id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing":{"get":{"operationId":"get_billing","summary":"Plan, questions left and prices","description":"Any API key.","tags":["Account"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/checkout":{"post":{"operationId":"post_billing_checkout","summary":"A payment link for Plus, a pack or an occasion report","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"product":{"type":"string","description":"plus_monthly, plus_yearly, a question pack or occasion_report."},"currency":{"type":"string","description":"USD, EUR, SEK, NOK, DKK or GBP."},"buyer":{"type":"string","description":"business or private.","enum":["business","private"]},"code":{"type":"string","description":"Optional. A discount code for Plus, like VAN20."},"for":{"type":"object","description":"For occasion_report: {site, occasion, year}. The report opens for that occasion when it is paid."}},"required":["product"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/portal":{"post":{"operationId":"post_billing_portal","summary":"A link to manage card, receipts and plan","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/cancel":{"get":{"operationId":"get_billing_cancel","summary":"Where Plus stands before cancelling, and the offer for yearly payers","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_billing_cancel","summary":"Cancels Plus at the end of the paid period","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/keep":{"post":{"operationId":"post_billing_keep","summary":"Takes the offer: 20% off the next year of a yearly Plus, once per account","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/withdraw":{"get":{"operationId":"get_billing_withdraw","summary":"Purchases from the last 14 days that a consumer can withdraw, and what comes back","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_billing_withdraw","summary":"Withdraws a purchase within 14 days: refunds what is left and ends the plan at once","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/stay":{"post":{"operationId":"post_billing_stay","summary":"Stays on the Plus step instead of moving up after two months far above it","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/trial":{"get":{"operationId":"get_billing_trial","summary":"Whether seven days of Plus can be tried, or how many are left","description":"Any API key.","tags":["Account"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/trial/hide":{"post":{"operationId":"post_billing_trial_hide","summary":"Closes the trial offer on the overview","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/welcome":{"get":{"operationId":"get_billing_welcome","summary":"The 14 days of Plus every new account gets: days left, or what they gave once ended","description":"Any API key.","tags":["Account"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/welcome/close":{"post":{"operationId":"post_billing_welcome_close","summary":"Closes the card about the ended days of Plus on the overview","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/welcome/confirm":{"post":{"operationId":"post_billing_welcome_confirm","summary":"Sends the email that confirms the address again, which starts the days of Plus","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/account/growth":{"get":{"operationId":"get_account_growth","summary":"A Free account close to its page views: when the cap is reached at this pace, and what Plus would show with its own numbers","description":"Any API key.","tags":["Account"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/account/growth/hide":{"post":{"operationId":"post_account_growth_hide","summary":"Closes the page views card on the overview until the next level or month","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"level":{"type":"integer","description":"80 or 100, the card being closed."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/billing/setup":{"post":{"operationId":"post_billing_setup","summary":"Starts the done-for-you setup: goals, funnels and the weekly email for every site (part of Plus, bought once on Free)","description":"A key for the whole account that may read and change.","tags":["Account"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/partner":{"get":{"operationId":"get_partner","summary":"Your partner account","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_partner","summary":"Joins the partner program","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_partner","summary":"Changes payout details","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/referral":{"post":{"operationId":"post_me_referral","summary":"Says who referred the account","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/friend":{"get":{"operationId":"get_me_friend","summary":"Give a month, get a month: your friend link and what it has given","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_me_friend","summary":"Claims a friend link for a new account","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"The friend code or link, like okidoki.sh/v/k7m2q."}},"required":["code"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/partner/invoices/{invoice}":{"get":{"operationId":"get_partner_invoices_invoice","summary":"A payout's self-billing invoice, as a page to print","description":"Only a person signed in with a passkey in the web app.","tags":["Account"],"x-okidoki-key":"session","parameters":[{"name":"invoice","in":"path","required":true,"schema":{"type":"string"},"description":"The invoice id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/me/weekly-email":{"get":{"operationId":"get_me_weeklyemail","summary":"The email you would get on Monday","description":"Any API key.","tags":["Account"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/email/unsubscribe":{"get":{"operationId":"get_email_unsubscribe","summary":"Turns an email off from its link (HTML)","description":"No key needed.","tags":["Account"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_email_unsubscribe","summary":"One-click unsubscribe for mail apps","description":"No key needed.","tags":["Account"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/client-reports/stop":{"get":{"operationId":"get_clientreports_stop","summary":"Takes an address off a client report (the link in the email)","description":"No key needed.","tags":["Views and segments"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_clientreports_stop","summary":"The same, for mail apps that unsubscribe on their own","description":"No key needed.","tags":["Views and segments"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/views/unsubscribe":{"get":{"operationId":"get_views_unsubscribe","summary":"Takes an address off a scheduled report (the link in the email)","description":"No key needed.","tags":["Views and segments"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_views_unsubscribe","summary":"The same, for mail apps that unsubscribe on their own","description":"No key needed.","tags":["Views and segments"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/agent/answer":{"get":{"operationId":"get_agent_answer","summary":"The page behind a link in a message from the background agent (HTML)","description":"No key needed.","tags":["Account"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_agent_answer","summary":"Answers a finding from its signed link (HTML)","description":"No key needed.","tags":["Account"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/autopilot/answer":{"get":{"operationId":"get_autopilot_answer","summary":"The page behind a link in the autopilot's weekly mail: undo, a yes to a proposal, or start (HTML)","description":"No key needed.","tags":["Account"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_autopilot_answer","summary":"Does what a signed link in the autopilot's weekly mail says (HTML)","description":"No key needed.","tags":["Account"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites":{"get":{"operationId":"get_sites","summary":"Your sites","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites","summary":"Adds a site","description":"A key for the whole account that may read and change.","tags":["Sites"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","description":"The site address, like mysite.com."},"timezone":{"type":"string","description":"IANA time zone. Defaults to UTC."}},"required":["domain"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}":{"get":{"operationId":"get_sites_site","summary":"One site, with install details","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site","summary":"Sets the time zone","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timezone":{"type":"string","description":"IANA time zone, like Europe/Stockholm."}},"required":["timezone"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site","summary":"Deletes a site and its statistics","description":"A key for the whole account that may read and change.","tags":["Sites"],"x-okidoki-key":"account","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/parts":{"get":{"operationId":"get_sites_site_parts","summary":"Lists the parts of a site: its main address and the subdomains it has had visits on","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_parts","summary":"Names a part of a site","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string","description":"The part's address, like shop.example.com. Leave out for the main address."},"name":{"type":"string","description":"The name, like \"The shop\". Empty takes the name away."}},"required":["name"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/verify":{"get":{"operationId":"get_sites_site_verify","summary":"Checks that Okidoki counts visits","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/builder":{"get":{"operationId":"get_sites_site_builder","summary":"Tells which tool the site is built with","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/install-email":{"post":{"operationId":"post_sites_site_installemail","summary":"Mails the install steps to whoever looks after the site","description":"Only for a person signed in to the web app with a saved account, not API keys; replies go to their own address. No free text. Limited per account and per recipient, and written to the change log. A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","description":"Their email address."},"builder":{"type":"string","description":"The builder slug, when known, like lovable or wix."},"language":{"type":"string","description":"The language of the mail, like sv."}},"required":["to"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-blockers":{"get":{"operationId":"get_sites_site_adblockers","summary":"How to count visitors with ad blockers","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_adblockers","summary":"Uses an own subdomain","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"host":{"type":"string","description":"Like x7f3k.mysite.com. Leave out for the suggested name."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_adblockers","summary":"Stops using the own subdomain","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/summary":{"get":{"operationId":"get_sites_site_summary","summary":"One sentence and the totals","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/insights":{"get":{"operationId":"get_sites_site_insights","summary":"Headline, unusual changes and question cards","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/patterns":{"get":{"operationId":"get_sites_site_patterns","summary":"What goes together in the last 90 days","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/patterns/reading":{"get":{"operationId":"get_sites_site_patterns_reading","summary":"Okidoki's reading of the patterns","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Reports"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/why":{"get":{"operationId":"get_sites_site_why","summary":"One day or month opened: how it went next to the stretch before, and what moved most (sources, campaigns, landing pages, countries, goals, notes, calendar, occasions, ads)","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/compare":{"get":{"operationId":"get_sites_site_compare","summary":"Two to four campaigns, pages, sources or countries side by side","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"by","in":"query","schema":{"type":"string","enum":["campaign","page","source","channel","country","device","utm_source","utm_medium","region","browser","os"]},"description":"What to compare."},{"name":"values","in":"query","schema":{"type":"string","example":"newsletter|black-week"},"description":"Two to four values, separated by |. Put ! in front for everyone but those."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/compare":{"get":{"operationId":"get_compare","summary":"Sites in the account side by side","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"sites","in":"query","schema":{"type":"string","example":"shop.se,blog.se"},"description":"Sites to compare, separated by commas. Leave out for all (up to ten)."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/quick":{"get":{"operationId":"get_sites_site_quick","summary":"A quick look in one answer: visitors and the change, the biggest changes, top sources and pages, and how many are on the site now. Kept for a minute","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/explore":{"get":{"operationId":"get_sites_site_explore","summary":"One site cut one or two ways at once, like sources by device or weekday by hour, with the period before (up to 93 days)","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"by","in":"query","schema":{"type":"string","example":"source,device"},"description":"One or two of page, source, channel, campaign, utm_source, utm_medium, country, region, device, browser, os, language, weekday, hour, day, separated by a comma. The first is the rows, the second the columns."},{"name":"goal","in":"query","schema":{"type":"string"},"description":"A goal name or id, counted per row. Only with place, device, browser, language or time."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/portfolio":{"get":{"operationId":"get_portfolio","summary":"Every site in the account at a glance, with the ones worth a look","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/clients":{"get":{"operationId":"get_clients","summary":"Every client of an agency at a glance: sites grouped per client, visitors over 7 or 30 days, goals, revenue, who is responsible, and what needs a look first","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/clients/export":{"get":{"operationId":"get_clients_export","summary":"One row per client for a month (visitors, the month before, page views, goals reached, sales) as CSV, to invoice from","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"month","in":"query","schema":{"type":"string","example":"2026-10"},"description":"The month, YYYY-MM. Defaults to last month."},{"name":"format","in":"query","schema":{"type":"string","enum":["csv","json"]},"description":"json puts the CSV inside the usual JSON answer."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/clients/{client}":{"get":{"operationId":"get_clients_client","summary":"One client: its sites, visitors per day for 30 days, sources across its sites, goals, what Okidoki noticed and the monthly report","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_clients_client","summary":"Renames a client or chooses who is responsible for it. An automatic client is saved and gets a new key","description":"A key for the whole account that may read and change.","tags":["Sites"],"x-okidoki-key":"account","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The client's name, up to 80 characters."},"owner":{"type":"string","description":"\"owner\" for the account owner, a person id from GET /team, or null."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/clients/{client}/overview":{"get":{"operationId":"get_clients_client_overview","summary":"The overview a client sees through their own link: widgets, the period it opens on, the client links, and the templates and widgets to choose from","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_clients_client_overview","summary":"Makes the overview a client sees (Plus). Every site of the client gets a client link that shows it","description":"A key for the whole account that may read and change.","tags":["Sites"],"x-okidoki-key":"account","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"blocks":{"type":"array","description":"Widgets in order, like [{\"block\": \"visitors\", \"size\": \"xl\"}]."},"template":{"type":"string","description":"A template id from GET /clients/:client/overview, instead of blocks."},"period":{"type":"string","description":"7d, 30d, month, last_month, 90d or year."},"to":{"type":"string","description":"\"all\" gives every client the same overview."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/clients/{client}/report":{"get":{"operationId":"get_clients_client_report","summary":"The monthly client report as the client will get it: subject, HTML, numbers and who gets it","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"name":"month","in":"query","schema":{"type":"string","example":"2026-10"},"description":"The month, YYYY-MM. Defaults to last month."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_clients_client_report","summary":"Who gets a client's monthly report on the 1st, the agency's own words at the top, and its language","description":"A key for the whole account that may read and change.","tags":["Sites"],"x-okidoki-key":"account","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"report_to":{"type":"array","description":"Up to ten email addresses. An empty list stops the report."},"report_greeting":{"type":"string","description":"The agency's own words at the top, up to 1,200 characters."},"report_language":{"type":"string","description":"en, sv, de, fr, es, da, no, fi or is. null: the account's language."},"report_comment":{"type":"string","description":"Agency: the agency's comment for one month's report, up to 1,200 characters. null removes it."},"comment_month":{"type":"string","description":"The month the comment is for, like 2026-11. Default: the month the next report covers."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_clients_client_report","summary":"Sends a client's monthly report now: a test to yourself, or to the client (Plus)","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","description":"\"me\" (a test, the default) or \"client\"."},"month":{"type":"string","description":"last (default), this, or a month like 2026-10."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/clients/{client}/report/comment":{"post":{"operationId":"post_clients_client_report_comment","summary":"A draft of the agency's comment for a month's client report, from the month's numbers, to edit before saving; nothing is sent (Agency)","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"client","in":"path","required":true,"schema":{"type":"string"},"description":"The client id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"month":{"type":"string","description":"this (default), last, or a month like 2026-10."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/copy-setup":{"post":{"operationId":"post_sites_site_copysetup","summary":"Copies goals, funnels and alert rules to the client's other sites, to every site, or to the sites named (Plus)","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string","description":"\"client\" (default), \"all\", or a list of domains."},"what":{"type":"array","description":"goals, funnels and/or alert_rules. All three when left out."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/client":{"patch":{"operationId":"patch_sites_site_client","summary":"Moves a site to another client, to a new client, or back to the client its domain points to","description":"A key for the whole account that may read and change.","tags":["Sites"],"x-okidoki-key":"account","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"client":{"type":"string","description":"A client key from GET /clients, or null."},"name":{"type":"string","description":"With client null: start a new client with this name."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sheets/{key}/{report}":{"get":{"operationId":"get_sheets_key_report","summary":"One report as a plain CSV table for Google Sheets (=IMPORTDATA()) or Excel (Data → From Web), with a read-only key in the path (Plus). report is daily, pages, sources, campaigns, countries, devices, browsers, goals or events","description":"No key needed.","tags":["Reports"],"security":[],"x-okidoki-key":"none","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"The key id."},{"name":"report","in":"path","required":true,"schema":{"type":"string"},"description":"One of: overview, pages, sources, locations, technology, events, videos, goals, revenue, deals, health, realtime, search, bing, paths, funnels, customers, campaigns, reconcile, patterns, calendar, business, forecast, uptime, notfound, speed, sitesearch, heatmap, forms, budgets, impact, metrics, rhythm."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/sql":{"get":{"operationId":"get_sites_site_sql","summary":"The table SQL can read, with its columns","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_sql","summary":"Runs one SELECT in SQLite on the site's own events for a period, up to 93 days, and gives back at most 1 000 rows (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Reports"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"query":{"type":"string","description":"One SELECT, like select path, count(*) as views from events where type = 'pageview' group by 1 order by 2 desc."},"period":{"type":"string","description":"Like 30d, last_month or custom. Defaults to 30d."},"from":{"type":"string","description":"YYYY-MM-DD for custom."},"to":{"type":"string","description":"YYYY-MM-DD for custom."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/experiments":{"get":{"operationId":"get_sites_site_experiments","summary":"A/B tests, each with its result: which version reaches the goal more, and whether it is chance","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_experiments","summary":"Starts an A/B test of two to four versions of a page against a goal (Plus)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Views and segments"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name, like \"New pricing page\"."},"pages":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":4,"description":"Two to four versions of a page, the first is the one to beat: [\"/pricing\", \"/pricing-b\"]."},"goal":{"type":"string","description":"The goal id or name. It counts for a version when reached on it, or for a page goal on the page right after."},"starts_on":{"type":"string","description":"The first day to count, YYYY-MM-DD. Today when left out."},"end":{"type":"boolean","description":"true ends the test today, false starts it again."},"ends_on":{"type":"string","description":"The last day to count, YYYY-MM-DD, or null."}}}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/experiments/{experiment}":{"get":{"operationId":"get_sites_site_experiments_experiment","summary":"One A/B test and its result","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"experiment","in":"path","required":true,"schema":{"type":"string"},"description":"The experiment id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_experiments_experiment","summary":"Renames, ends or restarts an A/B test","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Views and segments"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"experiment","in":"path","required":true,"schema":{"type":"string"},"description":"The experiment id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"A name, like \"New pricing page\"."},"pages":{"type":"array","items":{"type":"string"},"minItems":2,"maxItems":4,"description":"Two to four versions of a page, the first is the one to beat: [\"/pricing\", \"/pricing-b\"]."},"goal":{"type":"string","description":"The goal id or name. It counts for a version when reached on it, or for a page goal on the page right after."},"starts_on":{"type":"string","description":"The first day to count, YYYY-MM-DD. Today when left out."},"end":{"type":"boolean","description":"true ends the test today, false starts it again."},"ends_on":{"type":"string","description":"The last day to count, YYYY-MM-DD, or null."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_experiments_experiment","summary":"Removes an A/B test","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"experiment","in":"path","required":true,"schema":{"type":"string"},"description":"The experiment id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/customers/cohort":{"get":{"operationId":"get_sites_site_customers_cohort","summary":"Customers in one cohort (Plus): hashed customer IDs only, never a person","description":"Any API key.","tags":["Plus"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/reports/{report}":{"get":{"operationId":"get_sites_site_reports_report","summary":"One report","description":"Reports: overview, pages, sources, locations, technology, events, videos, goals, revenue, deals, health, realtime, search, bing, paths, funnels, customers, campaigns, reconcile, patterns, calendar, business, forecast, uptime, notfound, speed, sitesearch, heatmap, forms, budgets, impact, metrics, rhythm. Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"report","in":"path","required":true,"schema":{"type":"string"},"description":"One of: overview, pages, sources, locations, technology, events, videos, goals, revenue, deals, health, realtime, search, bing, paths, funnels, customers, campaigns, reconcile, patterns, calendar, business, forecast, uptime, notfound, speed, sitesearch, heatmap, forms, budgets, impact, metrics, rhythm."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions":{"get":{"operationId":"get_sites_site_occasions","summary":"Occasions for the site's country, and your own","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/hidden/{occasion}":{"post":{"operationId":"post_sites_site_occasions_hidden_occasion","summary":"Hides an occasion from the calendar","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_occasions_hidden_occasion","summary":"Shows a hidden occasion again","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/dates/{occasion}/{year}":{"post":{"operationId":"post_sites_site_occasions_dates_occasion_year","summary":"Sets a calendar occasion's dates for one year, the way this business counts it","description":"Like your own Black Week. The list, the report and the comparison with last year use these dates; last year uses its own dates when it has some. :year is the year the occasion starts in. A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"name":"year","in":"path","required":true,"schema":{"type":"string"},"description":"The year id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string","description":"First day.","format":"date"},"to":{"type":"string","description":"Last day, if more than one.","format":"date"}},"required":["from"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_occasions_dates_occasion_year","summary":"Goes back to the calendar's dates for an occasion and year","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"name":"year","in":"path","required":true,"schema":{"type":"string"},"description":"The year id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/forecasts":{"patch":{"operationId":"patch_sites_site_forecasts","summary":"Turns forecasts for a site on or off","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"on":{"type":"boolean","description":"true shows forecasts, false hides them."}},"required":["on"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/private-pages":{"get":{"operationId":"get_sites_site_privatepages","summary":"Lists the private pages of a site: paths where nothing is stored","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_privatepages","summary":"Sets the private pages of a site. Nothing is stored for them or any page below them, also not calls to window.okidoki","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"paths":{"type":"array","items":{"type":"string"},"description":"Paths like /account. Each covers every page below it. An empty list measures every page again."}},"required":["paths"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/heatmaps":{"patch":{"operationId":"patch_sites_site_heatmaps","summary":"Turns heat maps, scroll maps and form stops for a site on or off (Plus)","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"on":{"type":"boolean","description":"true counts clicks, scrolling and forms from the next page views, false stops it and the add-on is no longer loaded."}},"required":["on"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/heatmap/view":{"get":{"operationId":"get_sites_site_heatmap_view","summary":"A link that opens a page of the site with its heat map drawn on top, for an hour (Plus)","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"path","in":"query","schema":{"type":"string","example":"/pricing","default":"/"},"description":"The page to show the heat map on."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/health/done":{"post":{"operationId":"post_sites_site_health_done","summary":"Marks a problem box as fixed","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/found":{"get":{"operationId":"get_sites_site_occasions_found","summary":"Busy stretches Okidoki found","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/impact":{"get":{"operationId":"get_sites_site_impact","summary":"How it went after each noted change: the days after against as many before, for visitors, goals per 100 visitors and orders, with up, down, same or too few to tell (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Reports"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/notes":{"get":{"operationId":"get_sites_site_occasions_notes","summary":"Your notes","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_occasions_notes","summary":"Adds an occasion of your own","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Spring sale\" or \"Stockholm fair\"."},"from":{"type":"string","description":"First day.","format":"date"},"to":{"type":"string","description":"Last day, if more than one.","format":"date"},"template":{"type":"string","description":"sale, fair, print, broadcast, press, price, launch or other."},"effect_days":{"type":"integer","description":"Days from the start to measure the effect."},"repeats":{"type":"boolean","description":"Comes back on the same dates every year."}},"required":["name","from"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/notes/{note}":{"patch":{"operationId":"patch_sites_site_occasions_notes_note","summary":"Changes an occasion of your own","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"note","in":"path","required":true,"schema":{"type":"string"},"description":"The note id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New name."},"from":{"type":"string","description":"First day.","format":"date"},"to":{"type":"string","description":"Last day.","format":"date"},"template":{"type":"string","description":"sale, fair, print, broadcast, press, price, launch or other."},"effect_days":{"type":"integer","description":"Days from the start to measure the effect."},"repeats":{"type":"boolean","description":"Comes back on the same dates every year."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_occasions_notes_note","summary":"Removes an occasion of your own","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"note","in":"path","required":true,"schema":{"type":"string"},"description":"The note id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/industry":{"patch":{"operationId":"patch_sites_site_industry","summary":"Sets the site's industry, so the calendar shows its occasions first","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"industry":{"type":"string","description":"One of the industries, like bakery_cafe or software_saas. null for none."}},"required":["industry"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/plan/kind":{"patch":{"operationId":"patch_sites_site_plan_kind","summary":"Sets what kinds of site it is (one to three, the main kind first, like a shop that also has recipes to read), so the goals, important pages and occasions follow","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"kinds":{"type":"array","items":{"type":"string","enum":["shop","booking","saas","leads","content","local","event","nonprofit","portfolio","other"]},"description":"One to three kinds, the main one first."},"kind":{"type":"string","description":"One kind, for clients that only send one. Use kinds."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/plan/market":{"patch":{"operationId":"patch_sites_site_plan_market","summary":"Sets which market the site is for (countries with the home market first, and currency), so occasions, questions, the weekly email and the forecast follow it","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"countries":{"type":"array","items":{"type":"string"},"description":"Country codes like SE, NO, DE, the home market first."},"currency":{"type":"string","description":"Like SEK, NOK, EUR. Defaults to the home market's."}},"required":["countries"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/{occasion}/report":{"get":{"operationId":"get_sites_site_occasions_occasion_report","summary":"The occasion report: a plan with dates before it and how it went after (bought once on Free, part of Plus)","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"name":"year","in":"query","schema":{"type":"integer","example":2026},"description":"The year of the occasion. Defaults to this year."},{"name":"country","in":"query","schema":{"type":"string","example":"SE"},"description":"The country whose calendar to use, like SE. Defaults to the site's main market."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_occasions_occasion_report","summary":"Opens an occasion report with one that was bought and waits","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"name":"year","in":"query","schema":{"type":"integer","example":2026},"description":"The year of the occasion. Defaults to this year."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/{occasion}/report/share":{"post":{"operationId":"post_sites_site_occasions_occasion_report_share","summary":"A read-only link to an open occasion report","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"name":"year","in":"query","schema":{"type":"integer","example":2026},"description":"The year of the occasion. Defaults to this year."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_occasions_occasion_report_share","summary":"Turns off the link to an occasion report","description":"A key that may read and change.","tags":["Reports"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."},{"name":"year","in":"query","schema":{"type":"integer","example":2026},"description":"The year of the occasion. Defaults to this year."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/occasions/{occasion}":{"get":{"operationId":"get_sites_site_occasions_occasion","summary":"How an occasion went","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"occasion","in":"path","required":true,"schema":{"type":"string"},"description":"The occasion id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/results":{"get":{"operationId":"get_sites_site_results","summary":"Emails, campaigns, occasions and notes, listed or side by side","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"days","in":"query","schema":{"type":"integer","minimum":7,"maximum":365,"default":90},"description":"How far back."},{"name":"items","in":"query","schema":{"type":"string","example":"campaign:newsletter-46@2026-11-10|campaign:black-week-ig"},"description":"Up to six refs from the list, separated by |."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/export":{"get":{"operationId":"get_sites_site_export","summary":"Reports as CSV","description":"Free downloads the same CSV in the web app; with an API key it is Plus. Any API key. Needs Plus (402 plus_required otherwise).","tags":["Reports"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"report","in":"query","schema":{"type":"string"},"description":"One report, or all."},{"name":"format","in":"query","schema":{"type":"string","enum":["csv","json"]},"description":"json puts the CSV inside the usual JSON answer."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/export":{"get":{"operationId":"get_export","summary":"All your data as a zip of CSV files","description":"A folder per site with one CSV file per table (visitors, pages, channels, sources, campaigns, utm_sources, utm_mediums, countries, regions, devices, browsers, operating_systems, events, goal_completions, sales, deals, ad_results, imported_history, goals, funnels, campaign_costs, occasions, segments, saved_views, ab_tests, uptime, speed, site_searches, downtime, lighthouse, share_links, alert_rules), plus README.txt and sites.csv. Daily totals for the whole history, never a row per visitor. Content-Type application/zip. Free downloads the same zip in Settings, Account; with an API key it is Plus. One export per account at a time. Any API key. Needs Plus (402 plus_required otherwise).","tags":["Your data"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"query","schema":{"type":"string","example":"mysite.com"},"description":"Only this site. Leave out for every site."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/data":{"get":{"operationId":"get_sites_site_data","summary":"The tables you can read, with their columns","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Your data"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/data/{table}":{"get":{"operationId":"get_sites_site_data_table","summary":"One table, page by page or as CSV","description":"Tables: visitors, pages, channels, sources, campaigns, utm_sources, utm_mediums, countries, regions, devices, browsers, operating_systems, events, goal_completions, sales, deals, ad_results, imported_history, goals, funnels, campaign_costs, occasions, segments, saved_views, ab_tests, uptime, speed, site_searches, downtime, lighthouse, share_links, alert_rules. JSON pages end between days; follow next_cursor while has_more. format=csv streams the whole range as one file. Any API key. Needs Plus (402 plus_required otherwise).","tags":["Your data"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"table","in":"path","required":true,"schema":{"type":"string"},"description":"The table id."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, in the site's time zone. Defaults to the first day with data."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD. Defaults to today."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":10000,"default":1000},"description":"About this many rows per page; a page always ends between two days."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the page before. Leave out for the first page."},{"name":"format","in":"query","schema":{"type":"string","enum":["json","csv"],"default":"json"},"description":"csv gives the whole range as one CSV file."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/campaign-places":{"get":{"operationId":"get_campaignplaces","summary":"Where campaign links can be used","description":"No key needed.","tags":["Campaigns and ads"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/campaign-link":{"get":{"operationId":"get_sites_site_campaignlink","summary":"Makes a campaign link (nothing stored)","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"place","in":"query","schema":{"type":"string"},"description":"Where the link is used, from GET /campaign-places."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"The campaign name."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"source","in":"query","schema":{"type":"string"},"description":"utm_source, when the place does not set it."},{"name":"content","in":"query","schema":{"type":"string"},"description":"utm_content, to tell links apart."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/ad-platforms":{"get":{"operationId":"get_adplatforms","summary":"Ad platforms with ready-made tags","description":"No key needed.","tags":["Campaigns and ads"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-setup":{"get":{"operationId":"get_sites_site_adsetup","summary":"Tracking template for an ad platform","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"platform","in":"query","schema":{"type":"string"},"description":"The ad platform, from GET /ad-platforms."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"The campaign name."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-link-test":{"get":{"operationId":"get_sites_site_adlinktest","summary":"Checks a finished ad link","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"url","in":"query","schema":{"type":"string","format":"uri"},"description":"The finished ad link to check."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/goals":{"get":{"operationId":"get_sites_site_goals","summary":"Goals","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_goals","summary":"Adds a goal","description":"Give exactly one of page, event or engaged. From an API key this is Plus; by hand in the app it is free. A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Signed up\"."},"page":{"type":"string","description":"A path like /thanks; end with * for every page below."},"event":{"type":"string","description":"A custom event name, like Signup."},"engaged":{"type":"string","description":"read, time or pages.","enum":["read","time","pages"]},"seconds":{"type":"integer","description":"For engaged=time."},"target":{"type":"string","description":"Only on this page or section, like /blog/*."}},"required":["name"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/event-labels":{"get":{"operationId":"get_sites_site_eventlabels","summary":"The event lexicon: every event the site sent in the last 90 days, with its own name, a description and whether it is hidden from the reports","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/event-labels/{event}":{"patch":{"operationId":"patch_sites_site_eventlabels_event","summary":"Names an event, describes what it means or hides it from the events report and goal ideas","description":"A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"event","in":"path","required":true,"schema":{"type":"string"},"description":"The event id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"label":{"type":"string","description":"The name to show, like Signed up. null goes back to the usual name."},"description":{"type":"string","description":"What the event means, in a sentence. null removes it."},"hidden":{"type":"boolean","description":"true keeps it out of the events report and goal ideas."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/goal-targets":{"get":{"operationId":"get_sites_site_goaltargets","summary":"Goals with a monthly target and how this month is going: so far, where an even pace would be, ahead or behind, and what each remaining day needs","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/goals/{goal}/detail":{"get":{"operationId":"get_sites_site_goals_goal_detail","summary":"One goal in detail: how it is reached, by source, page and day","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"goal","in":"path","required":true,"schema":{"type":"string"},"description":"The goal id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/goals/{goal}/journey":{"get":{"operationId":"get_sites_site_goals_goal_journey","summary":"The way to a goal, put together from page pairs: steps, where most leave and the common ways (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Goals and funnels"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"goal","in":"path","required":true,"schema":{"type":"string"},"description":"The goal id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/attribution":{"get":{"operationId":"get_sites_site_attribution","summary":"What gave the result: visits, landing pages and estimated goals or exact orders per channel, source or campaign (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Goals and funnels"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"goal","in":"query","schema":{"type":"string","example":"orders"},"description":"A goal id, or orders for the shop's orders. Defaults to orders when the shop has any, else the first goal."},{"name":"level","in":"query","schema":{"type":"string","enum":["channel","source","campaign"],"default":"channel"},"description":"What the rows are: channels, the sources, posts and ads inside a channel, or campaigns."},{"name":"within","in":"query","schema":{"type":"string","enum":["Direct","Search","Social","Chats","AI assistants","Email","Paid","Other sites"]},"description":"Look inside one channel. Social and Search include their paid ads."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/marketing":{"get":{"operationId":"get_sites_site_marketing","summary":"How the marketing went over the last 30 days, per channel, with a plan: budget, channels, a test, last year and ad versions (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/marketing/reading":{"get":{"operationId":"get_sites_site_marketing_reading","summary":"Okidoki AI's reading of how the marketing went (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/attribution/reading":{"get":{"operationId":"get_sites_site_attribution_reading","summary":"Okidoki AI's reading of what gave the result, with one suggestion (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Goals and funnels"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"goal","in":"query","schema":{"type":"string","example":"orders"},"description":"A goal id, or orders for the shop's orders. Defaults to orders when the shop has any, else the first goal."},{"name":"level","in":"query","schema":{"type":"string","enum":["channel","source","campaign"],"default":"channel"},"description":"What the rows are: channels, the sources, posts and ads inside a channel, or campaigns."},{"name":"within","in":"query","schema":{"type":"string","enum":["Direct","Search","Social","Chats","AI assistants","Email","Paid","Other sites"]},"description":"Look inside one channel. Social and Search include their paid ads."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/goal-ideas":{"get":{"operationId":"get_sites_site_goalideas","summary":"Suggested goals","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/moments":{"get":{"operationId":"get_sites_site_moments","summary":"Moments worth celebrating","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/brief":{"get":{"operationId":"get_sites_site_brief","summary":"The weekly check-in","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/next-steps":{"get":{"operationId":"get_sites_site_nextsteps","summary":"Up to three things worth doing now","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Reports"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/events":{"get":{"operationId":"get_sites_site_events","summary":"What happened on a site, newest first","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only after this time. Defaults to 7 days ago."},{"name":"type","in":"query","schema":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding"]},"description":"Only this kind of event."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the page before. Leave out for the first page."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Answer"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventPage"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/findings":{"get":{"operationId":"get_sites_site_findings","summary":"What the background agent noticed, newest first","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/findings/preview":{"get":{"operationId":"get_sites_site_findings_preview","summary":"On Free: what the background agent would have found in the last seven days","description":"Any API key.","tags":["Webhooks and events"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/findings/{finding}":{"post":{"operationId":"post_sites_site_findings_finding","summary":"Answers a finding: useful, not_useful, never or approve","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"finding","in":"path","required":true,"schema":{"type":"string"},"description":"The finding id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"useful, not_useful, never (no more of this kind) or approve (do what it proposed).","enum":["useful","not_useful","never","approve"]}},"required":["answer"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/agent":{"get":{"operationId":"get_sites_site_agent","summary":"What the background agent may do on its own","description":"Any API key.","tags":["Webhooks and events"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_agent","summary":"Sets what the background agent may do: auto, ask or never per action","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limits":{"type":"object","description":"Like {\"note\": \"auto\", \"goal_alert\": \"ask\", \"campaign_link\": \"never\"}."}},"required":["limits"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/autopilot":{"get":{"operationId":"get_sites_site_autopilot","summary":"The autopilot: off, trial, on or paused, what it did in the last seven days and what waits for a yes","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Account"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_autopilot","summary":"Turns the autopilot on (it proposes first), starts it, pauses, resumes or turns it off","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"state":{"type":"string","description":"on (try it: it proposes first), start (do it by itself), pause, resume or off.","enum":["on","start","pause","resume","off"]}},"required":["state"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/autopilot/proposals/{proposal}":{"post":{"operationId":"post_sites_site_autopilot_proposals_proposal","summary":"A yes (approve) or no (dismiss) to something the autopilot proposes","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"proposal","in":"path","required":true,"schema":{"type":"string"},"description":"The proposal id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answer":{"type":"string","description":"approve (do it) or dismiss (not now).","enum":["approve","dismiss"]}},"required":["answer"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks":{"get":{"operationId":"get_webhooks","summary":"Webhooks","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Answer"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookList"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_webhooks","summary":"Adds a webhook; the secret is in the answer once","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The https address that gets the events.","format":"uri"},"events":{"oneOf":[{"type":"array","items":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding"]}},{"type":"string","description":"Comma separated."}],"description":"Events to send. Defaults to all."},"site":{"type":"string","description":"Only this site. Leave out for all."},"label":{"type":"string","description":"Like \"My CRM\"."}},"required":["url"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Answer"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookCreated"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{webhook}":{"get":{"operationId":"get_webhooks_webhook","summary":"One webhook","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_webhooks_webhook","summary":"Changes a webhook, or turns it on or off","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"A new address.","format":"uri"},"events":{"oneOf":[{"type":"array","items":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding"]}},{"type":"string","description":"Comma separated."}],"description":"Events to send. Defaults to all."},"label":{"type":"string","description":"A new label."},"on":{"type":"boolean","description":"true turns it on again and sends right away; false pauses it."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_webhooks_webhook","summary":"Stops sending to a webhook","description":"A key that may read and change.","tags":["Webhooks and events"],"x-okidoki-key":"write","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{webhook}/test":{"post":{"operationId":"post_webhooks_webhook_test","summary":"Sends a test event now","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{webhook}/rotate-secret":{"post":{"operationId":"post_webhooks_webhook_rotatesecret","summary":"Makes a new secret; the old one works 24 more hours","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{webhook}/deliveries":{"get":{"operationId":"get_webhooks_webhook_deliveries","summary":"Every attempt to send, newest first (30 days)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"next_cursor from the page before. Leave out for the first page."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Answer"},{"type":"object","properties":{"data":{"$ref":"#/components/schemas/DeliveryPage"}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/webhooks/{webhook}/deliveries/{delivery}/retry":{"post":{"operationId":"post_webhooks_webhook_deliveries_delivery_retry","summary":"Sends that event again now","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"The webhook id."},{"name":"delivery","in":"path","required":true,"schema":{"type":"string"},"description":"The delivery id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/chat-channels":{"get":{"operationId":"get_chatchannels","summary":"Slack, Teams and Discord channels","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_chatchannels","summary":"Sends events to a chat channel","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","description":"The incoming webhook address from Slack, Teams or Discord."},"events":{"oneOf":[{"type":"array","items":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding"]}},{"type":"string","description":"Comma separated."}],"description":"Events to send. Defaults to all."},"site":{"type":"string","description":"Only this site."},"label":{"type":"string","description":"A label."}},"required":["url"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/integration-wishes":{"post":{"operationId":"post_integrationwishes","summary":"Suggests a service for Okidoki to connect to","description":"A key that may read and change.","tags":["Webhooks and events"],"x-okidoki-key":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"service":{"type":"string","description":"The service, like Fortnox or Mailchimp."},"why":{"type":"string","description":"What it would be used for, in a sentence."}},"required":["service"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/chat-channels/{channel}":{"patch":{"operationId":"patch_chatchannels_channel","summary":"Changes a chat channel","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string"},"description":"The channel id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"oneOf":[{"type":"array","items":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding"]}},{"type":"string","description":"Comma separated."}],"description":"Events to send. Defaults to all."},"label":{"type":"string","description":"A label."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_chatchannels_channel","summary":"Removes a chat channel","description":"A key that may read and change.","tags":["Webhooks and events"],"x-okidoki-key":"write","parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string"},"description":"The channel id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/chat-channels/{channel}/test":{"post":{"operationId":"post_chatchannels_channel_test","summary":"Sends a test message","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"channel","in":"path","required":true,"schema":{"type":"string"},"description":"The channel id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/share":{"get":{"operationId":"get_sites_site_share","summary":"The chat channels a view of this site can be sent to","description":"Any API key.","tags":["Webhooks and events"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_share","summary":"Sends a funnel, the way to a goal or the marketing plan to Slack, Teams or Discord","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Webhooks and events"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"what":{"type":"string","enum":["funnel","journey","plan"]},"id":{"type":"string","description":"The funnel id, or the goal id for journey."},"period":{"type":"string","enum":["7d","30d","90d"]},"channel":{"type":"string","description":"A chat channel id from GET chat-channels. Needed when there are several."}},"required":["what"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/goals/{goal}":{"delete":{"operationId":"delete_sites_site_goals_goal","summary":"Removes a goal","description":"A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"goal","in":"path","required":true,"schema":{"type":"string"},"description":"The goal id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_goals_goal","summary":"Sets or removes a goal's monthly target or what one is worth","description":"Free sets a target on one goal per site, Plus on every goal. From an API key this is Plus; by hand in the app it is free. The goal is its id or its name. A value (what one booking or enquiry is worth) lets campaigns with a cost show return on ad spend without a shop. A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"goal","in":"path","required":true,"schema":{"type":"string"},"description":"The goal id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"monthly_target":{"type":["integer","null"],"description":"How many times a month the goal should be reached, like 200. null removes the target."},"value":{"type":["number","null"],"description":"What reaching the goal once is worth, like 600. null removes it."},"value_currency":{"type":"string","description":"The value's currency, like SEK. Leave out for the site's own currency."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/funnels":{"get":{"operationId":"get_sites_site_funnels","summary":"Saved funnels","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_funnels","summary":"Saves a funnel","description":"A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The funnel name."},"steps":{"type":"array","items":{"type":"string"},"description":"Paths or goal names, in order."}},"required":["name","steps"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/funnel-ideas":{"get":{"operationId":"get_sites_site_funnelideas","summary":"Suggested funnels","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/funnels/describe":{"post":{"operationId":"post_sites_site_funnels_describe","summary":"Turns words into funnel steps (nothing saved)","description":"A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","description":"Like \"home, pricing, then sign up\"."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/funnels/{funnel}":{"delete":{"operationId":"delete_sites_site_funnels_funnel","summary":"Removes a funnel","description":"A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"funnel","in":"path","required":true,"schema":{"type":"string"},"description":"The funnel id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/overview":{"get":{"operationId":"get_sites_site_overview","summary":"How the overview is laid out: its template, its blocks and the templates to choose from","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_overview","summary":"Chooses a template for the overview, or sets its blocks","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"template":{"type":"string","description":"auto, shop, blog, services, saas, local, agency, or own:<id>."},"blocks":{"type":"array","items":{"type":"object","properties":{"block":{"type":"string","description":"goals, campaigns, business, revenue, views, ask, known, patterns, report:pages, report:sources, report:locations, report:technology, or view:<id>."},"pinned":{"type":"boolean","description":"Keeps its place; the others move when something happened."}},"required":["block"]},"description":"The blocks under the big number, in order."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/overview-templates":{"get":{"operationId":"get_overviewtemplates","summary":"The account's own overview templates, and the suggested ones","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_overviewtemplates","summary":"Saves blocks as a template for the whole team","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Shops in the autumn\"."},"blocks":{"type":"array","items":{"type":"object","properties":{"block":{"type":"string","description":"goals, campaigns, business, revenue, views, ask, known, patterns, report:pages, report:sources, report:locations, report:technology, or view:<id>."},"pinned":{"type":"boolean","description":"Keeps its place; the others move when something happened."}},"required":["block"]},"description":"The blocks under the big number, in order."},"site":{"type":"string","description":"A site to follow the new template right away."}},"required":["name","blocks"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/overview-templates/{template}":{"delete":{"operationId":"delete_overviewtemplates_template","summary":"Removes an own template; sites that followed it go back to the automatic order","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"template","in":"path","required":true,"schema":{"type":"string"},"description":"The template id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/views":{"get":{"operationId":"get_sites_site_views","summary":"Saved views","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_views","summary":"Saves a view","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Google in Sweden\"."},"query":{"type":"string","description":"The view as an address query: period=30d&compare=year&source=google."},"page":{"type":"string","description":"Where it opens.","enum":["overview","reports","goals","campaigns"]},"question":{"type":"string","description":"A question for Okidoki AI, asked again with fresh numbers."},"pinned":{"type":"boolean","description":"Show it on the overview."},"schedule":{"type":"string","description":"Send it as a report (Plus).","enum":["weekly","monthly","none"]},"recipients":{"type":"array","items":{"type":"string","format":"email"},"description":"Up to 10 addresses besides the team."},"chat_channel_id":{"type":"string","description":"A chat channel to send it to as well."}},"required":["name"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/views/{view}":{"patch":{"operationId":"patch_sites_site_views_view","summary":"Changes a view","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"view","in":"path","required":true,"schema":{"type":"string"},"description":"The view id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Google in Sweden\"."},"query":{"type":"string","description":"The view as an address query: period=30d&compare=year&source=google."},"page":{"type":"string","description":"Where it opens.","enum":["overview","reports","goals","campaigns"]},"question":{"type":"string","description":"A question for Okidoki AI, asked again with fresh numbers."},"pinned":{"type":"boolean","description":"Show it on the overview."},"schedule":{"type":"string","description":"Send it as a report (Plus).","enum":["weekly","monthly","none"]},"recipients":{"type":"array","items":{"type":"string","format":"email"},"description":"Up to 10 addresses besides the team."},"chat_channel_id":{"type":"string","description":"A chat channel to send it to as well."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_views_view","summary":"Removes a view","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"view","in":"path","required":true,"schema":{"type":"string"},"description":"The view id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/segments":{"get":{"operationId":"get_sites_site_segments","summary":"Segments","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_segments","summary":"Makes a segment","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Newsletter readers\"."},"filters":{"type":"object","additionalProperties":{"type":"string"},"description":"Filter names and values, like {\"source\": \"newsletter\", \"country\": \"!SE\"}."},"goal_id":{"type":"string","description":"A goal, to measure how often visits in the segment reach it."},"in_weekly_email":{"type":"boolean","description":"Show the segment in the weekly email (Plus)."}},"required":["name","filters"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/segments/{segment}":{"patch":{"operationId":"patch_sites_site_segments_segment","summary":"Changes a segment","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"segment","in":"path","required":true,"schema":{"type":"string"},"description":"The segment id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like \"Newsletter readers\"."},"filters":{"type":"object","additionalProperties":{"type":"string"},"description":"Filter names and values, like {\"source\": \"newsletter\", \"country\": \"!SE\"}."},"goal_id":{"type":"string","description":"A goal, to measure how often visits in the segment reach it."},"in_weekly_email":{"type":"boolean","description":"Show the segment in the weekly email (Plus)."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_segments_segment","summary":"Removes a segment","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"segment","in":"path","required":true,"schema":{"type":"string"},"description":"The segment id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/deploy-hook":{"get":{"operationId":"get_sites_site_deployhook","summary":"The address that marks deploys on the timeline","description":"Any API key.","tags":["Sites"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_deployhook","summary":"Makes a new deploy address (the old one stops working)","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_deployhook","summary":"Turns the deploy address off","description":"A key that may read and change.","tags":["Sites"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/hooks/deploy/{token}":{"post":{"operationId":"post_hooks_deploy_token","summary":"Marks a deploy on the timeline, once a day. Call it from Netlify, Vercel or a build","description":"No key needed.","tags":["Sites"],"security":[],"x-okidoki-key":"none","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The token id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/share-links":{"get":{"operationId":"get_sites_site_sharelinks","summary":"Share links","description":"Any API key.","tags":["Share links"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_sharelinks","summary":"Makes a share link","description":"A key that may read and change.","tags":["Share links"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/share-links/{link}":{"delete":{"operationId":"delete_sites_site_sharelinks_link","summary":"Turns a share link off","description":"A key that may read and change.","tags":["Share links"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"link","in":"path","required":true,"schema":{"type":"string"},"description":"The link id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/alert-rules":{"get":{"operationId":"get_sites_site_alertrules","summary":"Alert rules of your own","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_alertrules","summary":"Adds an alert rule, like purchases from Google dropping 30 % (Plus)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Views and segments"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Shown in the alert. Left out, Okidoki writes one."},"metric":{"type":"string","description":"What to watch.","enum":["visitors","pageviews","goal"]},"goal":{"type":"string","description":"The goal id or name, for metric goal."},"filters":{"type":"object","additionalProperties":{"type":"string"},"description":"Filters, like {\"source\": \"google\"}. A goal rule takes page, place and technology filters only."},"segment":{"type":"string","description":"A segment id, whose filters apply as well."},"direction":{"type":"string","description":"Which way.","enum":["drop","rise","either"]},"percent":{"type":"integer","minimum":5,"maximum":1000,"description":"How big a change, in percent."},"window":{"type":"string","description":"day: yesterday against the same weekday the four weeks before. week: the last 7 days against the 7 before.","enum":["day","week"]},"email":{"type":"boolean","description":"Send it by email (on by default)."},"chat_channel_id":{"type":"string","description":"A chat channel to send it to."}}}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/presets":{"get":{"operationId":"get_sites_site_presets","summary":"Ready-made alert rules and own metrics for the kind of business","description":"Any API key.","tags":["Views and segments"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/alert-rules/{rule}":{"patch":{"operationId":"patch_sites_site_alertrules_rule","summary":"Changes an alert rule","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Views and segments"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"rule","in":"path","required":true,"schema":{"type":"string"},"description":"The rule id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Shown in the alert. Left out, Okidoki writes one."},"metric":{"type":"string","description":"What to watch.","enum":["visitors","pageviews","goal"]},"goal":{"type":"string","description":"The goal id or name, for metric goal."},"filters":{"type":"object","additionalProperties":{"type":"string"},"description":"Filters, like {\"source\": \"google\"}. A goal rule takes page, place and technology filters only."},"segment":{"type":"string","description":"A segment id, whose filters apply as well."},"direction":{"type":"string","description":"Which way.","enum":["drop","rise","either"]},"percent":{"type":"integer","minimum":5,"maximum":1000,"description":"How big a change, in percent."},"window":{"type":"string","description":"day: yesterday against the same weekday the four weeks before. week: the last 7 days against the 7 before.","enum":["day","week"]},"email":{"type":"boolean","description":"Send it by email (on by default)."},"chat_channel_id":{"type":"string","description":"A chat channel to send it to."}}}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_alertrules_rule","summary":"Removes an alert rule","description":"A key that may read and change.","tags":["Views and segments"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"rule","in":"path","required":true,"schema":{"type":"string"},"description":"The rule id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/alerts":{"get":{"operationId":"get_sites_site_alerts","summary":"Alerts and the kinds there are","description":"Any API key.","tags":["Plus"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_alerts","summary":"Turns an alert on, or changes it","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Plus"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","description":"The alert kind, from GET alerts."},"goal":{"type":"string","description":"For kind=goal: a goal id or name."},"days":{"type":"integer"},"email":{"type":"string","description":"Where to send it."},"slack_url":{"type":"string","description":"A Slack incoming webhook."}},"required":["kind"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/alerts/{alert}":{"delete":{"operationId":"delete_sites_site_alerts_alert","summary":"Turns an alert off","description":"A key that may read and change.","tags":["Plus"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"alert","in":"path","required":true,"schema":{"type":"string"},"description":"The alert id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/revenue":{"get":{"operationId":"get_sites_site_revenue","summary":"Shop and payment connections","description":"Any API key.","tags":["Plus"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_revenue","summary":"Connects a shop or payment platform","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Plus"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"string","description":"shopify, stripe, woocommerce and others."},"secret":{"type":"string","description":"The signing secret, where the platform has one."}},"required":["provider"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/revenue/{provider}":{"delete":{"operationId":"delete_sites_site_revenue_provider","summary":"Disconnects a shop","description":"A key that may read and change.","tags":["Plus"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"provider","in":"path","required":true,"schema":{"type":"string"},"description":"The provider id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-costs":{"get":{"operationId":"get_sites_site_adcosts","summary":"Campaign costs","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_adcosts","summary":"Adds campaign costs (rows or CSV)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"costs":{"type":"array","items":{"type":"object"},"description":"Rows with campaign, from, to, amount, currency."},"csv":{"type":"string","description":"The same as CSV text."}}}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-costs/{cost}":{"delete":{"operationId":"delete_sites_site_adcosts_cost","summary":"Removes a campaign cost","description":"A key that may read and change.","tags":["Campaigns and ads"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"cost","in":"path","required":true,"schema":{"type":"string"},"description":"The cost id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/metrics":{"get":{"operationId":"get_sites_site_metrics","summary":"Own metrics with their numbers for the period (period=, like 30d) next to the period before (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_metrics","summary":"Adds an own metric: one number divided by another, like contact forms per 100 visitors (Plus)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Like Contact forms per 100 visitors."},"top":{"type":"object","description":"What is counted: {\"measure\": \"visitors\" | \"pageviews\" | \"goal\" | \"event\" | \"orders\" | \"revenue\", \"goal\": \"<id or name>\", \"event\": \"<name>\"}."},"bottom":{"type":"object","description":"What it is divided by, in the same shape."},"unit":{"type":"string","description":"percent (a share), per100 (per 100 of the bottom) or number (the plain quotient, like revenue per order)."}},"required":["name","top","bottom"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/metrics/{metric}":{"delete":{"operationId":"delete_sites_site_metrics_metric","summary":"Removes an own metric (its id or name) (Plus)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"metric","in":"path","required":true,"schema":{"type":"string"},"description":"The metric id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-budgets":{"get":{"operationId":"get_sites_site_adbudgets","summary":"Ad budgets per channel and month, with this month's spend, the pace and where the month lands (Plus)","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_adbudgets","summary":"Sets what an ad channel may cost a month (Plus)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"channel":{"type":"string","description":"all, or a platform: google, bing, facebook, tiktok, snapchat, pinterest, linkedin, reddit, or the utm_source the ads use."},"amount":{"type":"number","description":"What the channel may cost a month, like 5000."},"currency":{"type":"string","description":"Three letters, like SEK."}},"required":["amount","currency"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-budgets/{budget}":{"delete":{"operationId":"delete_sites_site_adbudgets_budget","summary":"Removes an ad budget (its id or channel) (Plus)","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"budget","in":"path","required":true,"schema":{"type":"string"},"description":"The budget id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/github":{"get":{"operationId":"get_sites_site_github","summary":"Repositories to pick from for \"Add with GitHub\" (needs the gh token from the sign-in)","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_github","summary":"Opens a pull request that adds the tag to the picked repository","description":"A key that may read and change.","tags":["Campaigns and ads"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gh":{"type":"string","description":"The token from the sign-in."},"repo":{"type":"string","description":"owner/name, one of the repositories offered."}},"required":["gh","repo"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-accounts":{"get":{"operationId":"get_sites_site_adaccounts","summary":"Ad accounts that campaign costs are fetched from (Google Ads, Microsoft Ads, Meta, TikTok, Snapchat, Pinterest, LinkedIn, Reddit)","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_adaccounts","summary":"Picks the ad account to fetch costs from, and fetches at once","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","description":"google, microsoft, meta, tiktok, snapchat, pinterest, linkedin or reddit"},"account_id":{"type":"string","description":"One of the accounts from GET."}},"required":["platform","account_id"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-accounts/sync":{"post":{"operationId":"post_sites_site_adaccounts_sync","summary":"Fetches the latest campaign costs now","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ad-accounts/{provider}":{"delete":{"operationId":"delete_sites_site_adaccounts_provider","summary":"Stops fetching costs from an ad platform","description":"A key that may read and change.","tags":["Campaigns and ads"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"provider","in":"path","required":true,"schema":{"type":"string"},"description":"The provider id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/crm":{"get":{"operationId":"get_sites_site_crm","summary":"CRMs and business systems that deals and invoices are fetched from (HubSpot, Pipedrive, Fortnox, Visma)","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/crm/sync":{"post":{"operationId":"post_sites_site_crm_sync","summary":"Fetches the latest deals and invoices now","description":"A key that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Campaigns and ads"],"x-okidoki-plan":"plus","x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/crm/{provider}":{"delete":{"operationId":"delete_sites_site_crm_provider","summary":"Disconnects a CRM or business system and deletes the deals fetched from it","description":"A key that may read and change.","tags":["Campaigns and ads"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"provider","in":"path","required":true,"schema":{"type":"string"},"description":"The provider id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/email-apps":{"get":{"operationId":"get_sites_site_emailapps","summary":"Email tools whose campaign tags Okidoki keeps on (Mailchimp, Klaviyo)","description":"Any API key.","tags":["Campaigns and ads"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/email-apps/check":{"post":{"operationId":"post_sites_site_emailapps_check","summary":"Checks the campaign tags in the connected email tools now","description":"A key that may read and change.","tags":["Campaigns and ads"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/email-apps/{provider}":{"delete":{"operationId":"delete_sites_site_emailapps_provider","summary":"Disconnects an email tool; the tags already turned on stay on","description":"A key that may read and change.","tags":["Campaigns and ads"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"provider","in":"path","required":true,"schema":{"type":"string"},"description":"The provider id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/benchmarks":{"get":{"operationId":"get_sites_site_benchmarks","summary":"Your numbers next to sites like yours","description":"Any API key. Needs Plus (402 plus_required otherwise).","tags":["Plus"],"x-okidoki-plan":"plus","x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/import/ga":{"get":{"operationId":"get_sites_site_import_ga","summary":"Google Analytics import status","description":"Any API key.","tags":["Integrations"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_import_ga","summary":"Starts a Google Analytics import","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_import_ga","summary":"Removes imported Google Analytics history","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/imports":{"get":{"operationId":"get_sites_site_imports","summary":"History imported from other tools","description":"Any API key.","tags":["Integrations"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/imports/csv":{"post":{"operationId":"post_sites_site_imports_csv","summary":"Imports history from a CSV file","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/imports/{tool}/sites":{"post":{"operationId":"post_sites_site_imports_tool_sites","summary":"Sites in another tool, with its API key (not stored)","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"tool","in":"path","required":true,"schema":{"type":"string"},"description":"The tool id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/imports/{tool}":{"post":{"operationId":"post_sites_site_imports_tool","summary":"Imports history from another tool","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"tool","in":"path","required":true,"schema":{"type":"string"},"description":"The tool id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_imports_tool","summary":"Removes history imported from a tool","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"name":"tool","in":"path","required":true,"schema":{"type":"string"},"description":"The tool id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/google":{"get":{"operationId":"get_sites_site_google","summary":"Google connection","description":"Any API key.","tags":["Integrations"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_google","summary":"Chooses the Search Console property","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_google","summary":"Disconnects Google","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/google/business":{"get":{"operationId":"get_sites_site_google_business","summary":"Google Business Profile connection and profiles","description":"Any API key.","tags":["Integrations"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_google_business","summary":"Chooses the Google Business Profile to read","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/google/add":{"get":{"operationId":"get_sites_site_google_add","summary":"Steps to add the site to Search Console","description":"Any API key.","tags":["Integrations"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_google_add","summary":"Adds the site to Search Console","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/bing":{"get":{"operationId":"get_sites_site_bing","summary":"Bing Webmaster connection","description":"Any API key.","tags":["Integrations"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_bing","summary":"Connects Bing Webmaster Tools","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"patch":{"operationId":"patch_sites_site_bing","summary":"Chooses the Bing site","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_sites_site_bing","summary":"Disconnects Bing","description":"A key that may read and change.","tags":["Integrations"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/team":{"get":{"operationId":"get_team","summary":"People on the team","description":"A key for the whole account that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Keys and team"],"x-okidoki-plan":"plus","x-okidoki-key":"account","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_team","summary":"Invites a person","description":"A key for the whole account that may read and change. Needs Plus (402 plus_required otherwise).","tags":["Keys and team"],"x-okidoki-plan":"plus","x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","description":"Their email.","format":"email"}},"required":["email"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/PlusRequired"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/team/{person}":{"delete":{"operationId":"delete_team_person","summary":"Removes a person","description":"A key for the whole account that may read and change.","tags":["Keys and team"],"x-okidoki-key":"account","parameters":[{"name":"person","in":"path","required":true,"schema":{"type":"string"},"description":"The person id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/join":{"post":{"operationId":"post_auth_join","summary":"Reads a team invitation","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/join/options":{"post":{"operationId":"post_auth_join_options","summary":"Passkey options to join a team","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/auth/join/verify":{"post":{"operationId":"post_auth_join_verify","summary":"Joins a team with a passkey","description":"No key needed.","tags":["Sign-in (web app)"],"security":[],"x-okidoki-key":"none","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/keys":{"get":{"operationId":"get_keys","summary":"API keys","description":"A key for the whole account that may read and change.","tags":["Keys and team"],"x-okidoki-key":"account","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_keys","summary":"Makes an API key; it is in the answer once","description":"A key for the whole account that may read and change.","tags":["Keys and team"],"x-okidoki-key":"account","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"string","description":"read (default) or write.","enum":["read","write"]},"site":{"type":"string","description":"Only this site. Leave out for all."},"label":{"type":"string","description":"Like \"My agent\"."}}}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/apps":{"get":{"operationId":"get_apps","summary":"Apps to install, and the apps installed in the account","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/apps/{app}":{"delete":{"operationId":"delete_apps_app","summary":"Removes an installed app and turns its keys off","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"},"description":"The app id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/developer/apps":{"get":{"operationId":"get_developer_apps","summary":"Apps you have made","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_developer_apps","summary":"Makes an app that people install with OAuth","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"2 to 40 characters."},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"https, http on localhost, or an app address."},"scopes":{"type":"array","items":{"type":"string","enum":["stats:read","revenue:read","events:read","goals:write","share:write","notes:write","ask:use"]},"description":"What the app may ask for."},"server_app":{"type":"boolean","description":"Gets a client secret, shown once."},"status":{"type":"string","description":"private or unlisted."}},"required":["name","redirect_uris","scopes"]}}}},"responses":{"201":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/developer/apps/{app}":{"patch":{"operationId":"patch_developer_apps_app","summary":"Changes an app you made","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"},"description":"The app id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_developer_apps_app","summary":"Deletes an app you made, everywhere it is installed","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"},"description":"The app id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/developer/apps/{app}/secret":{"post":{"operationId":"post_developer_apps_app_secret","summary":"Makes a new client secret for a server app","description":"Only a person signed in with a passkey in the web app.","tags":["Apps"],"x-okidoki-key":"session","parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string"},"description":"The app id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/keys/{key}":{"patch":{"operationId":"patch_keys_key","summary":"Chooses which sites a key for the whole account may see","description":"A key for the whole account that may read and change.","tags":["Keys and team"],"x-okidoki-key":"account","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"The key id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sites":{"type":["array","null"],"items":{"type":"string"},"description":"Site addresses, like [\"a.com\", \"b.com\"]. null: every site, also ones added later."}},"required":["sites"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"delete_keys_key","summary":"Turns an API key off","description":"A key for the whole account that may read and change.","tags":["Keys and team"],"x-okidoki-key":"account","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"},"description":"The key id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/shared/occasion/{token}":{"get":{"operationId":"get_shared_occasion_token","summary":"A shared occasion report, read only","description":"The share token in the address; no key.","tags":["Share links"],"security":[],"x-okidoki-key":"share","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The token id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/shared/{token}":{"get":{"operationId":"get_shared_token","summary":"A shared site","description":"The share token in the address; no key.","tags":["Share links"],"security":[],"x-okidoki-key":"share","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The token id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/shared/{token}/summary":{"get":{"operationId":"get_shared_token_summary","summary":"Summary of a shared site","description":"The share token in the address; no key.","tags":["Share links"],"security":[],"x-okidoki-key":"share","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The token id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/shared/{token}/insights":{"get":{"operationId":"get_shared_token_insights","summary":"Insights of a shared site","description":"The share token in the address; no key.","tags":["Share links"],"security":[],"x-okidoki-key":"share","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The token id."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/shared/{token}/reports/{report}":{"get":{"operationId":"get_shared_token_reports_report","summary":"A report of a shared site","description":"The share token in the address; no key.","tags":["Share links"],"security":[],"x-okidoki-key":"share","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"},"description":"The token id."},{"name":"report","in":"path","required":true,"schema":{"type":"string"},"description":"One of: overview, pages, sources, locations, technology, events, videos, goals, revenue, deals, health, realtime, search, bing, paths, funnels, customers, campaigns, reconcile, patterns, calendar, business, forecast, uptime, notfound, speed, sitesearch, heatmap, forms, budgets, impact, metrics, rhythm."},{"name":"period","in":"query","schema":{"type":"string","enum":["today","24h","yesterday","7d","30d","90d","month","last_month","year","all","custom"],"default":"7d"},"description":"The stretch of time. custom needs from and to."},{"name":"from","in":"query","schema":{"type":"string","format":"date"},"description":"First day, YYYY-MM-DD, for period=custom."},{"name":"to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day, YYYY-MM-DD, for period=custom."},{"name":"compare","in":"query","schema":{"type":"string","enum":["previous","year","custom"],"default":"previous"},"description":"What to compare with. custom needs compare_from and compare_to."},{"name":"compare_from","in":"query","schema":{"type":"string","format":"date"},"description":"First day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"compare_to","in":"query","schema":{"type":"string","format":"date"},"description":"Last day to compare with, YYYY-MM-DD, for compare=custom."},{"name":"page","in":"query","schema":{"type":"string"},"description":"Only visitors with this page. Put ! in front for everyone but those, like !google."},{"name":"part","in":"query","schema":{"type":"string"},"description":"Plus: only one part of the site, like shop.example.com, or the site's own domain for its main address. Put ! in front for every other part."},{"name":"source","in":"query","schema":{"type":"string"},"description":"Only visitors with this source. Put ! in front for everyone but those, like !google."},{"name":"channel","in":"query","schema":{"type":"string"},"description":"Only visitors with this channel. Put ! in front for everyone but those, like !google."},{"name":"campaign","in":"query","schema":{"type":"string"},"description":"Only visitors with this campaign. Put ! in front for everyone but those, like !google."},{"name":"utm_source","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm source. Put ! in front for everyone but those, like !google."},{"name":"utm_medium","in":"query","schema":{"type":"string"},"description":"Only visitors with this utm medium. Put ! in front for everyone but those, like !google."},{"name":"country","in":"query","schema":{"type":"string"},"description":"Only visitors with this country. Put ! in front for everyone but those, like !google."},{"name":"region","in":"query","schema":{"type":"string"},"description":"Only visitors with this region. Put ! in front for everyone but those, like !google."},{"name":"device","in":"query","schema":{"type":"string"},"description":"Only visitors with this device. Put ! in front for everyone but those, like !google."},{"name":"browser","in":"query","schema":{"type":"string"},"description":"Only visitors with this browser. Put ! in front for everyone but those, like !google."},{"name":"os","in":"query","schema":{"type":"string"},"description":"Only visitors with this os. Put ! in front for everyone but those, like !google."},{"name":"segment","in":"query","schema":{"type":"string","format":"uuid"},"description":"A saved segment: its filters apply, and the other filters go on top."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100},"description":"Rows per list or page."},{"name":"lang","in":"query","schema":{"type":"string","example":"sv"},"description":"Language of the sentences. Defaults to English."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/ask":{"get":{"operationId":"get_sites_site_ask","summary":"Suggested questions and questions left","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_ask","summary":"Asks a question about the numbers in plain words","description":"Any API key.","tags":["Reports"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"question":{"type":"string","description":"Like \"Where do my buyers come from?\""}},"required":["question"]}}}},"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}},"/sites/{site}/plan":{"get":{"operationId":"get_sites_site_plan","summary":"The measurement plan","description":"Any API key.","tags":["Goals and funnels"],"x-okidoki-key":"read","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"post_sites_site_plan","summary":"Reads the site and makes a measurement plan","description":"A key that may read and change.","tags":["Goals and funnels"],"x-okidoki-key":"write","parameters":[{"name":"site","in":"path","required":true,"schema":{"type":"string"},"description":"The site's domain, like mysite.com, or its id."},{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"The answer: a sentence to repeat, and the data.","headers":{"X-Request-Id":{"$ref":"#/components/headers/X-Request-Id"},"RateLimit-Limit":{"$ref":"#/components/headers/RateLimit-Limit"},"RateLimit-Remaining":{"$ref":"#/components/headers/RateLimit-Remaining"},"RateLimit-Reset":{"$ref":"#/components/headers/RateLimit-Reset"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Answer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooManyRequests"},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","bearerFormat":"oks_…","description":"An API key from Settings, or an OAuth access token (also oks_…) from https://okidoki.sh/oauth/authorize."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Any unique string, like a UUID. A retry with the same key within 24 hours gets the first answer again (with Idempotent-Replayed: true) instead of doing it twice."}},"headers":{"X-Request-Id":{"description":"Quote it when something looks wrong.","schema":{"type":"string"}},"RateLimit-Limit":{"description":"Calls a key may make a minute (120).","schema":{"type":"integer"}},"RateLimit-Remaining":{"description":"Calls left in this minute.","schema":{"type":"integer"}},"RateLimit-Reset":{"description":"Seconds until the minute starts over.","schema":{"type":"integer"}},"Retry-After":{"description":"Seconds to wait before trying again.","schema":{"type":"integer"}}},"responses":{"BadRequest":{"description":"Something in the request is wrong; the message says what.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"No key, or the key does not work.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key may not do this (read_only_key, site_key, owner_only).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PlusRequired":{"description":"Needs Plus (plus_required), or older history (history_limit).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such site, goal, webhook or endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"rate_limited (more than 120 calls a minute), or agent_read_limit (report reads a month: Free 20, Plus 2000). Wait Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"$ref":"#/components/headers/Retry-After"}}},"Error":{"description":"Any other error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Answer":{"type":"object","required":["message","data"],"properties":{"message":{"type":"string","description":"One plain sentence, written to be repeated to a person as it is."},"data":{"description":"The numbers and details, for programs."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","description":"Stable, for programs: site_not_found, plus_required, rate_limited…"},"message":{"type":"string","description":"What to do, in words that can be passed on."},"status":{"type":"integer"},"request_id":{"type":"string"},"docs":{"type":"string","format":"uri"}}}}},"Event":{"type":"object","required":["id","type","created_at","site","message","data"],"description":"Also the body of every webhook POST. Only numbers and plain sentences, never a visitor or a customer.","properties":{"id":{"type":"string","example":"evt_1042","description":"Unique; the same for every attempt. Use it to skip repeats."},"object":{"type":"string","const":"event"},"api_version":{"type":"string","example":"1"},"type":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding","test"]},"created_at":{"type":"string","format":"date-time"},"site":{"type":["string","null"],"example":"mysite.com"},"message":{"type":"string"},"data":{"type":"object"},"open_url":{"type":["string","null"],"format":"uri"}}},"EventPage":{"type":"object","properties":{"site":{"type":"string"},"since":{"type":"string","format":"date-time"},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}},"Webhook":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string","format":"uri"},"site":{"type":"string","description":"A domain, or all."},"events":{"type":"array","items":{"type":"string","enum":["traffic_spike","quiet_day","sale","goal_reached","goal_quiet","weekly_brief","site_down","site_up","tracking_stopped","tracking_back","goal_stopped","goal_back","sales_stopped","sales_back","finding"]}},"label":{"type":["string","null"]},"on":{"type":"boolean"},"last_sent_at":{"type":["string","null"],"format":"date-time"},"last_status":{"type":["integer","null"]},"failures":{"type":"integer"},"next_attempt_at":{"type":["string","null"],"format":"date-time","description":"When a failed event is tried again. Waits: 5, 15, 30, 60, 120, 240, 480, 720, 720, 720, 720 minutes."},"created_at":{"type":"string","format":"date-time"}}},"WebhookList":{"type":"object","properties":{"webhooks":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}},"events":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"}}}}}},"WebhookCreated":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"site":{"type":"string"},"events":{"type":"array","items":{"type":"string"}},"secret":{"type":"string","example":"whsec_…","description":"Shown only in this answer."},"signature_header":{"type":"string","const":"Okidoki-Signature"}}},"Delivery":{"type":"object","properties":{"id":{"type":"string","example":"whd_88"},"event":{"type":["string","null"],"example":"evt_1042"},"type":{"type":"string"},"attempt":{"type":"integer"},"ok":{"type":"boolean"},"status":{"type":["integer","null"]},"error":{"type":["string","null"],"enum":["timeout","network","status",null]},"duration_ms":{"type":["integer","null"]},"created_at":{"type":"string","format":"date-time"}}},"DeliveryPage":{"type":"object","properties":{"deliveries":{"type":"array","items":{"$ref":"#/components/schemas/Delivery"}},"next_cursor":{"type":["string","null"]},"has_more":{"type":"boolean"}}}}},"webhooks":{"event":{"post":{"summary":"An event, sent to your address","description":"Signed: Okidoki-Signature is \"t=<unix time>,v1=<hex HMAC SHA-256 of \"<t>.<raw body>\" with the webhook secret>\" (two v1 values for 24 hours after a rotation). Also sent: Okidoki-Event, Okidoki-Delivery (the event id), Okidoki-Webhook-Id and Okidoki-Attempt. Answer 2xx within 8 seconds. A failure is tried again after 5, 15, 30, 60, 120, 240, 480, 720, 720, 720, 720 minutes, then the webhook turns off. Events for one webhook arrive in order.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"responses":{"2XX":{"description":"Received."}}}}}}